From fb8464b775e2781b2b5af7925cdf2fa362545286 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Mon, 19 Jun 2023 13:10:32 +0200 Subject: [PATCH 1/3] feat(replay): Add troubleshooting doc for Apollo Client response capture --- .../common/session-replay/troubleshooting.mdx | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/platforms/javascript/common/session-replay/troubleshooting.mdx b/src/platforms/javascript/common/session-replay/troubleshooting.mdx index 571c1a3bd2ae2..94127a6a8c0f4 100644 --- a/src/platforms/javascript/common/session-replay/troubleshooting.mdx +++ b/src/platforms/javascript/common/session-replay/troubleshooting.mdx @@ -69,3 +69,23 @@ To hide this content, block the iframe, as described in our Session Replay Date: Mon, 19 Jun 2023 11:16:16 +0000 Subject: [PATCH 2/3] style(lint): Auto commit lint changes --- .../javascript/common/session-replay/troubleshooting.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platforms/javascript/common/session-replay/troubleshooting.mdx b/src/platforms/javascript/common/session-replay/troubleshooting.mdx index 94127a6a8c0f4..959b39385c4b8 100644 --- a/src/platforms/javascript/common/session-replay/troubleshooting.mdx +++ b/src/platforms/javascript/common/session-replay/troubleshooting.mdx @@ -72,7 +72,7 @@ This is not a supported use-case. The replay package is built to work on a websi ## Response data for Apollo GraphQL Client network requests is not captured -Apollo Client sends an abort signal via `AbortController` whenever a query completes, in order to clean up & cancel all in-flight queries. +Apollo Client sends an abort signal via `AbortController` whenever a query completes, in order to clean up & cancel all in-flight queries. This leads to the Replay not being able to capture the response body, because the request is handled as aborted before Replay can access the response. In order to avoid this, you have to disable this behavior of Apollo Client by configuring your own abort signal: @@ -88,4 +88,4 @@ const httpLink = createHttpLink({ }); ``` -With this configuration, Replay is able to capture response bodies from Apollo Client requests. \ No newline at end of file +With this configuration, Replay is able to capture response bodies from Apollo Client requests. From e71895075b1c359ea8dc2aeab968aafd5275f90d Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Wed, 21 Jun 2023 09:12:35 +0200 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: Shana Matthews --- .../javascript/common/session-replay/troubleshooting.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/platforms/javascript/common/session-replay/troubleshooting.mdx b/src/platforms/javascript/common/session-replay/troubleshooting.mdx index 959b39385c4b8..b348e8c460044 100644 --- a/src/platforms/javascript/common/session-replay/troubleshooting.mdx +++ b/src/platforms/javascript/common/session-replay/troubleshooting.mdx @@ -72,10 +72,10 @@ This is not a supported use-case. The replay package is built to work on a websi ## Response data for Apollo GraphQL Client network requests is not captured -Apollo Client sends an abort signal via `AbortController` whenever a query completes, in order to clean up & cancel all in-flight queries. -This leads to the Replay not being able to capture the response body, because the request is handled as aborted before Replay can access the response. +Apollo Client sends an abort signal via `AbortController` whenever a query completes, to clean up and cancel all in-flight queries. +When this happens, the Replay can't capture the response body because the request is handled as aborted before Replay can access the response. -In order to avoid this, you have to disable this behavior of Apollo Client by configuring your own abort signal: +To avoid this, disable this behavior of Apollo Client by configuring your own abort signal: ```js const abortController = new AbortController();