Skip to content

Instantly share code, notes, and snippets.

@lucasconstantino
Created March 29, 2017 18:22
Show Gist options
  • Save lucasconstantino/a38680914b88d4a705bedd428113912b to your computer and use it in GitHub Desktop.
Save lucasconstantino/a38680914b88d4a705bedd428113912b to your computer and use it in GitHub Desktop.
import { makeExecutableSchema } from 'graphql-tools'
const typeDefs = `
type Query {
helloWorld: String!
}
schema {
query: Query
}
`
const resolvers = {
Query: {
helloWorld: () => 'Hello!'
}
}
export const schema = makeExecutableSchema({
typeDefs,
resolvers
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment