-
Notifications
You must be signed in to change notification settings - Fork 995
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]: Missing documentation on relation resolvers in a service #6474
Comments
I've started on this in the tutorial here: #6465 |
@cannikin is it worth adding a section the docs/reference (in the services section) and not just the tutorial? It honestly is one of the most confusing things in services - happy to give it a go if you want to focus on the tutorial piece. |
Yep, I had planned to add a more in-depth section in the Services docs themselves. Feel free to add something if you need a break from Typescript for a while! :) |
This probably shouldn't be closed—this was referring to a more in-depth description of relation resolvers, while the intro in the tutorial is pretty minor. |
I assigned this over to you @dac09 but let me know if you change your mind! |
Summary and description
We don't really talk about how the relation resolvers generated at the bottom of a service file work.
The only mention is here: https://redwoodjs.com/docs/graphql#redwoods-resolver-args - which is useful, but not enough IMO.
What do I mean by relation resolvers?
These resolvers are invoked when a "relation" on the Post model is invoked, in this case if the query requested
Post.author.name
for example.Things we should cover:
a) use prisma includes in the main service function + check if already included in root)
b) use dataloaders
Are you interested in working on this?
The text was updated successfully, but these errors were encountered: