Last active
October 3, 2018 21:24
-
-
Save vincenting/389b39835040e811aa1edfb007d25379 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { makeExecutableSchema } = require('graphql-tools'); | |
const typeDefs = [` | |
type Query { | |
hello: String | |
} | |
schema { | |
query: Query | |
}`]; | |
var resolvers = { | |
Query: { | |
hello(root) { | |
return 'world'; | |
} | |
} | |
}; | |
const schema = makeExecutableSchema({typeDefs, resolvers}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment