Skip to content

Instantly share code, notes, and snippets.

@xavxyz
Created November 20, 2017 11:08
Show Gist options
  • Save xavxyz/b0347910df4382060643f2c0303bbca2 to your computer and use it in GitHub Desktop.
Save xavxyz/b0347910df4382060643f2c0303bbca2 to your computer and use it in GitHub Desktop.
Snippet from the Advanced GraphQL workshop I run at OK GROW! - https://www.okgrow.com/graphql
const engine = new Engine({
engineConfig: {
apiKey: ENGINE_API_KEY,
logging: {
level: 'DEBUG' // Engine Proxy logging level
}
},
graphqlPort: process.env.PORT
endpoint: '/graphql',
});
app.use('/graphql', bodyParser.json(), graphqlExpress({
schema,
context: { /* ... */ },
// enable tracing extension
tracing: true,
cacheControl: true
}));
engine.start();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment