We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm trying to include a cookie in the response but the response toolkit is undefined when accessed in the context method.
new ApolloServer({ typeDefs, resolvers, context: async ({ request, h }) => { return { ... }; }, })
https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-hapi
h is undefined
h
My current server configuration
const server = new ApolloServer({ typeDefs, resolvers, schemaDirectives, context: async ({ request, h }) => { console.log('h', h); return { request, h, }; }, formatError: (error) => formatError(error, app), tracing: true, });
Am I doing something wrong here?
The text was updated successfully, but these errors were encountered:
Looks like adding h to the [request] array here: https://github.com/apollographql/apollo-server/blob/master/packages/apollo-server-hapi/src/hapiApollo.ts#L44 fixes the issue.
[request]
Sorry, something went wrong.
nice, thanks for the fix
Hapi: Pass toolkit to context function (#1407)
0b76e9e
* Fix for #1382 * fix typo in changelog * Added a few tests proving the response toolkit is passed into the context function
Anyone wanna cut a new version? I really need this fix. :-)
No branches or pull requests
I'm trying to include a cookie in the response but the response toolkit is undefined when accessed in the context method.
https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-hapi
h
is undefinedMy current server configuration
Am I doing something wrong here?
The text was updated successfully, but these errors were encountered: