-
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
connecting nodes from different sources #2575
Comments
Use onCreateNode and createNodeField to create the links. Links are made by adding fields to nodes like |
@KyleAMathews you should add this one in docs. :) |
Due to the high volume of issues, we're closing out older ones without recent activity. Please open a new issue if you need help! |
To be honest, this is not super clear for me. Could someone provide an example, please? |
@KyleAMathews –– I'm digging into Gatsby & really loving it. Running into an interesting roadblock relating to this issue. Was hoping you could weigh in. My createNodeField({
node,
name: "authors",
value: authorNodes,
}) However, the The following query... {
allMarkdownRemark(filter: {fields: {category: {eq: "posts"}}}) {
edges {
node {
fields {
authors {
avatar
}
}
}
}
}
} Yields this data: {
"data": {
"allMarkdownRemark": {
"edges": [
{
"node": {
"fields": {
"authors": [
{
"avatar": "./avatar.png"
}
]
}
}
},
{
"node": {
"fields": {
"authors": [
{
"avatar": "./avatar.png"
}
]
}
}
}
]
}
}
} (the relative file path... not the transformed Do you know of a way that I could preserve the transformations made by the plugins? Any help would be greatly appreciated. THANK YOU! |
@KyleAMathews No idea you could link an array of IDs this is a game changer. Thank you so much |
I'm sure I'm missing this in the docs/google/issues search, but is there a way to connect nodes coming from different sources?
eg something like
where
User
andNote
come from separate JSONs viaplugin-source-filesystem
andplugin-transformer-json
I see
createParentChildLink
, but I'm not sure that's it nor where to use it if it is.The text was updated successfully, but these errors were encountered: