Skip to content
Discussion options

You must be logged in to vote

I was able to fix it by storing the header info in custom context value as authorization like this:

const apolloServer = new ApolloServer({
    schema,
    executor: async requestContext => {
      const { schema, execute, contextFactory } = getEnveloped({ req: requestContext.request.http })
      const context = await contextFactory();
      context.authorization = context.req.headers.get('authorization');
      return execute({
        schema: schema,
        document: requestContext.document,
        contextValue: context,
        variableValues: requestContext.request.variables,
        operationName: requestContext.operationName
      })
    }

and then in the .meshrc.yml file:

operat…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by uzair-inamdar-dlpx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant