From 518dfa4cf13c24a6dff1c7fb915a47abfd0307d9 Mon Sep 17 00:00:00 2001 From: Chris Couzens Date: Sun, 28 Jul 2024 18:24:44 +0100 Subject: [PATCH] SSRExchange: Remove 2nd data serialization It is unnecessary to set it a 2nd time. The preceding code is ``` const serialized: SerializedResult = { data: JSON.stringify(result.data), hasNext: result.hasNext, }; ``` which has initialized `serialized.data` with the very same value that the removed code is setting. --- packages/core/src/exchanges/ssr.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/core/src/exchanges/ssr.ts b/packages/core/src/exchanges/ssr.ts index 10fff64cf2..ec2e22aac4 100644 --- a/packages/core/src/exchanges/ssr.ts +++ b/packages/core/src/exchanges/ssr.ts @@ -113,10 +113,6 @@ const serializeResult = ( hasNext: result.hasNext, }; - if (result.data !== undefined) { - serialized.data = JSON.stringify(result.data); - } - if (includeExtensions && result.extensions !== undefined) { serialized.extensions = JSON.stringify(result.extensions); }