Skip to content
Discussion options

You must be logged in to vote

@unonweb this is great!! The only thing that jumps out at me are that it seems like you should not have to set maxDepth: 0 — because this requires you to make that extra query from within your hook. The entire document is already present in the args, so couldn't you just strip out the irrelevant fields without querying your relationship again?

That first discussion you linked has some pretty good information, for others who stumble by. Namely, doing this will break GraphQL, and that this is really where GraphQL shines.

Thank you for this thorough example!

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by zubricks
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants