Closed EfstathiadisD closed 4 months ago
Hi Efstathiadis,
the CodeSandbox is set to private, could you please make it public?
Hi Efstathiadis,
the CodeSandbox is set to private, could you please make it public?
Sorry for that. I think it should be public now..
I have to admit that I'm a bit confused what the Codesandbox is showing. It doesn't seem like you're setting any headers anywhere in the CodeSandbox.
Could you explain a bit what I should look for here to see this reproduced?
We're closing this issue now but feel free to ping the maintainers or open a new issue if you still need support. Thank you!
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 have a NextJS 14 Application on Pages Router. I have a Query run with
useSuspendQuery
, which doesn't pass theheaders: { Cookie: "" }
from the context. Both SSR and CSR Queries and Mutations work like a charm. How is Suspended Query different?To verify the issue, I passed the Cookie as a hardcoded value to
context: { headers: { Cookie: "VALID_VALUE" } }
and it worked, but according to the docs it should read the default context. I guess that's the real culprit here.Link to Reproduction
Codesanbox
Reproduction Steps
FYI: The reproduction isn't representable cause no requests are made. But my setup is pretty simple and aside from the suspenseQuery everything else work like a charm.
Here is some code I have for reference:
I use the above to init the client with the provider and using the withApollo for SSR requests. But the suspense one doesn't work. it doesn't pass the headers. The setup is identical to what I have in the repro just with actual calls..
@apollo/client
version3.10.4
UPDATE
I checked with the latest versions as well as 3.8.10 which was the previous one i was using in another repo and still doesn't work. The issue seems to be present in the App Dir as well, but I don't think it has anything to do with NextJS tbh, but could be wrong.