I want use some headers in http request,
but i cant find any way get the request header in resolvers.
Maybe, you should try something like this?
this.server.register({
register: graphqlHapi,
options: {
path: '/graphql',
graphqlOptions: async (request) => {
return {
schema,
context: request
}
}
}
});
thank you @Aurelsicoko ,It's works.
Most helpful comment
Maybe, you should try something like this?