Union type field in an un-keyable entity gets wrong typename from the union #3272
Replies: 1 comment 1 reply
-
I'm not fully sure I understand all of what you're saying and what issue this causes, however, importantly Currently, the only way to fix this is to either rename the fields so they don't conflict, or to add schema information to Graphcache. I was considering adding some kind of alternative for unions at least, but the gist of the issue here is that, structurally, the smaller of the fragments will heuristically match. |
Beta Was this translation helpful? Give feedback.
-
So I have a fragment in this kind of style:
All of the
Option
,NumberArray
andCustomNumberArray
are un-keyable entities(considering theCustomNumberArray
as keyable didn't fix the issue).Invalidating the
Option
field is obviously overcoming this issue in the context of Mutations, but I have this problem occurring with the Queries where even though the API data has the correct typenames for the respective options, the URQL Cache client messes that data and there is anOption
that isNumberArray
but it later getsCustomNumberArray
typename.What's additionally weird isn't reproducible in a different environment.
Anyone has met with something similar?
Beta Was this translation helpful? Give feedback.
All reactions