Replies: 1 comment
-
What could be happening is that Graphcache gets into a "dead lock" situation. Fields on You should be able to attach the debug logging to get more info about this: urql/exchanges/graphcache/src/types.ts Line 548 in 00d36ce |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Today I worked on adding a fairly trivial new mutation to my app (
createPost
).This mutation returns a
Post
type, as well as a nested array ofitems
(an array ofPost
).I found that when accessing this mutation result, it resolved to
null
for the entirecreatePost
return type.What's interesting, is that my schema doesn't support this value being
null
, but graphcache was resolving it as such.After doing some digging, I found that:
result
I get back from urql has incorrect data.updates
handler, the data resolves correctly. Without this, the data resolves tonull
.items
from the mutation, everthing works correctly. With theitems
, the data resolves tonull
.The following line of code patches this at my end
Am I overlooking something in the docs?
My expectation is that this would be handled automatically in the background. Do I need to add a handler to
updates
even if it does nothing?Beta Was this translation helpful? Give feedback.
All reactions