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
Results get lost if you upload multiple files in parallel and use Graphcache.
Seems like it happens because of stringify in variables.ts in core package
If you will add
We used to do that before #3169 however that didn't work out. I guess the issue is that we are using operation.key in GraphCache for mutations while we decided a while ago to use a different type of _identity for that.
I guess this could be the cause for missing a few results with parallel identical (observably identical) mutations
@JoviDeCroock: The layering of mutations is still relevant, but if results conflict, they can override each other.
@ursarik: This really depends on how you use the result, typically; Each duplicate mutation gets the same key, unless the variables change it, but still flows through the operation chain separately.
This doesn't really matter until Graphcache writes results to its cache in layers, which may then be re-used across multiple mutations with the same key.
Meaning, we might need you to be more specific than:
Results get lost
Especially since it's unclear what the reproduction is trying to reproduce and errors out with a 502 error.
Describe the bug
Results get lost if you upload multiple files in parallel and use Graphcache.
Seems like it happens because of
stringify
in variables.ts in core packageIf you will add
everything works fine
Reproduction
https://codesandbox.io/p/devbox/mystifying-borg-g7zgym?file=%2Fsrc%2FFileUpload.jsx%3A22%2C1
Urql version
urql v4.0.6, urql/exchange-graphcache v6.5.0
Validations
The text was updated successfully, but these errors were encountered: