From f525d61907404df32fb8a02f3a5b1c4b36654e22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20M=C3=BClller=20=28Guido=20Mueller=29?= Date: Mon, 14 Aug 2023 09:30:20 +0200 Subject: [PATCH 1/2] Update fetching-data.mdx --- docs/source/data/fetching-data.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/data/fetching-data.mdx b/docs/source/data/fetching-data.mdx index 1a610a27ab9..1b0b0e5c502 100644 --- a/docs/source/data/fetching-data.mdx +++ b/docs/source/data/fetching-data.mdx @@ -163,7 +163,7 @@ const server = new ApolloServer({ }); const { url } = await startStandaloneServer(server, { - context: async () => { + context: async (req) => { const { cache } = server; // highlight-line const token = req.headers.token; return { From d1311ddd7c3b579ea3e3d24f465513d0700b8820 Mon Sep 17 00:00:00 2001 From: Maria Elisabeth Schreiber Date: Mon, 14 Aug 2023 17:34:08 -0600 Subject: [PATCH 2/2] Apply suggestions from code review --- docs/source/data/fetching-data.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/data/fetching-data.mdx b/docs/source/data/fetching-data.mdx index 1b0b0e5c502..774060522d6 100644 --- a/docs/source/data/fetching-data.mdx +++ b/docs/source/data/fetching-data.mdx @@ -163,7 +163,7 @@ const server = new ApolloServer({ }); const { url } = await startStandaloneServer(server, { - context: async (req) => { + context: async ({ req }) => { const { cache } = server; // highlight-line const token = req.headers.token; return {