Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/apollo engine example #168

Merged

Conversation

fabien0102
Copy link
Contributor

Hello,

Just update the apollo-engine example with the official apollo guide steps (https://www.apollographql.com/docs/engine/setup-node.html) and retrieve all the tracing data into apollo engine 🤘

@schickling
Copy link
Contributor

Can you add a code comment on why the compression library is needed?

@fabien0102
Copy link
Contributor Author

Of course 😉

@fabien0102
Copy link
Contributor Author

// Once instrumented, the tracing package will increase the size of responses traveling between your
// GraphQL API and the Engine proxy, because the requests will be augmented with additional tracing data.
// Because of this, we recommend that you enable gzip compression in your GraphQL server,
// since the added volume from the tracing format compresses well.
// ref: https://www.apollographql.com/docs/engine/setup-node.html#enabling-compression
server.express.use(compression())

@schickling do you prefer something like this, or just the ref?

@schickling
Copy link
Contributor

I'd say one line + the link.

@fabien0102
Copy link
Contributor Author

// Enable gzip compression
// ref: https://www.apollographql.com/docs/engine/setup-node.html#enabling-compression
server.express.use(compression())

Good enough? ^^

@fabien0102
Copy link
Contributor Author

Done ;)

@schickling schickling merged commit 2234c88 into dotansimha:master Feb 14, 2018
@kachkaev
Copy link
Contributor

@fabien0102 have you already upgraded to apollo engine v1.0? They are using a different API now and it'd be great if you could update this example. I'm a bit confused about when to call apolloEngine.listen() relative to yoga's server.start().

@fabien0102
Copy link
Contributor Author

not yet, but I can have a look into this on Monday ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants