You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow to use Union types both as output and input types.
How to
Union type doesn't have exact representation as input type.
Proposal suggests to represent union type as input types do next:
For every member of union type that are used as field's arg generate new multiple fields in parent object with arguments that use this member of union type. Field names will be different and arguments should not use union type name but name of the inner types. The inner types should be outputed as input types in sdl.
Proposal
Allow to use Union types both as output and input types.
How to
Union type doesn't have exact representation as input type.
Proposal suggests to represent union type as input types do next:
For every member of union type that are used as field's arg generate new multiple fields in parent object with arguments that use this member of union type. Field names will be different and arguments should not use union type name but name of the inner types. The inner types should be outputed as input types in sdl.
I.e. for
generate following sdl:
Another approaches
@oneof
directive from draft spec - but this adds additional nesting for types that should be separated by unions and it's hard to handle it.The text was updated successfully, but these errors were encountered: