-
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
docs: Link mapping to @link #16152
docs: Link mapping to @link #16152
Conversation
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! One question on the Note: section
@@ -319,6 +319,10 @@ Gatsby's automatic type inference has one trick up its sleeve: for every field | |||
that ends in `___NODE` it will interpret the field value as an `id` and create a | |||
foreign-key relation. | |||
|
|||
> Note: Before the introduction of the Schema Customization APIs in Gatsby v2.2, |
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.
I'm unsure what the takeaway is here - as a reader should this inform me that using mappings or ___NODE
are equivalent, and that in both cases I can now use schema customisation instead?
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.
yes -- previously a plugin author would use the ___NODE
naming convention to create links between nodes when creating the nodes (i.e. used by source/transformer plugins), and a user would use the mappings
config key. both users and plugin authors can now use the @link
extension.
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.
That's great - I added one more line at the end that matches your comment here
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, if @m-allanson is ok we can merge.
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.
👌
* 'master' of github.com:gatsbyjs/gatsby: (103 commits) chore(showcase): add AntdSite (gatsbyjs#16376) docs: Fix typos in docs/blog (gatsbyjs#16366) chore(starters): add gatsby-starter-fashion-portfolio (gatsbyjs#16333) chore(showcase): Add Fourpost (gatsbyjs#16390) Docs: Fix a markdown syntax error in recipes.md (gatsbyjs#16371) docs: Update building-a-theme.md (gatsbyjs#16364) fix: update dependency @theme-ui/prism to ^0.2.29 (gatsbyjs#16385) chore: update dependency gatsby to ^2.13.51 (gatsbyjs#16375) Fix www build fix: update dependency @theme-ui/typography to ^0.2.29 (gatsbyjs#16386) fix: update dependency gatsby-plugin-theme-ui to ^0.2.29 (gatsbyjs#16387) fix: update dependency theme-ui to ^0.2.29 (gatsbyjs#16388) fix(www): fallback to github & unpkg to get README.md (gatsbyjs#16322) fix(www): replace \n into newlines for guess (gatsbyjs#16382) fix(gatsby): always use publicLoader for window.___loader (gatsbyjs#16122) feat(docs): Document what breaking changes are for themes (gatsbyjs#16302) docs: Link mapping to @link (gatsbyjs#16152) fix(gatsby): Add findMatchPath to the default loader (gatsbyjs#16334) feat(gatsby): Allow custom resolver context (gatsbyjs#16359) feat(docs): Add docs for @nodeInterface extension (gatsbyjs#16356) ...
Link to creating foreign-key relations with the
@link
directive from mappings, and vice versa.Fixes: #15816
Related: #16118, #15920