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(gatsby): Move static queries to page data dir #26242

Merged
merged 4 commits into from
Aug 6, 2020

Conversation

sidharthachatterjee
Copy link
Contributor

Static query file names are currently a fn of query text a(and not result). We should move them to the current page-data directory (which we recommend not caching)

Fixes #26135

@sidharthachatterjee sidharthachatterjee requested a review from a team as a code owner August 5, 2020 14:20
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Aug 5, 2020
@sidharthachatterjee sidharthachatterjee added topic: StaticQuery and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Aug 5, 2020
@sidharthachatterjee
Copy link
Contributor Author

@wardpeet The only problematic edge case I can think of is if someone creates a page with a path of static

I mean, it won't fail. It'll just result in /page-data/static containing d and page-data.json which won't affect anything but feels strange 🤷

@gatsby-cloud
Copy link

gatsby-cloud bot commented Aug 5, 2020

Gatsby Cloud Build Report

client-only-paths

🎉 Your build was successful! See the Deploy preview here.

Build Details

View the build logs here.

🕐 Build time: 17s

Performance

Lighthouse report

Metric Score
Performance 💚 100
Accessibility 🔶 85
Best Practices 💚 100
SEO 🔶 70

🔗 View full report

@gatsby-cloud
Copy link

gatsby-cloud bot commented Aug 5, 2020

Gatsby Cloud Build Report

using-styled-components

🎉 Your build was successful! See the Deploy preview here.

Build Details

View the build logs here.

🕐 Build time: 21s

Performance

Lighthouse report

Metric Score
Performance 💚 100
Accessibility 💚 90
Best Practices 💚 100
SEO 💚 90

🔗 View full report

@gatsby-cloud-staging
Copy link

gatsby-cloud-staging bot commented Aug 5, 2020

Gatsby Cloud Build Report

gatsby-master

🎉 Your build was successful! See the Deploy preview here.

Build Details

View the build logs here.

🕐 Build time: 1m

Performance

Lighthouse report

Metric Score
Performance 💚 98
Accessibility 🔶 87
Best Practices 💚 93
SEO 🔶 73

🔗 View full report

@gatsby-cloud
Copy link

gatsby-cloud bot commented Aug 5, 2020

Gatsby Cloud Build Report

using-reach-skip-nav

🎉 Your build was successful! See the Deploy preview here.

Build Details

View the build logs here.

🕐 Build time: 26s

Performance

Lighthouse report

Metric Score
Performance 💚 100
Accessibility 💚 100
Best Practices 💚 100
SEO 🔶 82

🔗 View full report

@KyleAMathews
Copy link
Contributor

we could change the directory name to something more nonsensical to further avoid chances of classes e.g. sq/d/*

@sidharthachatterjee
Copy link
Contributor Author

@KyleAMathews Could do that, yes. @pieh Thoughts?

@herecydev
Copy link
Contributor

Maybe page-data/gatsby-static?

@sidharthachatterjee
Copy link
Contributor Author

I mean the clash wouldn't cause any issue given that there's the d folder and given that the page-data.json for a page with a collision will still be written and just work 🤷‍♂️ So I wouldn't worry too much! Wanted to point it out though.

@gatsby-cloud
Copy link

gatsby-cloud bot commented Aug 5, 2020

Gatsby Cloud Build Report

gatsby

🎉 Your build was successful! See the Deploy preview here.

Build Details

View the build logs here.

🕐 Build time: 38m

@gatsby-cloud-staging
Copy link

gatsby-cloud-staging bot commented Aug 5, 2020

Gatsby Cloud Build Report

gatsby

🎉 Your build was successful! See the Deploy preview here.

Build Details

View the build logs here.

🕐 Build time: 19m

Performance

Lighthouse report

Metric Score
Performance 💚 92
Accessibility 💚 100
Best Practices 💚 100
SEO 🔶 76

🔗 View full report

Copy link
Contributor

@wardpeet wardpeet left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

Thanks @sidharthachatterjee

@wardpeet wardpeet merged commit de979d3 into master Aug 6, 2020
@wardpeet wardpeet deleted the fix/move-static-queries-location branch August 6, 2020 14:37
@sidharthachatterjee
Copy link
Contributor Author

Published in gatsby@2.24.33

karlhorky added a commit to upleveled/gatsby-serverside-auth0 that referenced this pull request Aug 7, 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.

Static query not invalidating hash
5 participants