-
Notifications
You must be signed in to change notification settings - Fork 10.3k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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 for relationships need more examples, clearer docs, probably a guide #21852
Comments
cc @gatsbyjs/learning |
I second that. I was creating a site and needed to create a relationship between books and authors but had to use WordPress (unfortunately). I spend over 2 hours reading the mapping (object) doc but couldn't find the answer. |
We have the Schema Customization workflow slated for next quarter, so this could fit nicely into that work. Thanks for filing the issue! |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
After repeatedly failing to get the example author mapping to work, I eventually decided that porting everything I had thus far written to the example in I'm loving Gatsby otherwise. |
Are there any other resources, examples, issues, etc. for building relationships in gatsby? I’m unable to get my project to work so I’m duplicating data for now (unsustainable). Would definitely appreciate more guidance 😄 |
@jlarmstrongiv Here's a gist using the example from my project, which uses quite a few different foreignkey relations. https://gist.github.com/adamavenir/38f1785aaeb8591a2f161bb840a75e6e |
Are there any examples for |
For anyone stumbling on this later, the solution is in that other issue, and I've provided some additional questions that aren't clear to me from the docs there that might help refine them. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Summary
Gatsby has some powerful features for creating relationships between data, but each of the ones I have encountered have a real need for more thorough documentation. The docs for these features were ultimately not quite clear enough for me as an intermediate gatsby user working on my third gatsby project.
There would be tremendous value in a single guide explaining the options someone would have in using the various methods for creating relationships (the
mapping
and@link
approaches, as well as more manual ways of creating relationships), along with walkthroughs.You can see some of the confusion in #21678. The difficulty the widyakumara was having are different from the things that were hangups for me, but it was fairly clear between each of our experiences that there’s just too many assumptions baked into the docs at the present..
I still don’t even understand how to get the
mapping
feature work. (Though after getting@link
to work, I probably would have an easier time going back and figuring it out, and I also think some of the challenge might come from the added complexity of using multiple markdown+frontmatter sets, which in and of itself was a little tricky.)In summary, the following would be valuable:
mapping
and@link
featuresMotivation
As someone who has worked with a dozen different static site generators over the years, these are very valuable features which make gatsby extremely powerful.
Once we were able to figure out to use the
@link
decorator, it’s been a dream to work with and amazingly simple to use, but it took a lot of trial-and-error to get there. To me, that means there’s a pretty huge ROI for improving the docs in this area. Which is great!Draft the doc
Open a pull request
The text was updated successfully, but these errors were encountered: