Skip to content

Instantly share code, notes, and snippets.

@vincenting
Last active October 3, 2018 21:24
Show Gist options
  • Save vincenting/389b39835040e811aa1edfb007d25379 to your computer and use it in GitHub Desktop.
Save vincenting/389b39835040e811aa1edfb007d25379 to your computer and use it in GitHub Desktop.
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