1
0
mirror of synced 2025-12-22 03:16:52 -05:00
Files
docs/content/graphql/reference/unions.md
2021-06-24 10:21:07 -04:00

25 lines
803 B
Markdown

---
title: Unions
redirect_from:
- /v4/union
- /v4/reference/union
versions:
fpt: '*'
ghes: '*'
ghae: '*'
topics:
- API
---
## About unions
A [union](https://graphql.github.io/graphql-spec/June2018/#sec-Unions) is a type of object representing many objects.
For example, a field marked as an [`ProjectCardItem`](/graphql/reference/unions#projectcarditem) could be an [`Issue`](/graphql/reference/objects#issue) or a [`PullRequest`](/graphql/reference/objects#pullrequest) because each of those objects can be inside a project card. Using a union instead of an object gives you flexibility.
For more information, see "[Introduction to GraphQL](/graphql/guides/introduction-to-graphql)."
{% for item in graphql.schemaForCurrentVersion.unions %}
{% include graphql-union %}
{% endfor %}