Created
November 20, 2017 11:08
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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