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

feat(graphcache): only add dependency if we are changing the value #3564

Closed JoviDeCroock closed 2 months ago

JoviDeCroock commented 2 months ago

Summary

This is kind of an optimisation, say we have three operations that are all watching different fields of Todo, only one of these operations watches Todo.completed. When a mutation changes Todo.completed we should only invoke that one operation, this is slightly more performant. Not sure if worth it but it could also enable us to create a granular re-rendering mechanism with a first-class fragment citizen.

changeset-bot[bot] commented 2 months ago

🦋 Changeset detected

Latest commit: 05c41542bd854305e15b8eb2cba07d17431f9218

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

This PR includes changesets to release 1 package | Name | Type | | ------------------------- | ----- | | @urql/exchange-graphcache | 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