From 3f6d023db2d7d6bf977060dd5db6291fd64e85e6 Mon Sep 17 00:00:00 2001 From: Jerel Miller Date: Tue, 16 Jul 2024 04:39:38 -0600 Subject: [PATCH] Wrap note about creating new instance in `Caution` (#11960) --- docs/source/performance/server-side-rendering.mdx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/source/performance/server-side-rendering.mdx b/docs/source/performance/server-side-rendering.mdx index e6e0e9ecda3..62abae2ac55 100644 --- a/docs/source/performance/server-side-rendering.mdx +++ b/docs/source/performance/server-side-rendering.mdx @@ -124,7 +124,11 @@ app.listen(basePort, () => console.log( So far, whenever this example server receives a request, it first initializes Apollo Client and then creates a React tree that's wrapped with the `ApolloProvider` and `StaticRouter` components. The contents of that tree depend on the request's path and the `StaticRouter`'s defined routes. -> It's important to create an _entirely new instance_ of Apollo Client for each request. Otherwise, your response to a request might include sensitive cached query results from a _previous_ request. + + +It's important to create an _entirely new instance_ of Apollo Client for each request. Otherwise, your response to a request might include sensitive cached query results from a _previous_ request. + + ### Executing queries with `getDataFromTree`