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): Use documentId for operation hash if it's available #3575

Closed kitten closed 2 months ago

kitten commented 2 months ago

Summary

When persisted documents have hidden definitions (i.e. definitions: []), but have a documentId, we'd generate identical keys for all of these documents.

Instead, we should always use documentId to create a request key when it's available.

Set of changes

changeset-bot[bot] commented 2 months ago

🦋 Changeset detected

Latest commit: e6db80e9677088fc3ab42312b008fd50695c738b

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