# Authoritative GitHub.com GraphQL read/write contract subset.
# The full schema is intentionally reduced to the types and fields selected by this plugin;
# tests validate every production document against this artifact.
schema {
query: Query
mutation: Mutation
}
scalar String
scalar ID
scalar Int
scalar Boolean
type Query {
repositoryOwner(login: String!): RepositoryOwner
node(id: ID!): Node
}
type Mutation {
addProjectV2DraftIssue(input: AddProjectV2DraftIssueInput!): AddProjectV2DraftIssuePayload
updateProjectV2DraftIssue(
input: UpdateProjectV2DraftIssueInput!
): UpdateProjectV2DraftIssuePayload
updateIssue(input: UpdateIssueInput!): UpdateIssuePayload
updateProjectV2ItemFieldValue(
input: UpdateProjectV2ItemFieldValueInput!
): UpdateProjectV2ItemFieldValuePayload
updateProjectV2(input: UpdateProjectV2Input!): UpdateProjectV2Payload
addBlockedBy(input: AddBlockedByInput!): AddBlockedByPayload
removeBlockedBy(input: RemoveBlockedByInput!): RemoveBlockedByPayload
}
input AddProjectV2DraftIssueInput {
projectId: ID!
title: String!
body: String
}
input UpdateProjectV2DraftIssueInput {
draftIssueId: ID!
title: String
body: String
}
input UpdateIssueInput {
id: ID!
title: String
body: String
}
input UpdateProjectV2ItemFieldValueInput {
projectId: ID!
itemId: ID!
fieldId: ID!
value: ProjectV2FieldValue!
}
input ProjectV2FieldValue {
text: String
singleSelectOptionId: String
}
input UpdateProjectV2Input {
projectId: ID!
title: String
shortDescription: String
closed: Boolean
}
input AddBlockedByInput {
issueId: ID!
blockingIssueId: ID!
}
input RemoveBlockedByInput {
issueId: ID!
blockingIssueId: ID!
}
type AddProjectV2DraftIssuePayload {
projectItem: ProjectV2Item
}
type UpdateProjectV2DraftIssuePayload {
draftIssue: DraftIssue
}
type UpdateIssuePayload {
issue: Issue
}
type UpdateProjectV2ItemFieldValuePayload {
projectV2Item: ProjectV2Item
}
type UpdateProjectV2Payload {
projectV2: ProjectV2
}
type AddBlockedByPayload {
issue: Issue
blockingIssue: Issue
}
type RemoveBlockedByPayload {
issue: Issue
blockingIssue: Issue
}
interface Node {
id: ID!
}
interface RepositoryOwner {
id: ID!
}
interface ProjectV2Owner {
projectV2(number: Int!): ProjectV2
}
type Organization implements Node & RepositoryOwner & ProjectV2Owner {
id: ID!
projectV2(number: Int!): ProjectV2
}
type User implements Node & RepositoryOwner & ProjectV2Owner {
id: ID!
projectV2(number: Int!): ProjectV2
}
type ProjectV2 implements Node {
id: ID!
title: String!
shortDescription: String
url: URI!
createdAt: DateTime!
updatedAt: DateTime!
closed: Boolean!
fields(first: Int, after: String): ProjectV2FieldConfigurationConnection!
items(first: Int, after: String): ProjectV2ItemConnection!
}
type ProjectV2FieldConfigurationConnection {
nodes: [ProjectV2FieldConfiguration]
pageInfo: PageInfo!
}
type ProjectV2Item implements Node {
id: ID!
project: ProjectV2!
fieldValues(first: Int, after: String): ProjectV2ItemFieldValueConnection!
content: ProjectV2ItemContent
}
union ProjectV2ItemContent = DraftIssue | Issue | PullRequest | RedactedProjectV2Item
union ProjectV2ItemFieldValue =
| ProjectV2ItemFieldLabelValue
| ProjectV2ItemFieldSingleSelectValue
| ProjectV2ItemFieldTextValue
union ProjectV2FieldConfiguration = ProjectV2SingleSelectField | ProjectV2Field
type ProjectV2ItemFieldValueConnection {
nodes: [ProjectV2ItemFieldValue]
pageInfo: PageInfo!
}
type ProjectV2ItemFieldSingleSelectValue {
name: String
field: ProjectV2FieldConfiguration!
}
type ProjectV2ItemFieldLabelValue {
labels(first: Int, after: String): LabelConnection!
}
type ProjectV2ItemFieldTextValue {
text: String
field: ProjectV2FieldConfiguration!
}
type ProjectV2SingleSelectField {
id: ID!
name: String!
options: [ProjectV2SingleSelectFieldOption!]!
}
type ProjectV2Field {
id: ID!
name: String!
}
type ProjectV2SingleSelectFieldOption {
id: ID!
name: String!
}
type Issue implements Node {
id: ID!
title: String!
body: String!
url: URI!
createdAt: DateTime!
updatedAt: DateTime!
state: IssueState!
repository: Repository!
labels(first: Int, after: String): LabelConnection
blockedBy(first: Int, after: String): IssueConnection!
blocking(first: Int, after: String): IssueConnection!
projectItems(first: Int, after: String): ProjectV2ItemConnection!
}
type PullRequest implements Node {
id: ID!
title: String!
body: String!
url: URI!
createdAt: DateTime!
updatedAt: DateTime!
state: PullRequestState!
repository: Repository!
labels(first: Int, after: String): LabelConnection
}
type Repository {
nameWithOwner: String!
}
type DraftIssue implements Node {
id: ID!
title: String!
body: String
createdAt: DateTime!
updatedAt: DateTime!
}
type RedactedProjectV2Item implements Node {
id: ID!
}
type Label implements Node {
id: ID!
name: String!
color: String!
}
type ProjectV2ItemConnection {
nodes: [ProjectV2Item!]
pageInfo: PageInfo!
}
type IssueConnection {
nodes: [Issue]
pageInfo: PageInfo!
}
type LabelConnection {
nodes: [Label]
pageInfo: PageInfo!
}
type PageInfo {
hasNextPage: Boolean!
endCursor: String
}
enum IssueState {
OPEN
CLOSED
}
enum PullRequestState {
OPEN
CLOSED
MERGED
}
scalar DateTime
scalar URI