Singular union type is not supported for composite type with graphql_fields
#44
Labels
help wanted
Extra attention is needed
graphql_fields
#44
Describe the bug
When using a singular union type with
graphql_fields
(i.e. a field with a union type with only one sub-type within the union), the field is rendered only with the fields within the singular type, not using an... on
statement for composite types. This breaks if you're querying a composite type but only want one potential return type.To Reproduce
Steps to reproduce the behavior:
Create the following classes:
Then call
ClassB.graphql_fields()
. This renders as:Expected behavior
It should render as
The text was updated successfully, but these errors were encountered: