Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(graphcache): Fix partial optimistic mutation results #2740

Merged
merged 1 commit into from
Oct 14, 2022

Conversation

kitten
Copy link
Member

@kitten kitten commented Oct 14, 2022

Resolve #2701

(NOTE: This is a missing piece that's also required to fix a new optimistic mutation case)

Summary

This adds a missing piece of logic that we forgot to update in #2616, which allows optimistic mutations to not only be based on the field name (not alias) and nested functions, but also to return partial results.

Previously to this fix, partial mutation updates would cause cache misses by deleting cache values instead of skipping them.

Set of changes

  • Skip undefined fields on optimistic mutation results

@changeset-bot
Copy link

changeset-bot bot commented Oct 14, 2022

🦋 Changeset detected

Latest commit: f63c2be

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

@kitten kitten merged commit 7570219 into main Oct 14, 2022
@kitten kitten deleted the fix/partial-optimistic branch October 14, 2022 09:15
@urql-ci urql-ci mentioned this pull request Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

useQuery not returning stable references
2 participants