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

major(graphcache): remove warning and lookup fields by name rather than alias #2616

Merged
merged 7 commits into from
Aug 19, 2022

Conversation

JoviDeCroock
Copy link
Collaborator

@JoviDeCroock JoviDeCroock commented Aug 17, 2022

Relates to #2578
Resolves #2272

Summary

This PR does two things, removing us warning for undefined fields in optimistic mutations. Now we truely only error/warn for missing typenames and missing keys. Now we'll also leverage the fieldName rather than the fieldAlias to both invoke the optimistic mutation and look up the data from the return value.

This resulted in one failing test which was removed as part of the PR

Set of changes

  • remove the warning for missing fields during optimistic, allowing for partial returns in the optimistic part
  • look up fields by name rather than alias when returning data

@JoviDeCroock JoviDeCroock requested a review from kitten August 17, 2022 03:58
@changeset-bot
Copy link

changeset-bot bot commented Aug 17, 2022

🦋 Changeset detected

Latest commit: 7f89df1

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

@JoviDeCroock JoviDeCroock marked this pull request as ready for review August 19, 2022 13:33
@kitten kitten force-pushed the optimistic-tweaks branch from a586893 to 819fcb0 Compare August 19, 2022 13:41
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.

RFC: Add transform functions in Graphcache's optimistic updater returned data
2 participants