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

(graphcache) - Fix inspectFields for uninitialized layers #626

Merged
merged 3 commits into from
Mar 17, 2020

Conversation

kitten
Copy link
Member

@kitten kitten commented Mar 17, 2020

Summary

Resolve #625

For any uninitialized layers, commutative or otherwise, cache.inspectFields would lead to an "of undefined" exception.

Set of changes

  • Fix undefined exception in data.ts
  • Prevent regression with additional test

@kitten kitten requested a review from JoviDeCroock March 17, 2020 10:40
@changeset-bot
Copy link

changeset-bot bot commented Mar 17, 2020

🦋 Changeset is good to go

Latest commit: a04a57c

We got this.

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

Copy link
Collaborator

@JoviDeCroock JoviDeCroock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find 🌮 🎉

@kitten kitten changed the title (graphcache) - Fix inspectFields exception for uninitialized commutative layers (graphcache) - Fix inspectFields for uninitialized layers Mar 17, 2020
@kitten kitten merged commit ee83f8c into master Mar 17, 2020
@kitten kitten deleted the fix/undefined-extract-fields branch March 17, 2020 11:15
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.

[invalidate] TypeError: Cannot read property 'get' of undefined
2 participants