bhoriuchi / graphql-go-tools Goto Github PK
View Code? Open in Web Editor NEWLike apollo-tools for graphql-go
License: MIT License
Like apollo-tools for graphql-go
License: MIT License
It's a good lib, thanks!
I wonder when will publish Schema-stitching function?
i see that you set allowThunks
in this line when the iterations
go over the maxIteration
, can you explain me what is its usage?
Line 253 in fe56277
I had to set allowThunks
to false because of this issue
graphql-go/graphql#543
When trying to use an interface i get the error
failed to make schema from concatenated TypeDefs: no definition found for type "InterfaceName"
When defining IsTypeOf
in ObjectResolver
and ResolveTypes
in UnionResolver
, they are ignored
In the schema.go file, we hope to optimize the error handling approach as shown below, in order to obtain error information in non-debug mode.
Here is an example of the optimized code:
func (c *ExecutableSchema) Make(ctx context.Context) (graphql.Schema, error) {
// ...
schema, err := graphql.NewSchema(*schemaConfig)
if err != nil {
if c.Debug {
j, _ := json.MarshalIndent(registry.dependencyMap, "", " ")
fmt.Println("Unresolved types, thunks will be used")
fmt.Println(string(j))
}
return schema, fmt.Errorf("failed to create schema: %w", err)
}
// create a new schema
return schema, nil
}
Support converting a schema definition into go code
eg-js:
Input
"""
An individual human being.
"""
type Person {
"""
The full name of the person.
"""
name: String
"""
The elapsed time (in years) since the person's birth.
"""
age: Int
}
output:
const jsonSchema = {
$id: '#/person',
type: 'object',
description: 'An individual human being.',
properties: {
name: {
type: 'string',
description: 'The full name of the person.',
},
age: {
type: 'integer',
description: "The elapsed time (in years) since the person's birth.",
},
},
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.