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(babel-plugin-remove-graphql-queries): Strip ignored characters from query text for better caching and deduping #24807

Merged
merged 2 commits into from
Jun 5, 2020

Conversation

sidharthachatterjee
Copy link
Contributor

@sidharthachatterjee sidharthachatterjee commented Jun 5, 2020

This strips spaces and comments from query text before hashing them so that

{
  site {
    siteMetadata {
      github
    }
  }
}

is the same as

            {
              site {
                siteMetadata {
                  github
                }
              }
            }

This will lead to better caching and query reuse 🙂

@sidharthachatterjee sidharthachatterjee requested a review from a team as a code owner June 5, 2020 11:27
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jun 5, 2020
@sidharthachatterjee sidharthachatterjee added type: bug An issue or pull request relating to a bug in Gatsby and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Jun 5, 2020
Copy link
Contributor

@blainekasten blainekasten left a comment

Choose a reason for hiding this comment

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

Looks great to me!

@blainekasten blainekasten merged commit 752f5ff into master Jun 5, 2020
@delete-merged-branch delete-merged-branch bot deleted the fix/normalised-query-text branch June 5, 2020 12:55
axe312ger pushed a commit that referenced this pull request Jun 23, 2020
…om query text for better caching and deduping (#24807)

* Strip ignored characters from query text for better caching and deduping

* Update snapshots
pragmaticpat pushed a commit to pragmaticpat/gatsby that referenced this pull request Apr 28, 2022
…om query text for better caching and deduping (gatsbyjs#24807)

* Strip ignored characters from query text for better caching and deduping

* Update snapshots
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants