Closed jer-k closed 3 months ago
Issue is resolved moving back to graphql 17 alpha.2
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. For general questions, we recommend using StackOverflow or our discord server.
Issue Description
I've been attempting to learn more about how Apollo Server works and also create a working reproduction for https://github.com/apollographql/apollo-client/issues/11870. To create the reproduction, I needed to get the
@defer
directive working on Apollo Server. I've managed to put all the pieces together to get the multipart responses returning, but the issue I've run into is that apath
attribute does not seem to be added to my responses.The error in the console
The code in Apollo Client https://github.com/apollographql/apollo-client/blob/7111de266e4ae5b21cf8cb59531db6f8bb9b443f/src/utilities/common/incrementalResult.ts#L53.
If we look at the PR where the defer support was added (https://github.com/apollographql/apollo-server/pull/6827/files) we can see a bunch of tests with content that looks like this
Where
"path":[]
is present.The response that my Apollo Server is returning looks like this
Notice there is no
"path"
.From what I could find in the codebase, it appears that
path
should be added here https://github.com/apollographql/apollo-server/blob/268687db591fed8293eeded1546ae2f8e6f2b6a7/packages/server/src/runHttpQuery.ts#L380.I'm unsure if I've set up my project wrong or if there is some sort of error from Apollo Server in adding in this
path
attribute.Link to Reproduction
https://github.com/jer-k/graphql-rsc-dashboard
Reproduction Steps
npm i --force
as this project is using a bunch of experimental and alpha packages.npm run dev
runs the server on port 6001The query is located at https://github.com/jer-k/graphql-rsc-dashboard/blob/main/components/client-book-stores.tsx#L7-L25 The Apollo Server implementation code exists here https://github.com/jer-k/graphql-rsc-dashboard/tree/main/graphql