-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
refactor(gatsby): Split static/page queries #13064
Conversation
I'm noticing that |
Makes sense to me |
25357f7
to
899a27f
Compare
899a27f
to
15cc77e
Compare
@Moocar could you rebase |
15cc77e
to
5cd8687
Compare
@wardpeet Done, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, a few comments though. But these PRs are very easy to read! Great job!
Co-Authored-By: Moocar <Anthony.Marcar@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Co-Authored-By: Moocar <Anthony.Marcar@gmail.com>
Co-Authored-By: Moocar <Anthony.Marcar@gmail.com>
The integration test failure seems actually meaningful? May want to revisit that to ensure we're not introducing anything breaking here--may even need to tweak the integration test itself related to changes in this PR! |
@DSchau Yep. It's legit. I'm looking into it. |
The failing integration test was caused by not checking if a page exists before creating a query job for it. There's a case where we create a A more permanent fix would be to not even create the @wardpeet you were totally right in your earlier comment about checking for nulls 🎩 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
} | ||
|
||
const processQueries = async (queryJobs, activity) => { | ||
const queue = queryQueue.makeBuild() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
create
is our operator of choice https://www.gatsbyjs.org/docs/api-specification/#operators
So maybe createBuildQueue
?
await queryQueue.processBatch(queue, queryJobs) | ||
} | ||
|
||
const makeStaticQueryJob = (state, queryId) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
createStaticQueryJob
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💥
Published in gatsby@2.3.24 |
Description
For #13004, we need to run page queries after build-javascript has executed. This PR introduces the ability to split queries into static/page and run them explicitly.
Related Issues