You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Mangatt Unless you're defining a custom keyFields array or dataIdFromObject function for the Query type, and it includes the comments field (unusual), the comments data should be ignored by cache.identify.
When I run cache.identify({ __typename: "Query" }) I get ROOT_QUERY back. It doesn't make a difference (for me) if I include any other fields, like comments.
Is there any chance you might be reconfiguring the default query __typename using queryType: true for some type other than Query?
Intended outcome:
There should be a way how to use
cache.identify
withROOT_QUERY
andkeyArgs
. If there is already a way, it should be documented.Actual outcome:
There is currently no (apparent) way how to get an ID from cache with
keyArgs
.How to reproduce the issue:
None of following works:
Versions
@apollo/client 3.5.7
OS: Windows 10 10.0.19044
Node: 17.4.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.15 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 8.3.1 - C:\Program Files\nodejs\npm.CMD
Chrome: 97.0.4692.99
The text was updated successfully, but these errors were encountered: