Adding deferSpec=20220824
to response headers breaks the Preview pane in browser devtools #7909
Description
Issue Description
As I was working on improving the @defer
support for Next.js in apollo-server-integrations/apollo-server-integration-next#204 I noticed that when I viewed the Preview pane in Chrome devtools, it was always blank.
I thought it might be something going on with Next.js, but I believe it is an issue with the headers being set here https://github.com/apollographql/apollo-server/blob/main/packages/server/src/runHttpQuery.ts#L305.
graphQLResponse.http.headers.set(
'content-type',
'multipart/mixed; boundary="-"; deferSpec=20220824',
);
In my Next.js app, I rewrote the headers to be
const headers: Record<string, string> = {
'content-type': 'multipart/mixed; boundary="-"',
};
And the data appears in the Preview pane
.
Is there any reason to add the deferSpec=20220824
to the response header? Without it Apollo Client behaves properly and the devtools are able to preview the response data.
Link to Reproduction
apollo-server-integrations/apollo-server-integration-next#204
Reproduction Steps
I linked to the PR from the Next.js integration where I detailed all of this. I also have a project https://github.com/jer-k/graphql-rsc-dashboard which has a local version of @as-integrations/next
installed where I'm testing this. I can create a branch of this project that sets everything up to be pulled down if need be.