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

[1.0] refactor node structure to hide internal fields #960

Merged
merged 6 commits into from
May 15, 2017

Conversation

KyleAMathews
Copy link
Contributor

No description provided.

@gatsbybot
Copy link
Collaborator

gatsbybot commented May 13, 2017

Deploy preview ready!

Built with commit 9c86a7c

https://deploy-preview-960--gatsbyjs.netlify.com

@gatsbybot
Copy link
Collaborator

gatsbybot commented May 13, 2017

Deploy preview ready!

Built with commit 9c86a7c

https://deploy-preview-960--using-drupal.netlify.com

@gatsbybot
Copy link
Collaborator

gatsbybot commented May 13, 2017

Deploy preview ready!

Built with commit 9c86a7c

https://deploy-preview-960--gatsbygram.netlify.com

type: Joi.string().required(),
pluginName: Joi.string().required(),
content: Joi.string(),
}),
Copy link
Contributor

Choose a reason for hiding this comment

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

required?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's added automatically by api-runner-node

Copy link
Contributor

Choose a reason for hiding this comment

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

If it's not required according to this validation, shouldn't contentDigest then not be required too? Or are those not added in the same way?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jquense to expand on my answer I typed on my phone as my plane took off :-) If we know which plugin created every node we can do optimizations eventually like invalidating only nodes created by a plugin when it updates, etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@0x80 what's "it" here?

domain,
order: i + 1,
parent: `__SOURCE__`,
type: `HNStory`,
children: [...kids.kids.map(k => k.id)],
Copy link
Contributor

@0x80 0x80 May 13, 2017

Choose a reason for hiding this comment

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

Not part of the PR but I just happened to notice the redundant [...] here. It could just be children: kids.kids.map(k => k.id),

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh good point :-)

@@ -133,11 +135,13 @@ fragment commentsFragment on HackerNewsItem {
}
let commentNode = {
..._.omit(comment, `kids`),
order: i + 1,
type: `HNComment`,
parent,
children: [...comment.kids.map(k => k.id)],
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment here

@KyleAMathews KyleAMathews changed the title [1.0] WIP refactor node structure to hide internal fields May 15, 2017
@KyleAMathews KyleAMathews merged commit daaa22c into 1.0 May 15, 2017
@KyleAMathews KyleAMathews deleted the node-structure-refactor branch May 15, 2017 15:57
KyleAMathews pushed a commit that referenced this pull request Jun 13, 2017
* Ignore SVGs in gatsby-remark-responsive-image

…and instead just copy them alongside GIFs in gatsby-remark-copy-linked-files.

* Fix reference to node `contentDigest`

@see #960
@see https://github.com/gatsbyjs/gatsby/releases/tag/v1.0.0-alpha15

* Check node extension instead of sliced image.url
mwfrost pushed a commit to mwfrost/gatsby that referenced this pull request Apr 20, 2023
* Initial refactor done

* Remove unused code

* Some fixes

* Bump site version number cause it's getting better and stuff

* Fix source-drupal plugin

* Add basic documentation for node interface and hacker news source plugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants