urql-graphql / urql

The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
https://urql.dev/goto/docs
MIT License
8.54k stars 444 forks source link

fix(core): ensure operationKey is different when dealing with files #3601

Closed JoviDeCroock closed 4 weeks ago

JoviDeCroock commented 4 weeks ago

Fixes https://github.com/urql-graphql/urql/issues/3541

Summary

Change how we calculate the OperationKey to take files into account, before we would encode them to null resulting in every mutation with the same variables (excluding the files) to have the same key. This resulted in mutations that upload different files at the same time to share a result in GraphCache.

changeset-bot[bot] commented 4 weeks ago

🦋 Changeset detected

Latest commit: cac159c16c7e7106e58d621eeb209c055a92b161

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ---------- | ----- | | @urql/core | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR