Skip to content

7.1. GraphQL schema should be "hairy" - how to avoid circular references? #124

Answered by RIP21
nareshbhatia asked this question in Q&A
Discussion options

You must be logged in to vote

This is rather complicated TBH. But you should build static manual responses using plain js objects to make sure they have finite depth. And better do that statically without referring to classes or object references that, I assume MSW serialiser tries to follow references all the way to the end that never happens as it's circular and non-serialisable.

A real query will have a finite depth, and so is the response.

Replies: 1 comment

Comment options

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