Skip to content

Fix/recursive types #24

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

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

Conversation

lpoulier-vhs
Copy link

@lpoulier-vhs lpoulier-vhs commented Jan 10, 2024

I encountered two issues when attempting to use this plugin:

  1. The kind variable is always undefined, so no otherUsedTypes are ever processed. This is due to the resolvedType.astNode always being undefined. issue link
  2. The code would enter an infinite loop if the graphql schema contains circular references. issue link

These issues are resolved by:

  1. Implementing a workaround from this issue to get all astNode fields in the schema to be properly generated when loading the schema.
  2. Instantiate a Set to store names of input types that are already processed, add input types when they are first processed, and prevent infinite loop by skipping these if encountered more than once.

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.

1 participant