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

feat(gatsby): Materialization #16091

Merged
merged 50 commits into from
Aug 30, 2019
Merged

feat(gatsby): Materialization #16091

merged 50 commits into from
Aug 30, 2019

Conversation

freiksenet
Copy link
Contributor

@freiksenet freiksenet commented Jul 25, 2019

Add a node backend independent materialization layer that triggers when nodes are searched on fields only available through resolvers.

In addition, this fixes various incompatibilities that loki had due to never being tested through materialization.

In addition, node tracking is now happening on node-model level too.

In addition, this adds extensions to decide which fields are sortable and searchable and which needs resolve, so we can materialize.

Can be tested via gatsby@materialization

@freiksenet freiksenet changed the title Materialization WIP: Materialization Jul 25, 2019
Ishaan28malik
Ishaan28malik previously approved these changes Jul 27, 2019
@stefanprobst
Copy link
Contributor

getQueryFields, mergeObjects, merge, pathToObject, dropQueryOperators are now in node-model and can be removed from db/common/query i think

@freiksenet
Copy link
Contributor Author

Published as gatsby@2.14.0-rc.3 / gatsby@materialization

@freiksenet
Copy link
Contributor Author

getQueryFields, mergeObjects, merge, pathToObject, dropQueryOperators are now in node-model and can be removed from db/common/query i think

Cheers, fixed.

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.

I still have to go through packages/gatsby/src/schema/node-model.js but I already have some small nits. Nothing big, feel free to ignore

packages/gatsby/src/db/nodes.js Outdated Show resolved Hide resolved
packages/gatsby/src/db/sanitize-node.js Outdated Show resolved Hide resolved
packages/gatsby/src/db/sanitize-node.js Outdated Show resolved Hide resolved
packages/gatsby/src/db/sanitize-node.js Outdated Show resolved Hide resolved
packages/gatsby/src/schema/types/filter.js Show resolved Hide resolved
packages/gatsby/src/schema/node-model.js Show resolved Hide resolved
packages/gatsby/src/schema/node-model.js Show resolved Hide resolved
packages/gatsby/src/schema/node-model.js Outdated Show resolved Hide resolved
packages/gatsby/src/schema/node-model.js Outdated Show resolved Hide resolved
packages/gatsby/src/schema/node-model.js Outdated Show resolved Hide resolved
@freiksenet
Copy link
Contributor Author

Published as gatsby@2.14.0-rc.4 / gatsby@materialization

wardpeet
wardpeet previously approved these changes Aug 29, 2019
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.

Small nit but I believe this is ready to go! <3

packages/gatsby/src/db/nodes.js Outdated Show resolved Hide resolved
packages/gatsby/src/db/nodes.js Outdated Show resolved Hide resolved
Co-Authored-By: Ward Peeters <ward@coding-tech.com>
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.

Awesome work @freiksenet! lets 🚢 it

Copy link
Contributor

@sidharthachatterjee sidharthachatterjee left a comment

Choose a reason for hiding this comment

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

Let’s ship this! 💃🏼

@freiksenet freiksenet merged commit ac10d3d into master Aug 30, 2019
OSS Roadmap automation moved this from In progress to Done Aug 30, 2019
@delete-merged-branch delete-merged-branch bot deleted the materialization branch August 30, 2019 10:18
waltercruz pushed a commit to waltercruz/gatsby that referenced this pull request Sep 8, 2019
Add a node backend independent materialization layer that triggers when nodes are searched on fields only available through resolvers.

In addition, this fixes various incompatibilities that loki had due to never being tested through materialization.

In addition, node tracking is now happening on node-model level too.

In addition, this adds extensions to decide which fields are sortable and searchable and which needs resolve, so we can materialize.
@jonsherrard
Copy link

jonsherrard commented Sep 12, 2019

Hello all! I am way way out of my depth here - hot reloading is like complete magic to me, but I'm 50% sure this PR broke hot reloading in mdx-deck jxnblk/mdx-deck#474. I've explained a bit more in that issue... I'd like to help more but I think it'll take me literally weeks to understand what Materialization is 😅

If anyone can point me in any directions I'm happy to keep on with my knowledge-less brute-force debugging! 😄 @freiksenet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
OSS Roadmap
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

8 participants