Common GraphQL Unions

Last updated on June 18, 2024.

Unions are abstract GraphQL types that enable a schema field to return one of multiple object types, regardless of any common set of fields among them. These objects can, in turn, also implement other interfaces. All of a union's included types must be object types (not scalars, input types, etc.).

Customizable

Code example:

Possible Types

Reference

You may visit the following resources for more information:

Have a suggestion for this page?

Didn't quite find what you are looking for or have feedback on how we can make the content better then we would love to hear from you. Please provide us feedback and we will get back to you shortly.