Skip to content

Instantly share code, notes, and snippets.

@matthieu-D
Created August 26, 2017 20:09
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 matthieu-D/a9b09d0861367670ac20a31208ee7211 to your computer and use it in GitHub Desktop.
Save matthieu-D/a9b09d0861367670ac20a31208ee7211 to your computer and use it in GitHub Desktop.
var userSchema = require('./user/user.schema').userSchema;
const express = require('express');
const graphqlHTTP = require('express-graphql');
var cors = require('cors');
const app = express();
app.use('*', cors());
app.use('/graphql', cors(), graphqlHTTP({
schema: userSchema,
graphiql: true
}));
app.listen(4000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment