Skip to content

Instantly share code, notes, and snippets.

@akoenig
Created March 4, 2018 07:57
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 akoenig/a62ac6b9266e37cdfea15509e8a31d18 to your computer and use it in GitHub Desktop.
Save akoenig/a62ac6b9266e37cdfea15509e8a31d18 to your computer and use it in GitHub Desktop.
import { GraphQLServer, Options } from "graphql-yoga";
import { formatError } from "apollo-errors";
const options: Options = {
formatError
};
const server = new GraphQLServer({ typeDefs, resolvers })
server.start(options, () => console.log('GraphQL API is running on localhost:4000'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment