Skip to main content

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

BypassActor

Types that can represent a repository ruleset bypass actor.

Possible types for BypassActor

Claimable

An object which can have its data claimed or claim data from another.

Possible types for Claimable

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

OrganizationOrUser

Used for argument of CreateProjectV2 mutation.

Possible types for OrganizationOrUser

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

ProjectV2Actor

Possible collaborators for a project.

Possible types for ProjectV2Actor

ProjectV2FieldConfiguration

Configurations for project fields.

Possible types for ProjectV2FieldConfiguration

ProjectV2ItemContent

Types that can be inside Project Items.

Possible types for ProjectV2ItemContent

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

RuleSource

Types which can have RepositoryRule objects.

Possible types for RuleSource

Entities that can sponsor others via GitHub Sponsors.

Possible types for Sponsor

SponsorableItem

Entities that can be sponsored via GitHub Sponsors.

Possible types for SponsorableItem

SponsorsListingFeatureableItem

A record that can be featured on a GitHub Sponsors profile.

Possible types for SponsorsListingFeatureableItem

StatusCheckRollupContext

Types that can be inside a StatusCheckRollup context.

Possible types for StatusCheckRollupContext

UserListItems

Types that can be added to a user list.

Possible types for UserListItems

VerifiableDomainOwner

Types that can own a verifiable domain.

Possible types for VerifiableDomainOwner