Closed
Description
Issue Description
We found a bug in production where the lookupQueryInfo()
method would consistently not render a SSR component after calling renderToStringWithData
.
Upon investigation, we found that the query was being executed and the result should have been available. However, a second QueryInfo
would be registered instead of recovering the resolved one. This is due to the JSON.stringify
method switching the order of attributes when looking up the Map (Check screenshots).


I noticed the utilities package already provides a canonicalStringify
which would fix this issue.
Link to Reproduction
https://github.com/apollographql/apollo-client/blob/main/src/react/ssr/RenderPromises.ts#L140
Reproduction Steps
No response
@apollo/client
version
3.8.3