Skip to content

azure function - how to access the azure function context inside resolver? #5304

Answered by glasser
ntodorov asked this question in Q&A
Discussion options

You must be logged in to vote

As documented it is the context option passed to your context function (these two contexts are different!)

new ApolloServer({
  typeDefs,
  resolvers,
  context: ({ context }) => ({
    azureFunctionsContext: context,
  }),
})
  someResolver(_parent, _args, { azureFunctionsContext }) {
    // look at azureFunctionsContext
  }

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ntodorov
Comment options

Answer selected by ntodorov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants