-
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
feat(gatsby): Move connection out of sift #9508
Conversation
merged #9416, can you update PR seems like our squashing on merge desynced this branch :( |
@pieh done |
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.
Just minor things. We can skip it them if you feel like it would slow your progress on actual loki things. Just let me know and I'll merge as-is
I love moving createPageDependencies
out of run-sift - it makes much more sense to have it in resolver than in run-sift
Co-Authored-By: Moocar <[email protected]>
Co-Authored-By: Moocar <[email protected]>
@pieh I'm definitely a fan of that new "Suggested change" feature :D. Should be good now |
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.
Thanks!
**Builds on gatsbyjs#9416 . Merge that one before this** In additional to performing the queries, `run-sift.js` also currently converts the results into connections (if connection query). But as part of gatsbyjs#9338, we will be using `loki` to perform queries too. So we would need to duplicate the connection logic in both query engines. This PR pulls the connection logic out of run-sift and into `build-node-connections` which makes sense to me as the query engine doesn't need to know about connections. Only about whether it should return one result or many (thus the `firstOnly` flag). Another benefit is that the query engine no longer needs to understand page dependencies.
Builds on #9416 . Merge that one before this
In additional to performing the queries,
run-sift.js
also currently converts the results into connections (if connection query). But as part of #9338, we will be usingloki
to perform queries too. So we would need to duplicate the connection logic in both query engines.This PR pulls the connection logic out of run-sift and into
build-node-connections
which makes sense to me as the query engine doesn't need to know about connections. Only about whether it should return one result or many (thus thefirstOnly
flag).Another benefit is that the query engine no longer needs to understand page dependencies.