Skip to content

Instantly share code, notes, and snippets.

@nikolasburk
Created March 21, 2018 15:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nikolasburk/bfb12664850e8749e4a981eb684d637e to your computer and use it in GitHub Desktop.
Save nikolasburk/bfb12664850e8749e4a981eb684d637e to your computer and use it in GitHub Desktop.
import { GraphQLServer } from 'graphql-yoga'
const typeDefs = `
type Query {
hello: String!
}
`
const resolvers = {
Query: {
hello: () => `Hello World`,
},
}
const server = new GraphQLServer({ typeDefs, resolvers })
server.start(() => console.log('Server is running on localhost:4000'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment