Skip to content
This repository was archived by the owner on Jun 2, 2026. It is now read-only.

Handle recursive union types#457

Open
smeyffret wants to merge 1 commit into
IBM:masterfrom
smeyffret:issue-451
Open

Handle recursive union types#457
smeyffret wants to merge 1 commit into
IBM:masterfrom
smeyffret:issue-451

Conversation

@smeyffret

Copy link
Copy Markdown

checkAmbiguousMemberTypes might trigger calls to createOrReuseUnion when
fetching the fields of a given type. However, if graphQLType is not
defined yet, it will try to create it instead of returning the
previously created one. In order to reuse graphQLType without creating a
new one, we need to call checkAmbiguousMemberTypes after assigning
the graphQLType to the current definition.

Motivation: #451

Signed-off-by: Simon Meyffret smeyffret@gmail.com

checkAmbiguousMemberTypes might trigger calls to createOrReuseUnion when
fetching the fields of a given type. However, if graphQLType is not
defined yet, it will try to create it instead of returning the
previously created one. In order to reuse graphQLType without creating a
new one, we need to call checkAmbiguousMemberTypes **after** assigning
the graphQLType to the current definition.

Signed-off-by: Simon Meyffret <smeyffret@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant