From 8cbc61406229653454e50ea98f11dbe834e036b5 Mon Sep 17 00:00:00 2001 From: mayakoneval Date: Thu, 9 Mar 2023 10:27:12 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Align=20apollo-server=20config?= =?UTF-8?q?=20with=20state=20of=20embeds=20(#7432)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We added `hideCookieToggle` and `initialState.includeCookies` in the embedded Sandbox config. We then accidentally added `hideCookieToggle` to the embedded Explorer, and we should have only added it to the embedded Sandbox in this repo. This commit 1. puts `includeCookies` back in the embedded Explorer 2. removes `hideCookieToggle` in the embedded Explorer 3. don't spread the entire config into the explorer config, name the arguments 4. remove redundant `?? undefined`s --- .changeset/kind-yaks-sneeze.md | 13 +++++++++++++ .../landingPage/getEmbeddedExplorerHTML.test.ts | 4 ++-- .../landingPage/default/getEmbeddedHTML.ts | 16 +++++++++------- 3 files changed, 24 insertions(+), 9 deletions(-) create mode 100644 .changeset/kind-yaks-sneeze.md diff --git a/.changeset/kind-yaks-sneeze.md b/.changeset/kind-yaks-sneeze.md new file mode 100644 index 00000000000..3a87b0df907 --- /dev/null +++ b/.changeset/kind-yaks-sneeze.md @@ -0,0 +1,13 @@ +--- +'@apollo/server': patch +--- + +Bug fix: tldr revert a previous change that stops passing includeCookies from the prod landing page config. + +Who was affected? + +Any Apollo Server instance that passes a `graphRef` to a production landing page with a non-default `includeCookies` value that does not match the `Include cookies` setting on your registered variant on studio.apollographql.com. + +How were they affected? + +From release 4.4.0 to this patch release, folks affected would have seen their Explorer requests being sent with cookies included only if they had set `Include cookies` on their variant. Cookies would not havhe been included by default. diff --git a/packages/server/src/__tests__/plugin/landingPage/getEmbeddedExplorerHTML.test.ts b/packages/server/src/__tests__/plugin/landingPage/getEmbeddedExplorerHTML.test.ts index 72cc4def12b..0e2ecba05cd 100644 --- a/packages/server/src/__tests__/plugin/landingPage/getEmbeddedExplorerHTML.test.ts +++ b/packages/server/src/__tests__/plugin/landingPage/getEmbeddedExplorerHTML.test.ts @@ -51,7 +51,7 @@ describe('Embedded Explorer Landing Page Config HTML', () => {