Skip to main content

This version of GitHub Enterprise was discontinued on 2023-03-15. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise. For help with the upgrade, contact GitHub Enterprise support.

Unions

A union is a type of object representing many objects.

About unions

A union is a type of object representing many objects.

For example, a field marked as an ProjectCardItem could be an Issue or a 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."

Assignee

Types that can be assigned to issues.

Possible types for Assignee

AuditEntryActor

Types that can initiate an audit log event.

Possible types for AuditEntryActor

BranchActorAllowanceActor

Types which can be actors for BranchActorAllowance objects.

Possible types for BranchActorAllowanceActor

Closer

The object which triggered a ClosedEvent.

Possible types for Closer

CreatedIssueOrRestrictedContribution

Represents either a issue the viewer can access or a restricted contribution.

Possible types for CreatedIssueOrRestrictedContribution

CreatedPullRequestOrRestrictedContribution

Represents either a pull request the viewer can access or a restricted contribution.

Possible types for CreatedPullRequestOrRestrictedContribution

CreatedRepositoryOrRestrictedContribution

Represents either a repository the viewer can access or a restricted contribution.

Possible types for CreatedRepositoryOrRestrictedContribution

DeploymentReviewer

Users and teams.

Possible types for DeploymentReviewer

EnterpriseMember

An object that is a member of an enterprise.

Possible types for EnterpriseMember

IpAllowListOwner

Types that can own an IP allow list.

Possible types for IpAllowListOwner

IssueOrPullRequest

Used for return value of Repository.issueOrPullRequest.

Possible types for IssueOrPullRequest

IssueTimelineItems

An item in an issue timeline.

Possible types for IssueTimelineItems