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 mutating original document #880

Merged
merged 3 commits into from
Jun 29, 2020

Conversation

kitten
Copy link
Member

@kitten kitten commented Jun 24, 2020

Resolve #879

  • Fix the formatDocument mutating parts of the original document
  • Fix a formatted document from creating a different hash in createRequest

The latter works because formatDocument can be assumed to be called
by caches, like the cacheExchange, so they shouldn't ever alter the
resulting hash.

This does affect the minzipped size: 3.44kB => 3.46kB

- Fix the formatDocument mutating parts of the original document
- Fix a formatted document from creating a different hash in createRequest

The latter works because `formatDocument` can be assumed to be called
by caches, like the cacheExchange, so they shouldn't ever alter the
resulting hash.
@kitten kitten requested a review from JoviDeCroock June 24, 2020 15:56
@changeset-bot
Copy link

changeset-bot bot commented Jun 24, 2020

🦋 Changeset is good to go

Latest commit: c653842

We got this.

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 changed the title Fix formatDocument mutating original document (core) - Fix formatDocument mutating original document Jun 24, 2020
@kitten kitten merged commit c6fb74e into master Jun 29, 2020
@kitten kitten deleted the fix/typenames-edgecases branch June 29, 2020 12:56
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.

SSR pages re-executing queries
2 participants