Skip to content

Instantly share code, notes, and snippets.

@kkworden kkworden/index.js

Last active Dec 10, 2018
What would you like to do?
Updated express route to use express-graphql middleware
const graphqlHTTP = require('express-graphql');
const schema = require('./schema');
const resolvers = require('./resolvers');
// The rest of our old code...
app.use('/api', graphqlHTTP({
schema: schema,
rootValue: resolvers,
graphiql: true,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.