Skip to main content

Unions

联合是表示多个对象的对象类型。

关于并集

联合是表示多个对象的对象类型。

例如,标记为 ProjectCardItem 的字段可以是 IssuePullRequest,因为所有这些对象都可以位于一个项目卡中。 使用并集代替对象可以带来灵活性。

有关详细信息,请参阅“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

VerifiableDomainOwner

Types that can own a verifiable domain.

Possible types for VerifiableDomainOwner