Hapi: Pass toolkit to context function#1407
Conversation
|
@maxnachlinger: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/ |
|
Hey folks, I'd love a review of this micro |
|
|
||
| ### vNEXT | ||
|
|
||
| - Pass the response tollkit to the context function. [#1407](https://github.com/apollographql/apollo-server/pull/1407) |
There was a problem hiding this comment.
Hey my tollkit was... you know, trying to generate revenue for this awesome open-source project or something :) Me no make text good.
|
@maxnachlinger This looks great! Thank you so much. It would be awesome to have a test for the context function to ensure that there is a toolkit. Adding it here is the best bet. Let me know if I can help with that more! |
| await apolloFetch({ query: '{hello}' }); | ||
| }); | ||
|
|
||
| it('passes each request and response toolkit through to the context function', async () => { |
There was a problem hiding this comment.
@evans This seems like a better test, what do you think?
|
@evans This is ready for another review |
|
BTW The build failure ins't relevant to this PR :( It's failing on: |
|
+1 , we'd like to get this toolkit into our resolvers! |
|
@maxnachlinger Thank you so much! |
|
Curious as to how this is then used within the resolver. When I tried to modify the response with the toolkit, any headers that are set for example are stripped out in the final response presumably by Apollo. How are people intending this be used? |
Fixes #1382
TODO: