Skip to content

Instantly share code, notes, and snippets.

@arminyahya
Created August 24, 2019 09:26
Show Gist options
  • Save arminyahya/5aac5abee86bae213ee071bbbb1831d3 to your computer and use it in GitHub Desktop.
Save arminyahya/5aac5abee86bae213ee071bbbb1831d3 to your computer and use it in GitHub Desktop.
var express = require('express');
var express_graphql = require('express-graphql');
var { schema, root} = require('./schema');
var app = express();
app.use('/graphql', express_graphql({
schema: schema,
rootValue: root,
graphiql: true
}));
app.listen(4000, () => console.log('Express GraphQL Server Now Running On localhost:4000/graphql'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment