-
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
Pull in nested entities when using Gatsby Drupal plugin #6172
Comments
What is the full schema for |
Hey, drupal plugin currently doesn't support 1 to many relationships - there is open PR to fix that - #5020 but I didn't have time to update it lately. If you feel like you could take that over, fix merge conflicts this could be merged to master because we are developing beta versions of packages, so it's OK-ish to land breaking stuff now |
Just merge conflicts for now would be fine. Other things mentioned in that PR could be done later if needed. I still think that my point about not using type names as field names for back-references is valid (using same example scenario I presented in that PR), but this could be done with non-breaking change later - for example by using both type names (as we do right now) and additionally |
I see. Was the plan to still merge this into the I tried this branch out and am seeing relationship data coming through 🎉 but I'm getting some GraphQL schema-related errors when trying to pull in some of the child entities' fields (Ex. |
hmm, I might missdiagnoses earlier then, but still I feel like default plugin could be adjusted to handle those too |
That was the correct diagnosis. Update on this one: my team has opted to build a custom GraphQL-based plugin instead, so I'm not going to be able to contribute to #5020. Happy to open a PR to add a note about the current Gatsby Drupal source plugin limitations in its readme if you'd like though. |
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! |
Is it possible to customize the data pulled in from a Drupal 8 JSON API by the Gatsby Drupal plugin? It's working fine for basic queries, but I'm noticing that it doesn't pull in all nested relationship data for my content types.
For example, if I have
showcase
content type, I can pull in any showcase's information, but the child showcase items are not getting included:I get back data with
children
being empty, instead of including the nestedrelationships
data:If I query my Drupal 8 JSON API directly I can see the showcase's relationship data:
Is there something I should be customizing via
gatsby-node.js
, or would I need to recreate this plugin with more customizations? Thanks!The text was updated successfully, but these errors were encountered: