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

(core) - Fix formatDocument edge case and add caching #1186

Merged
merged 6 commits into from
Dec 2, 2020

Conversation

kitten
Copy link
Member

@kitten kitten commented Dec 2, 2020

Summary

Fix an edge case in formatDocument for aliased fields and add in-memory caching to it via the document key.

Set of changes

  • Add keyDocument for formatDocument to cache its result
  • Add alias check to formatDocument's visit function
  • Code golf collectTypesFromResponse a little

@kitten kitten requested a review from JoviDeCroock December 2, 2020 12:30
@changeset-bot
Copy link

changeset-bot bot commented Dec 2, 2020

🦋 Changeset detected

Latest commit: c15d4f1

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

@kitten kitten merged commit 564ed1b into main Dec 2, 2020
@kitten kitten deleted the fix/format-document-edgecases branch December 2, 2020 16:03
@github-actions github-actions bot mentioned this pull request Dec 2, 2020
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.

2 participants