[go: nahoru, domu]

Skip to content

Commit

Permalink
Fixed wrong destructuring in context function (apollographql#4656)
Browse files Browse the repository at this point in the history
The docs states that the req object needs to be destructured, when accessed, which is wrong.
  • Loading branch information
JohannesKlauss committed Dec 31, 2020
1 parent 17c1981 commit 2d7a761
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/source/data/resolvers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ To provide a `context` to your resolvers, add a `context` initialization functio
const server = new ApolloServer({
typeDefs,
resolvers,
context: ({ req }) => ({
context: (req) => ({
authScope: getScope(req.headers.authorization)
})
}));
Expand Down

0 comments on commit 2d7a761

Please sign in to comment.