Skip to content
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

Add option to avoid cycles #49

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mariusaarsnes
Copy link

This PR adds functionality to avoid cycles in the queries being generated in case there are cycles in the GraphQL schema definitions.

Add an optional parameter avoidCycles which when set will make generateQuery stop the recursion when encountering a child with the same name as a predecessor.

Pass along a set of Parents for each field. In the case that the name of the current field exists in the parent set, the method returns to avoid cycles

Pass along a set of Parents for each field. In the case that the name of the current field exists in the parent set, the method returns to avoid cycles
@dr3
Copy link
Contributor

dr3 commented Nov 8, 2022

@timqian What are your thoughts on a flag like this? Would be awesome to add something like this IMO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants