const schema = make_schema({
document: 'type Query { ping: String! }',
resolvers: {
Query: {
ping: () => 'pong',
},
Subscription: {
ping: {
resolve: () => 'pong',
async *subscribe() {
yield 0
},
},
},
},
directives: {
foo: ({
resolve, // original resolver
root, // resolver params in the same order
parameters, // .
context, // .
info, // .
directive_arguments, // parameters for the directive
}) => {},
},
})
-
Notifications
You must be signed in to change notification settings - Fork 0
An utility function to build a graphql schema
License
HydreIO/make_schema
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
An utility function to build a graphql schema
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published