Skip to main content

This version of GitHub Enterprise was discontinued on 2023-07-06. 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

MilestoneItem

Types that can be inside a Milestone.

Possible types for MilestoneItem

OrgRestoreMemberAuditEntryMembership

Types of memberships that can be restored for an Organization member.

OrganizationAuditEntry

An audit entry in an organization audit log.

Possible types for OrganizationAuditEntry

PermissionGranter

Types that can grant permissions on a repository to a user.

Possible types for PermissionGranter

PinnableItem

Types that can be pinned to a profile page.

Possible types for PinnableItem

ProjectCardItem

Types that can be inside Project Cards.

Possible types for ProjectCardItem

PullRequestTimelineItems

An item in a pull request timeline.

Possible types for PullRequestTimelineItems

PushAllowanceActor

Types that can be an actor.

Possible types for PushAllowanceActor

Reactor

Types that can be assigned to reactions.

Possible types for Reactor

ReferencedSubject

Any referencable object.

Possible types for ReferencedSubject

RenamedTitleSubject

An object which has a renamable title.

Possible types for RenamedTitleSubject

RequestedReviewer

Types that can be requested reviewers.

Possible types for RequestedReviewer

ReviewDismissalAllowanceActor

Types that can be an actor.

Possible types for ReviewDismissalAllowanceActor

SearchResultItem

The results of a search.

StatusCheckRollupContext

Types that can be inside a StatusCheckRollup context.

Possible types for StatusCheckRollupContext

VerifiableDomainOwner

Types that can own a verifiable domain.

Possible types for VerifiableDomainOwner