From 0fbd83c393db58ec4bddeb1d15177550d436984a Mon Sep 17 00:00:00 2001 From: matthieu4294967296moineau Date: Thu, 24 Aug 2023 10:07:51 +0200 Subject: [PATCH 01/35] first version supporting subscription --- .golangci.yml | 1 + example/generated.go | 4 +- generate/convert.go | 3 - generate/generate.go | 1 - generate/operation.go.tmpl | 43 +++++- ....graphql-ComplexInlineFragments.graphql.go | 2 +- ...s.graphql-ComplexNamedFragments.graphql.go | 2 +- ...ovariantInterfaceImplementation.graphql.go | 2 +- ...omMarshal.graphql-CustomMarshal.graphql.go | 2 +- ...lice.graphql-CustomMarshalSlice.graphql.go | 2 +- ...erate-DateTime.graphql-DateTime.graphql.go | 2 +- ...nterface.graphql-EmptyInterface.graphql.go | 2 +- ...enerate-Flatten.graphql-Flatten.graphql.go | 2 +- ...tGenerate-Hasura.graphql-Hasura.graphql.go | 2 +- ...ate-InputEnum.graphql-InputEnum.graphql.go | 2 +- ...InputObject.graphql-InputObject.graphql.go | 2 +- ...ield.graphql-InterfaceListField.graphql.go | 2 +- ...nterfaceListOfListsOfListsField.graphql.go | 2 +- ...esting.graphql-InterfaceNesting.graphql.go | 2 +- ...ts.graphql-InterfaceNoFragments.graphql.go | 2 +- ...ate-ListInput.graphql-ListInput.graphql.go | 2 +- ...ists.graphql-ListOfListsOfLists.graphql.go | 2 +- ...ives.graphql-MultipleDirectives.graphql.go | 2 +- ...-MutationArgsWithCollidingNames.graphql.go | 2 +- ...ate-Omitempty.graphql-Omitempty.graphql.go | 2 +- ...erate-Pointers.graphql-Pointers.graphql.go | 2 +- ...rsInline.graphql-PointersInline.graphql.go | 2 +- ...enerate-Pokemon.graphql-Pokemon.graphql.go | 2 +- ...ithAlias.graphql-QueryWithAlias.graphql.go | 2 +- ...as.graphql-QueryWithDoubleAlias.graphql.go | 2 +- ...ithEnums.graphql-QueryWithEnums.graphql.go | 2 +- ...hSlices.graphql-QueryWithSlices.graphql.go | 2 +- ...tructs.graphql-QueryWithStructs.graphql.go | 2 +- ...ate-Recursion.graphql-Recursion.graphql.go | 2 +- ...nt.graphql-SimpleInlineFragment.graphql.go | 2 +- ...SimpleInput.graphql-SimpleInput.graphql.go | 2 +- ...Mutation.graphql-SimpleMutation.graphql.go | 2 +- ...ent.graphql-SimpleNamedFragment.graphql.go | 2 +- ...SimpleQuery.graphql-SimpleQuery.graphql.go | 2 +- ...e.graphql-SimpleQueryNoOverride.graphql.go | 2 +- ...leQueryWithPointerFalseOverride.graphql.go | 2 +- ...ructOption.graphql-StructOption.graphql.go | 2 +- ...erate-TypeName.graphql-TypeName.graphql.go | 2 +- ...ate-TypeNames.graphql-TypeNames.graphql.go | 2 +- ...gments.graphql-UnionNoFragments.graphql.go | 2 +- ...EnumTwice.graphql-UsesEnumTwice.graphql.go | 2 +- ...e-unexported.graphql-unexported.graphql.go | 2 +- ...ClientGetter-testdata-queries-generated.go | 2 +- ...ustomContext-testdata-queries-generated.go | 2 +- ...terNoContext-testdata-queries-generated.go | 2 +- ...ustomContext-testdata-queries-generated.go | 2 +- ...extWithAlias-testdata-queries-generated.go | 2 +- ...efaultConfig-testdata-queries-generated.go | 2 +- ...RawCasingAll-testdata-queries-generated.go | 2 +- ...singSpecific-testdata-queries-generated.go | 2 +- ...rtOperations-testdata-queries-generated.go | 2 +- ...g-Extensions-testdata-queries-generated.go | 2 +- ...ig-NoContext-testdata-queries-generated.go | 2 +- ...ionalGeneric-testdata-queries-generated.go | 4 +- ...ionalPointer-testdata-queries-generated.go | 8 +- ...ptionalValue-testdata-queries-generated.go | 4 +- ...kageBindings-testdata-queries-generated.go | 2 +- ...fig-PackageName-testdata-queries-myfile.go | 2 +- ...ctReferences-testdata-queries-generated.go | 4 +- ...ionalPointer-testdata-queries-generated.go | 4 +- ...ubpackage-testdata-queries-mypkg-myfile.go | 2 +- ...ageConfig-testdata-queries-mypkg-myfile.go | 2 +- go.mod | 2 +- graphql/client.go | 85 ++++++++++- graphql/websocket.go | 136 ++++++++++++++++++ internal/integration/generated.go | 30 ++-- internal/integration/roundtrip.go | 4 + 72 files changed, 346 insertions(+), 101 deletions(-) create mode 100644 graphql/websocket.go diff --git a/.golangci.yml b/.golangci.yml index 2076d4b1..4446cc4c 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -49,6 +49,7 @@ linters-settings: - golang.org/x/tools - gopkg.in/yaml.v2 - github.com/alexflint/go-arg + - github.com/gorilla/websocket forbidigo: forbid: diff --git a/example/generated.go b/example/generated.go index c13d33b5..f08d698d 100644 --- a/example/generated.go +++ b/example/generated.go @@ -69,7 +69,7 @@ func (v *getViewerViewerUser) GetMyName() string { return v.MyName } // GetCreatedAt returns getViewerViewerUser.CreatedAt, and is useful for accessing the field via an interface. func (v *getViewerViewerUser) GetCreatedAt() time.Time { return v.CreatedAt } -// The query or mutation executed by getUser. +// The query, mutation or subscription executed by getUser. const getUser_Operation = ` query getUser ($Login: String!) { user(login: $Login) { @@ -106,7 +106,7 @@ func getUser( return &data_, err_ } -// The query or mutation executed by getViewer. +// The query, mutation or subscription executed by getViewer. const getViewer_Operation = ` query getViewer { viewer { diff --git a/generate/convert.go b/generate/convert.go index 3b1f750a..d7696c95 100644 --- a/generate/convert.go +++ b/generate/convert.go @@ -80,9 +80,6 @@ func (g *generator) baseTypeForOperation(operation ast.Operation) (*ast.Definiti case ast.Mutation: return g.schema.Mutation, nil case ast.Subscription: - if !g.Config.AllowBrokenFeatures { - return nil, errorf(nil, "genqlient does not yet support subscriptions") - } return g.schema.Subscription, nil default: return nil, errorf(nil, "unexpected operation: %v", operation) diff --git a/generate/generate.go b/generate/generate.go index 22ee618d..1b416a27 100644 --- a/generate/generate.go +++ b/generate/generate.go @@ -230,7 +230,6 @@ func (g *generator) preprocessQueryDocument(doc *ast.QueryDocument) { func (g *generator) validateOperation(op *ast.OperationDefinition) error { _, err := g.baseTypeForOperation(op.Operation) if err != nil { - // (e.g. operation has subscriptions, which we don't support) return err } diff --git a/generate/operation.go.tmpl b/generate/operation.go.tmpl index a89b83c7..b17f6369 100644 --- a/generate/operation.go.tmpl +++ b/generate/operation.go.tmpl @@ -1,4 +1,4 @@ -// The query or mutation executed by {{.Name}}. +// The query, mutation or subscription executed by {{.Name}}. const {{.Name}}_Operation = `{{$.Body}}` {{.Doc}} @@ -15,7 +15,7 @@ func {{.Name}}( {{.GraphQLName}} {{.GoType.Reference}}, {{end -}} {{end -}} -) (*{{.ResponseName}}, {{if .Config.Extensions -}}map[string]interface{},{{end}} error) { +) ({{if eq .Type "subscription"}}chan {{.Name}}WsResponse{{else}}*{{.ResponseName}}{{end}}, {{if eq .Type "subscription"}}chan struct{}, chan error, {{end}}{{if .Config.Extensions -}}map[string]interface{},{{end}} error) { req_ := &graphql.Request{ OpName: "{{.Name}}", Query: {{.Name}}_Operation, @@ -38,12 +38,49 @@ func {{.Name}}( {{end}} var data_ {{.ResponseName}} resp_ := &graphql.Response{Data: &data_} + {{if eq .Type "subscription"}} + dataChan_ := make(chan {{.Name}}WsResponse, 1) + dataUpdated_ := make(chan bool, 1) + + doneChan_, errChan_, err_ := client_.DialWebSocket(ctx_, req_, resp_, dataUpdated_) + if err_ != nil { + return nil, nil, nil, err_ + } + go {{.Name}}ForwardData(dataChan_, resp_, dataUpdated_, errChan_) + {{else}} err_ = client_.MakeRequest( {{if ne .Config.ContextType "-"}}ctx_{{else}}nil{{end}}, req_, resp_, ) + {{end}} - return &data_, {{if .Config.Extensions -}}resp_.Extensions,{{end -}} err_ + return {{if eq .Type "subscription"}}dataChan_, doneChan_, errChan_{{else}}&data_{{end}}, {{if .Config.Extensions -}}resp_.Extensions,{{end -}} err_ +} + +{{if eq .Type "subscription"}} +type {{.Name}}WsResponse struct { + Data *{{.ResponseName}} + Extensions map[string]interface{} + Errors error +} + +func {{.Name}}ForwardData(dataChan_ chan {{.Name}}WsResponse, resp_ *graphql.Response, dataUpdated_ chan bool, errChan_ chan error) { + defer close(dataChan_) + for { + _, more_ := <-dataUpdated_ + if !more_ { + return + } + data_ := {{.Name}}WsResponse{ + Extensions: resp_.Extensions, + Errors: resp_.Errors, + } + if resp_.Data != nil { + data_.Data = resp_.Data.(*{{.ResponseName}}) + } + dataChan_ <- data_ + } } +{{end}} diff --git a/generate/testdata/snapshots/TestGenerate-ComplexInlineFragments.graphql-ComplexInlineFragments.graphql.go b/generate/testdata/snapshots/TestGenerate-ComplexInlineFragments.graphql-ComplexInlineFragments.graphql.go index 5cd21cd9..33ca6472 100644 --- a/generate/testdata/snapshots/TestGenerate-ComplexInlineFragments.graphql-ComplexInlineFragments.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-ComplexInlineFragments.graphql-ComplexInlineFragments.graphql.go @@ -1340,7 +1340,7 @@ func (v *ComplexInlineFragmentsRootTopic) GetSchoolGrade() string { return v.Sch // GetName returns ComplexInlineFragmentsRootTopic.Name, and is useful for accessing the field via an interface. func (v *ComplexInlineFragmentsRootTopic) GetName() string { return v.Name } -// The query or mutation executed by ComplexInlineFragments. +// The query, mutation or subscription executed by ComplexInlineFragments. const ComplexInlineFragments_Operation = ` query ComplexInlineFragments { root { diff --git a/generate/testdata/snapshots/TestGenerate-ComplexNamedFragments.graphql-ComplexNamedFragments.graphql.go b/generate/testdata/snapshots/TestGenerate-ComplexNamedFragments.graphql-ComplexNamedFragments.graphql.go index 5e7350c9..aa961e9e 100644 --- a/generate/testdata/snapshots/TestGenerate-ComplexNamedFragments.graphql-ComplexNamedFragments.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-ComplexNamedFragments.graphql-ComplexNamedFragments.graphql.go @@ -1739,7 +1739,7 @@ type VideoFieldsThumbnail struct { // GetId returns VideoFieldsThumbnail.Id, and is useful for accessing the field via an interface. func (v *VideoFieldsThumbnail) GetId() testutil.ID { return v.Id } -// The query or mutation executed by ComplexNamedFragments. +// The query, mutation or subscription executed by ComplexNamedFragments. const ComplexNamedFragments_Operation = ` query ComplexNamedFragments { ... on Query { diff --git a/generate/testdata/snapshots/TestGenerate-CovariantInterfaceImplementation.graphql-CovariantInterfaceImplementation.graphql.go b/generate/testdata/snapshots/TestGenerate-CovariantInterfaceImplementation.graphql-CovariantInterfaceImplementation.graphql.go index 74aa5774..5b57a770 100644 --- a/generate/testdata/snapshots/TestGenerate-CovariantInterfaceImplementation.graphql-CovariantInterfaceImplementation.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-CovariantInterfaceImplementation.graphql-CovariantInterfaceImplementation.graphql.go @@ -2346,7 +2346,7 @@ type TopicFieldsRelatedTopic struct { // GetId returns TopicFieldsRelatedTopic.Id, and is useful for accessing the field via an interface. func (v *TopicFieldsRelatedTopic) GetId() testutil.ID { return v.Id } -// The query or mutation executed by CovariantInterfaceImplementation. +// The query, mutation or subscription executed by CovariantInterfaceImplementation. const CovariantInterfaceImplementation_Operation = ` query CovariantInterfaceImplementation { randomItem { diff --git a/generate/testdata/snapshots/TestGenerate-CustomMarshal.graphql-CustomMarshal.graphql.go b/generate/testdata/snapshots/TestGenerate-CustomMarshal.graphql-CustomMarshal.graphql.go index 7f67c02b..22915599 100644 --- a/generate/testdata/snapshots/TestGenerate-CustomMarshal.graphql-CustomMarshal.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-CustomMarshal.graphql-CustomMarshal.graphql.go @@ -174,7 +174,7 @@ func (v *__CustomMarshalInput) __premarshalJSON() (*__premarshal__CustomMarshalI return &retval, nil } -// The query or mutation executed by CustomMarshal. +// The query, mutation or subscription executed by CustomMarshal. const CustomMarshal_Operation = ` query CustomMarshal ($date: Date!) { usersBornOn(date: $date) { diff --git a/generate/testdata/snapshots/TestGenerate-CustomMarshalSlice.graphql-CustomMarshalSlice.graphql.go b/generate/testdata/snapshots/TestGenerate-CustomMarshalSlice.graphql-CustomMarshalSlice.graphql.go index 0ed6becd..7fd51620 100644 --- a/generate/testdata/snapshots/TestGenerate-CustomMarshalSlice.graphql-CustomMarshalSlice.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-CustomMarshalSlice.graphql-CustomMarshalSlice.graphql.go @@ -203,7 +203,7 @@ func (v *__CustomMarshalSliceInput) __premarshalJSON() (*__premarshal__CustomMar return &retval, nil } -// The query or mutation executed by CustomMarshalSlice. +// The query, mutation or subscription executed by CustomMarshalSlice. const CustomMarshalSlice_Operation = ` query CustomMarshalSlice ($datesss: [[[Date!]!]!]!, $datesssp: [[[Date!]!]!]!) { acceptsListOfListOfListsOfDates(datesss: $datesss) diff --git a/generate/testdata/snapshots/TestGenerate-DateTime.graphql-DateTime.graphql.go b/generate/testdata/snapshots/TestGenerate-DateTime.graphql-DateTime.graphql.go index 3bf23904..f45812a2 100644 --- a/generate/testdata/snapshots/TestGenerate-DateTime.graphql-DateTime.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-DateTime.graphql-DateTime.graphql.go @@ -28,7 +28,7 @@ type convertTimezoneResponse struct { // GetConvert returns convertTimezoneResponse.Convert, and is useful for accessing the field via an interface. func (v *convertTimezoneResponse) GetConvert() time.Time { return v.Convert } -// The query or mutation executed by convertTimezone. +// The query, mutation or subscription executed by convertTimezone. const convertTimezone_Operation = ` query convertTimezone ($dt: DateTime!, $tz: String) { convert(dt: $dt, tz: $tz) diff --git a/generate/testdata/snapshots/TestGenerate-EmptyInterface.graphql-EmptyInterface.graphql.go b/generate/testdata/snapshots/TestGenerate-EmptyInterface.graphql-EmptyInterface.graphql.go index 95d902d3..7cc47e6b 100644 --- a/generate/testdata/snapshots/TestGenerate-EmptyInterface.graphql-EmptyInterface.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-EmptyInterface.graphql-EmptyInterface.graphql.go @@ -20,7 +20,7 @@ func (v *EmptyInterfaceResponse) GetGetComplexJunk() []map[string]*[]*map[string return v.GetComplexJunk } -// The query or mutation executed by EmptyInterface. +// The query, mutation or subscription executed by EmptyInterface. const EmptyInterface_Operation = ` query EmptyInterface { getJunk diff --git a/generate/testdata/snapshots/TestGenerate-Flatten.graphql-Flatten.graphql.go b/generate/testdata/snapshots/TestGenerate-Flatten.graphql-Flatten.graphql.go index c05e913d..24e03d40 100644 --- a/generate/testdata/snapshots/TestGenerate-Flatten.graphql-Flatten.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-Flatten.graphql-Flatten.graphql.go @@ -266,7 +266,7 @@ type VideoFieldsParentTopic struct { // GetVideoChildren returns VideoFieldsParentTopic.VideoChildren, and is useful for accessing the field via an interface. func (v *VideoFieldsParentTopic) GetVideoChildren() []ChildVideoFields { return v.VideoChildren } -// The query or mutation executed by ComplexNamedFragments. +// The query, mutation or subscription executed by ComplexNamedFragments. const ComplexNamedFragments_Operation = ` query ComplexNamedFragments { ... QueryFragment diff --git a/generate/testdata/snapshots/TestGenerate-Hasura.graphql-Hasura.graphql.go b/generate/testdata/snapshots/TestGenerate-Hasura.graphql-Hasura.graphql.go index d1dc4269..bb80690f 100644 --- a/generate/testdata/snapshots/TestGenerate-Hasura.graphql-Hasura.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-Hasura.graphql-Hasura.graphql.go @@ -81,7 +81,7 @@ type __GetPokemonInput struct { // GetWhere returns __GetPokemonInput.Where, and is useful for accessing the field via an interface. func (v *__GetPokemonInput) GetWhere() *GetPokemonBoolExp { return v.Where } -// The query or mutation executed by GetPokemon. +// The query, mutation or subscription executed by GetPokemon. const GetPokemon_Operation = ` query GetPokemon ($where: getPokemonBoolExp!) { getPokemon(where: $where) { diff --git a/generate/testdata/snapshots/TestGenerate-InputEnum.graphql-InputEnum.graphql.go b/generate/testdata/snapshots/TestGenerate-InputEnum.graphql-InputEnum.graphql.go index 49e46c3e..20d961f9 100644 --- a/generate/testdata/snapshots/TestGenerate-InputEnum.graphql-InputEnum.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-InputEnum.graphql-InputEnum.graphql.go @@ -54,7 +54,7 @@ type __InputEnumQueryInput struct { // GetRole returns __InputEnumQueryInput.Role, and is useful for accessing the field via an interface. func (v *__InputEnumQueryInput) GetRole() Role { return v.Role } -// The query or mutation executed by InputEnumQuery. +// The query, mutation or subscription executed by InputEnumQuery. const InputEnumQuery_Operation = ` query InputEnumQuery ($role: Role!) { usersWithRole(role: $role) { diff --git a/generate/testdata/snapshots/TestGenerate-InputObject.graphql-InputObject.graphql.go b/generate/testdata/snapshots/TestGenerate-InputObject.graphql-InputObject.graphql.go index 9209e04f..174e227c 100644 --- a/generate/testdata/snapshots/TestGenerate-InputObject.graphql-InputObject.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-InputObject.graphql-InputObject.graphql.go @@ -177,7 +177,7 @@ type __InputObjectQueryInput struct { // GetQuery returns __InputObjectQueryInput.Query, and is useful for accessing the field via an interface. func (v *__InputObjectQueryInput) GetQuery() UserQueryInput { return v.Query } -// The query or mutation executed by InputObjectQuery. +// The query, mutation or subscription executed by InputObjectQuery. const InputObjectQuery_Operation = ` query InputObjectQuery ($query: UserQueryInput) { user(query: $query) { diff --git a/generate/testdata/snapshots/TestGenerate-InterfaceListField.graphql-InterfaceListField.graphql.go b/generate/testdata/snapshots/TestGenerate-InterfaceListField.graphql-InterfaceListField.graphql.go index c5dcb077..57cbc34f 100644 --- a/generate/testdata/snapshots/TestGenerate-InterfaceListField.graphql-InterfaceListField.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-InterfaceListField.graphql-InterfaceListField.graphql.go @@ -520,7 +520,7 @@ func (v *InterfaceListFieldWithPointerTopicChildrenVideo) GetId() testutil.ID { // GetName returns InterfaceListFieldWithPointerTopicChildrenVideo.Name, and is useful for accessing the field via an interface. func (v *InterfaceListFieldWithPointerTopicChildrenVideo) GetName() string { return v.Name } -// The query or mutation executed by InterfaceListField. +// The query, mutation or subscription executed by InterfaceListField. const InterfaceListField_Operation = ` query InterfaceListField { root { diff --git a/generate/testdata/snapshots/TestGenerate-InterfaceListOfListsOfListsField.graphql-InterfaceListOfListsOfListsField.graphql.go b/generate/testdata/snapshots/TestGenerate-InterfaceListOfListsOfListsField.graphql-InterfaceListOfListsOfListsField.graphql.go index 2d13e431..ed9516cd 100644 --- a/generate/testdata/snapshots/TestGenerate-InterfaceListOfListsOfListsField.graphql-InterfaceListOfListsOfListsField.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-InterfaceListOfListsOfListsField.graphql-InterfaceListOfListsOfListsField.graphql.go @@ -506,7 +506,7 @@ func (v *InterfaceListOfListOfListsFieldWithPointerVideo) GetId() *testutil.ID { // GetName returns InterfaceListOfListOfListsFieldWithPointerVideo.Name, and is useful for accessing the field via an interface. func (v *InterfaceListOfListOfListsFieldWithPointerVideo) GetName() *string { return v.Name } -// The query or mutation executed by InterfaceListOfListOfListsField. +// The query, mutation or subscription executed by InterfaceListOfListOfListsField. const InterfaceListOfListOfListsField_Operation = ` query InterfaceListOfListOfListsField { listOfListsOfListsOfContent { diff --git a/generate/testdata/snapshots/TestGenerate-InterfaceNesting.graphql-InterfaceNesting.graphql.go b/generate/testdata/snapshots/TestGenerate-InterfaceNesting.graphql-InterfaceNesting.graphql.go index 5f872086..b287dff4 100644 --- a/generate/testdata/snapshots/TestGenerate-InterfaceNesting.graphql-InterfaceNesting.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-InterfaceNesting.graphql-InterfaceNesting.graphql.go @@ -504,7 +504,7 @@ func (v *InterfaceNestingRootTopicChildrenVideo) GetParent() InterfaceNestingRoo return v.Parent } -// The query or mutation executed by InterfaceNesting. +// The query, mutation or subscription executed by InterfaceNesting. const InterfaceNesting_Operation = ` query InterfaceNesting { root { diff --git a/generate/testdata/snapshots/TestGenerate-InterfaceNoFragments.graphql-InterfaceNoFragments.graphql.go b/generate/testdata/snapshots/TestGenerate-InterfaceNoFragments.graphql-InterfaceNoFragments.graphql.go index bd4c7f02..0acea26b 100644 --- a/generate/testdata/snapshots/TestGenerate-InterfaceNoFragments.graphql-InterfaceNoFragments.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-InterfaceNoFragments.graphql-InterfaceNoFragments.graphql.go @@ -626,7 +626,7 @@ func (v *InterfaceNoFragmentsQueryWithPointerVideo) GetId() *testutil.ID { retur // GetName returns InterfaceNoFragmentsQueryWithPointerVideo.Name, and is useful for accessing the field via an interface. func (v *InterfaceNoFragmentsQueryWithPointerVideo) GetName() *string { return v.Name } -// The query or mutation executed by InterfaceNoFragmentsQuery. +// The query, mutation or subscription executed by InterfaceNoFragmentsQuery. const InterfaceNoFragmentsQuery_Operation = ` query InterfaceNoFragmentsQuery { root { diff --git a/generate/testdata/snapshots/TestGenerate-ListInput.graphql-ListInput.graphql.go b/generate/testdata/snapshots/TestGenerate-ListInput.graphql-ListInput.graphql.go index 2d3dfc18..2e282545 100644 --- a/generate/testdata/snapshots/TestGenerate-ListInput.graphql-ListInput.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-ListInput.graphql-ListInput.graphql.go @@ -41,7 +41,7 @@ type __ListInputQueryInput struct { // GetNames returns __ListInputQueryInput.Names, and is useful for accessing the field via an interface. func (v *__ListInputQueryInput) GetNames() []string { return v.Names } -// The query or mutation executed by ListInputQuery. +// The query, mutation or subscription executed by ListInputQuery. const ListInputQuery_Operation = ` query ListInputQuery ($names: [String]) { user(query: {names:$names}) { diff --git a/generate/testdata/snapshots/TestGenerate-ListOfListsOfLists.graphql-ListOfListsOfLists.graphql.go b/generate/testdata/snapshots/TestGenerate-ListOfListsOfLists.graphql-ListOfListsOfLists.graphql.go index e536cf61..d76f8469 100644 --- a/generate/testdata/snapshots/TestGenerate-ListOfListsOfLists.graphql-ListOfListsOfLists.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-ListOfListsOfLists.graphql-ListOfListsOfLists.graphql.go @@ -16,7 +16,7 @@ func (v *ListOfListsOfListsResponse) GetListOfListsOfLists() [][][]string { return v.ListOfListsOfLists } -// The query or mutation executed by ListOfListsOfLists. +// The query, mutation or subscription executed by ListOfListsOfLists. const ListOfListsOfLists_Operation = ` query ListOfListsOfLists { listOfListsOfLists diff --git a/generate/testdata/snapshots/TestGenerate-MultipleDirectives.graphql-MultipleDirectives.graphql.go b/generate/testdata/snapshots/TestGenerate-MultipleDirectives.graphql-MultipleDirectives.graphql.go index 2859adec..32349980 100644 --- a/generate/testdata/snapshots/TestGenerate-MultipleDirectives.graphql-MultipleDirectives.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-MultipleDirectives.graphql-MultipleDirectives.graphql.go @@ -325,7 +325,7 @@ func (v *__MultipleDirectivesInput) GetQuery() MyInput { return v.Query } // GetQueries returns __MultipleDirectivesInput.Queries, and is useful for accessing the field via an interface. func (v *__MultipleDirectivesInput) GetQueries() []*UserQueryInput { return v.Queries } -// The query or mutation executed by MultipleDirectives. +// The query, mutation or subscription executed by MultipleDirectives. const MultipleDirectives_Operation = ` query MultipleDirectives ($query: UserQueryInput, $queries: [UserQueryInput]) { user(query: $query) { diff --git a/generate/testdata/snapshots/TestGenerate-MutationArgsWithCollidingNames.graphql-MutationArgsWithCollidingNames.graphql.go b/generate/testdata/snapshots/TestGenerate-MutationArgsWithCollidingNames.graphql-MutationArgsWithCollidingNames.graphql.go index be34cf2c..6edf917b 100644 --- a/generate/testdata/snapshots/TestGenerate-MutationArgsWithCollidingNames.graphql-MutationArgsWithCollidingNames.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-MutationArgsWithCollidingNames.graphql-MutationArgsWithCollidingNames.graphql.go @@ -51,7 +51,7 @@ func (v *__MutationArgsWithCollidingNamesInput) GetResp() int { return v.Resp } // GetClient returns __MutationArgsWithCollidingNamesInput.Client, and is useful for accessing the field via an interface. func (v *__MutationArgsWithCollidingNamesInput) GetClient() string { return v.Client } -// The query or mutation executed by MutationArgsWithCollidingNames. +// The query, mutation or subscription executed by MutationArgsWithCollidingNames. const MutationArgsWithCollidingNames_Operation = ` mutation MutationArgsWithCollidingNames ($data: String!, $req: Int, $resp: Int, $client: String) { updateUser(data: $data, req: $req, resp: $resp, client: $client) { diff --git a/generate/testdata/snapshots/TestGenerate-Omitempty.graphql-Omitempty.graphql.go b/generate/testdata/snapshots/TestGenerate-Omitempty.graphql-Omitempty.graphql.go index a0f3cf1c..25b4eab9 100644 --- a/generate/testdata/snapshots/TestGenerate-Omitempty.graphql-Omitempty.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-Omitempty.graphql-Omitempty.graphql.go @@ -219,7 +219,7 @@ func (v *__OmitEmptyQueryInput) GetTz() string { return v.Tz } // GetTzNoOmitEmpty returns __OmitEmptyQueryInput.TzNoOmitEmpty, and is useful for accessing the field via an interface. func (v *__OmitEmptyQueryInput) GetTzNoOmitEmpty() string { return v.TzNoOmitEmpty } -// The query or mutation executed by OmitEmptyQuery. +// The query, mutation or subscription executed by OmitEmptyQuery. const OmitEmptyQuery_Operation = ` query OmitEmptyQuery ($query: UserQueryInput, $queries: [UserQueryInput], $dt: DateTime, $tz: String, $tzNoOmitEmpty: String) { user(query: $query) { diff --git a/generate/testdata/snapshots/TestGenerate-Pointers.graphql-Pointers.graphql.go b/generate/testdata/snapshots/TestGenerate-Pointers.graphql-Pointers.graphql.go index 7b402734..eb755b73 100644 --- a/generate/testdata/snapshots/TestGenerate-Pointers.graphql-Pointers.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-Pointers.graphql-Pointers.graphql.go @@ -230,7 +230,7 @@ func (v *__PointersQueryInput) GetDt() time.Time { return v.Dt } // GetTz returns __PointersQueryInput.Tz, and is useful for accessing the field via an interface. func (v *__PointersQueryInput) GetTz() *string { return v.Tz } -// The query or mutation executed by PointersQuery. +// The query, mutation or subscription executed by PointersQuery. const PointersQuery_Operation = ` query PointersQuery ($query: UserQueryInput, $dt: DateTime, $tz: String) { user(query: $query) { diff --git a/generate/testdata/snapshots/TestGenerate-PointersInline.graphql-PointersInline.graphql.go b/generate/testdata/snapshots/TestGenerate-PointersInline.graphql-PointersInline.graphql.go index b365f376..7f5a3762 100644 --- a/generate/testdata/snapshots/TestGenerate-PointersInline.graphql-PointersInline.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-PointersInline.graphql-PointersInline.graphql.go @@ -227,7 +227,7 @@ func (v *__PointersQueryInput) GetDt() *time.Time { return v.Dt } // GetTz returns __PointersQueryInput.Tz, and is useful for accessing the field via an interface. func (v *__PointersQueryInput) GetTz() string { return v.Tz } -// The query or mutation executed by PointersQuery. +// The query, mutation or subscription executed by PointersQuery. const PointersQuery_Operation = ` query PointersQuery ($query: UserQueryInput, $dt: DateTime, $tz: String) { user(query: $query) { diff --git a/generate/testdata/snapshots/TestGenerate-Pokemon.graphql-Pokemon.graphql.go b/generate/testdata/snapshots/TestGenerate-Pokemon.graphql-Pokemon.graphql.go index 9f1b108d..ba9278f7 100644 --- a/generate/testdata/snapshots/TestGenerate-Pokemon.graphql-Pokemon.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-Pokemon.graphql-Pokemon.graphql.go @@ -71,7 +71,7 @@ type __GetPokemonSiblingsInput struct { // GetInput returns __GetPokemonSiblingsInput.Input, and is useful for accessing the field via an interface. func (v *__GetPokemonSiblingsInput) GetInput() testutil.Pokemon { return v.Input } -// The query or mutation executed by GetPokemonSiblings. +// The query, mutation or subscription executed by GetPokemonSiblings. const GetPokemonSiblings_Operation = ` query GetPokemonSiblings ($input: PokemonInput!) { user(query: {hasPokemon:$input}) { diff --git a/generate/testdata/snapshots/TestGenerate-QueryWithAlias.graphql-QueryWithAlias.graphql.go b/generate/testdata/snapshots/TestGenerate-QueryWithAlias.graphql-QueryWithAlias.graphql.go index 0a71a8a6..104d50f8 100644 --- a/generate/testdata/snapshots/TestGenerate-QueryWithAlias.graphql-QueryWithAlias.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-QueryWithAlias.graphql-QueryWithAlias.graphql.go @@ -40,7 +40,7 @@ func (v *QueryWithAliasUser) GetID() testutil.ID { return v.ID } // GetOtherID returns QueryWithAliasUser.OtherID, and is useful for accessing the field via an interface. func (v *QueryWithAliasUser) GetOtherID() testutil.ID { return v.OtherID } -// The query or mutation executed by QueryWithAlias. +// The query, mutation or subscription executed by QueryWithAlias. const QueryWithAlias_Operation = ` query QueryWithAlias { User: user { diff --git a/generate/testdata/snapshots/TestGenerate-QueryWithDoubleAlias.graphql-QueryWithDoubleAlias.graphql.go b/generate/testdata/snapshots/TestGenerate-QueryWithDoubleAlias.graphql-QueryWithDoubleAlias.graphql.go index f921fc5b..4f922f24 100644 --- a/generate/testdata/snapshots/TestGenerate-QueryWithDoubleAlias.graphql-QueryWithDoubleAlias.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-QueryWithDoubleAlias.graphql-QueryWithDoubleAlias.graphql.go @@ -40,7 +40,7 @@ func (v *QueryWithDoubleAliasUser) GetID() testutil.ID { return v.ID } // GetAlsoID returns QueryWithDoubleAliasUser.AlsoID, and is useful for accessing the field via an interface. func (v *QueryWithDoubleAliasUser) GetAlsoID() testutil.ID { return v.AlsoID } -// The query or mutation executed by QueryWithDoubleAlias. +// The query, mutation or subscription executed by QueryWithDoubleAlias. const QueryWithDoubleAlias_Operation = ` query QueryWithDoubleAlias { user { diff --git a/generate/testdata/snapshots/TestGenerate-QueryWithEnums.graphql-QueryWithEnums.graphql.go b/generate/testdata/snapshots/TestGenerate-QueryWithEnums.graphql-QueryWithEnums.graphql.go index b3b0a42a..86748419 100644 --- a/generate/testdata/snapshots/TestGenerate-QueryWithEnums.graphql-QueryWithEnums.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-QueryWithEnums.graphql-QueryWithEnums.graphql.go @@ -62,7 +62,7 @@ const ( RoleTeacher Role = "TEACHER" ) -// The query or mutation executed by QueryWithEnums. +// The query, mutation or subscription executed by QueryWithEnums. const QueryWithEnums_Operation = ` query QueryWithEnums { user { diff --git a/generate/testdata/snapshots/TestGenerate-QueryWithSlices.graphql-QueryWithSlices.graphql.go b/generate/testdata/snapshots/TestGenerate-QueryWithSlices.graphql-QueryWithSlices.graphql.go index 8c2b7a6c..b949c5e8 100644 --- a/generate/testdata/snapshots/TestGenerate-QueryWithSlices.graphql-QueryWithSlices.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-QueryWithSlices.graphql-QueryWithSlices.graphql.go @@ -41,7 +41,7 @@ func (v *QueryWithSlicesUser) GetEmailsWithNulls() []string { return v.EmailsWit // GetEmailsWithNullsOrNull returns QueryWithSlicesUser.EmailsWithNullsOrNull, and is useful for accessing the field via an interface. func (v *QueryWithSlicesUser) GetEmailsWithNullsOrNull() []string { return v.EmailsWithNullsOrNull } -// The query or mutation executed by QueryWithSlices. +// The query, mutation or subscription executed by QueryWithSlices. const QueryWithSlices_Operation = ` query QueryWithSlices { user { diff --git a/generate/testdata/snapshots/TestGenerate-QueryWithStructs.graphql-QueryWithStructs.graphql.go b/generate/testdata/snapshots/TestGenerate-QueryWithStructs.graphql-QueryWithStructs.graphql.go index 8146c982..5a04fa27 100644 --- a/generate/testdata/snapshots/TestGenerate-QueryWithStructs.graphql-QueryWithStructs.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-QueryWithStructs.graphql-QueryWithStructs.graphql.go @@ -43,7 +43,7 @@ func (v *QueryWithStructsUserAuthMethodsAuthMethod) GetProvider() string { retur // GetEmail returns QueryWithStructsUserAuthMethodsAuthMethod.Email, and is useful for accessing the field via an interface. func (v *QueryWithStructsUserAuthMethodsAuthMethod) GetEmail() string { return v.Email } -// The query or mutation executed by QueryWithStructs. +// The query, mutation or subscription executed by QueryWithStructs. const QueryWithStructs_Operation = ` query QueryWithStructs { user { diff --git a/generate/testdata/snapshots/TestGenerate-Recursion.graphql-Recursion.graphql.go b/generate/testdata/snapshots/TestGenerate-Recursion.graphql-Recursion.graphql.go index 9c479e0c..75f3e549 100644 --- a/generate/testdata/snapshots/TestGenerate-Recursion.graphql-Recursion.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-Recursion.graphql-Recursion.graphql.go @@ -68,7 +68,7 @@ type __RecursionInput struct { // GetInput returns __RecursionInput.Input, and is useful for accessing the field via an interface. func (v *__RecursionInput) GetInput() RecursiveInput { return v.Input } -// The query or mutation executed by Recursion. +// The query, mutation or subscription executed by Recursion. const Recursion_Operation = ` query Recursion ($input: RecursiveInput!) { recur(input: $input) { diff --git a/generate/testdata/snapshots/TestGenerate-SimpleInlineFragment.graphql-SimpleInlineFragment.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleInlineFragment.graphql-SimpleInlineFragment.graphql.go index 0d3fb543..c832529c 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleInlineFragment.graphql-SimpleInlineFragment.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleInlineFragment.graphql-SimpleInlineFragment.graphql.go @@ -239,7 +239,7 @@ func (v *SimpleInlineFragmentResponse) __premarshalJSON() (*__premarshalSimpleIn return &retval, nil } -// The query or mutation executed by SimpleInlineFragment. +// The query, mutation or subscription executed by SimpleInlineFragment. const SimpleInlineFragment_Operation = ` query SimpleInlineFragment { randomItem { diff --git a/generate/testdata/snapshots/TestGenerate-SimpleInput.graphql-SimpleInput.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleInput.graphql-SimpleInput.graphql.go index f6e475ef..ec92b37e 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleInput.graphql-SimpleInput.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleInput.graphql-SimpleInput.graphql.go @@ -41,7 +41,7 @@ type __SimpleInputQueryInput struct { // GetName returns __SimpleInputQueryInput.Name, and is useful for accessing the field via an interface. func (v *__SimpleInputQueryInput) GetName() string { return v.Name } -// The query or mutation executed by SimpleInputQuery. +// The query, mutation or subscription executed by SimpleInputQuery. const SimpleInputQuery_Operation = ` query SimpleInputQuery ($name: String!) { user(query: {name:$name}) { diff --git a/generate/testdata/snapshots/TestGenerate-SimpleMutation.graphql-SimpleMutation.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleMutation.graphql-SimpleMutation.graphql.go index f87244ca..08e09e09 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleMutation.graphql-SimpleMutation.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleMutation.graphql-SimpleMutation.graphql.go @@ -41,7 +41,7 @@ type __SimpleMutationInput struct { // GetName returns __SimpleMutationInput.Name, and is useful for accessing the field via an interface. func (v *__SimpleMutationInput) GetName() string { return v.Name } -// The query or mutation executed by SimpleMutation. +// The query, mutation or subscription executed by SimpleMutation. const SimpleMutation_Operation = ` mutation SimpleMutation ($name: String!) { createUser(name: $name) { diff --git a/generate/testdata/snapshots/TestGenerate-SimpleNamedFragment.graphql-SimpleNamedFragment.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleNamedFragment.graphql-SimpleNamedFragment.graphql.go index c0ee3322..01bfe779 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleNamedFragment.graphql-SimpleNamedFragment.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleNamedFragment.graphql-SimpleNamedFragment.graphql.go @@ -546,7 +546,7 @@ type VideoFieldsThumbnail struct { // GetId returns VideoFieldsThumbnail.Id, and is useful for accessing the field via an interface. func (v *VideoFieldsThumbnail) GetId() testutil.ID { return v.Id } -// The query or mutation executed by SimpleNamedFragment. +// The query, mutation or subscription executed by SimpleNamedFragment. const SimpleNamedFragment_Operation = ` query SimpleNamedFragment { randomItem { diff --git a/generate/testdata/snapshots/TestGenerate-SimpleQuery.graphql-SimpleQuery.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleQuery.graphql-SimpleQuery.graphql.go index ddb81cfa..3069c18a 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleQuery.graphql-SimpleQuery.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleQuery.graphql-SimpleQuery.graphql.go @@ -33,7 +33,7 @@ type SimpleQueryUser struct { // GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface. func (v *SimpleQueryUser) GetId() testutil.ID { return v.Id } -// The query or mutation executed by SimpleQuery. +// The query, mutation or subscription executed by SimpleQuery. const SimpleQuery_Operation = ` query SimpleQuery { user { diff --git a/generate/testdata/snapshots/TestGenerate-SimpleQueryNoOverride.graphql-SimpleQueryNoOverride.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleQueryNoOverride.graphql-SimpleQueryNoOverride.graphql.go index 64581688..3470be45 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleQueryNoOverride.graphql-SimpleQueryNoOverride.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleQueryNoOverride.graphql-SimpleQueryNoOverride.graphql.go @@ -37,7 +37,7 @@ func (v *SimpleQueryNoOverrideUser) GetId() testutil.ID { return v.Id } // GetName returns SimpleQueryNoOverrideUser.Name, and is useful for accessing the field via an interface. func (v *SimpleQueryNoOverrideUser) GetName() string { return v.Name } -// The query or mutation executed by SimpleQueryNoOverride. +// The query, mutation or subscription executed by SimpleQueryNoOverride. const SimpleQueryNoOverride_Operation = ` query SimpleQueryNoOverride { user { diff --git a/generate/testdata/snapshots/TestGenerate-SimpleQueryWithPointerFalseOverride.graphql-SimpleQueryWithPointerFalseOverride.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleQueryWithPointerFalseOverride.graphql-SimpleQueryWithPointerFalseOverride.graphql.go index 6c26ddb0..292d17a3 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleQueryWithPointerFalseOverride.graphql-SimpleQueryWithPointerFalseOverride.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleQueryWithPointerFalseOverride.graphql-SimpleQueryWithPointerFalseOverride.graphql.go @@ -39,7 +39,7 @@ func (v *SimpleQueryWithPointerFalseOverrideUser) GetId() testutil.ID { return v // GetName returns SimpleQueryWithPointerFalseOverrideUser.Name, and is useful for accessing the field via an interface. func (v *SimpleQueryWithPointerFalseOverrideUser) GetName() string { return v.Name } -// The query or mutation executed by SimpleQueryWithPointerFalseOverride. +// The query, mutation or subscription executed by SimpleQueryWithPointerFalseOverride. const SimpleQueryWithPointerFalseOverride_Operation = ` query SimpleQueryWithPointerFalseOverride { user { diff --git a/generate/testdata/snapshots/TestGenerate-StructOption.graphql-StructOption.graphql.go b/generate/testdata/snapshots/TestGenerate-StructOption.graphql-StructOption.graphql.go index 55e0bfdd..63836c02 100644 --- a/generate/testdata/snapshots/TestGenerate-StructOption.graphql-StructOption.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-StructOption.graphql-StructOption.graphql.go @@ -424,7 +424,7 @@ type VideoFields struct { // GetDuration returns VideoFields.Duration, and is useful for accessing the field via an interface. func (v *VideoFields) GetDuration() int { return v.Duration } -// The query or mutation executed by StructOption. +// The query, mutation or subscription executed by StructOption. const StructOption_Operation = ` query StructOption { root { diff --git a/generate/testdata/snapshots/TestGenerate-TypeName.graphql-TypeName.graphql.go b/generate/testdata/snapshots/TestGenerate-TypeName.graphql-TypeName.graphql.go index af67320a..f967d81d 100644 --- a/generate/testdata/snapshots/TestGenerate-TypeName.graphql-TypeName.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-TypeName.graphql-TypeName.graphql.go @@ -37,7 +37,7 @@ func (v *TypeNameQueryUser) GetTypename() string { return v.Typename } // GetId returns TypeNameQueryUser.Id, and is useful for accessing the field via an interface. func (v *TypeNameQueryUser) GetId() testutil.ID { return v.Id } -// The query or mutation executed by TypeNameQuery. +// The query, mutation or subscription executed by TypeNameQuery. const TypeNameQuery_Operation = ` query TypeNameQuery { user { diff --git a/generate/testdata/snapshots/TestGenerate-TypeNames.graphql-TypeNames.graphql.go b/generate/testdata/snapshots/TestGenerate-TypeNames.graphql-TypeNames.graphql.go index 04bcec44..34e0fed2 100644 --- a/generate/testdata/snapshots/TestGenerate-TypeNames.graphql-TypeNames.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-TypeNames.graphql-TypeNames.graphql.go @@ -264,7 +264,7 @@ func (v *User) GetId() testutil.ID { return v.Id } // GetName returns User.Name, and is useful for accessing the field via an interface. func (v *User) GetName() string { return v.Name } -// The query or mutation executed by TypeNames. +// The query, mutation or subscription executed by TypeNames. const TypeNames_Operation = ` query TypeNames { user { diff --git a/generate/testdata/snapshots/TestGenerate-UnionNoFragments.graphql-UnionNoFragments.graphql.go b/generate/testdata/snapshots/TestGenerate-UnionNoFragments.graphql-UnionNoFragments.graphql.go index d52f31ae..dd123b3b 100644 --- a/generate/testdata/snapshots/TestGenerate-UnionNoFragments.graphql-UnionNoFragments.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-UnionNoFragments.graphql-UnionNoFragments.graphql.go @@ -174,7 +174,7 @@ func (v *UnionNoFragmentsQueryResponse) __premarshalJSON() (*__premarshalUnionNo return &retval, nil } -// The query or mutation executed by UnionNoFragmentsQuery. +// The query, mutation or subscription executed by UnionNoFragmentsQuery. const UnionNoFragmentsQuery_Operation = ` query UnionNoFragmentsQuery { randomLeaf { diff --git a/generate/testdata/snapshots/TestGenerate-UsesEnumTwice.graphql-UsesEnumTwice.graphql.go b/generate/testdata/snapshots/TestGenerate-UsesEnumTwice.graphql-UsesEnumTwice.graphql.go index 69c2113e..88519924 100644 --- a/generate/testdata/snapshots/TestGenerate-UsesEnumTwice.graphql-UsesEnumTwice.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-UsesEnumTwice.graphql-UsesEnumTwice.graphql.go @@ -62,7 +62,7 @@ func (v *UsesEnumTwiceQueryResponse) GetMe() UsesEnumTwiceQueryMeUser { return v // GetOtherUser returns UsesEnumTwiceQueryResponse.OtherUser, and is useful for accessing the field via an interface. func (v *UsesEnumTwiceQueryResponse) GetOtherUser() UsesEnumTwiceQueryOtherUser { return v.OtherUser } -// The query or mutation executed by UsesEnumTwiceQuery. +// The query, mutation or subscription executed by UsesEnumTwiceQuery. const UsesEnumTwiceQuery_Operation = ` query UsesEnumTwiceQuery { Me: user { diff --git a/generate/testdata/snapshots/TestGenerate-unexported.graphql-unexported.graphql.go b/generate/testdata/snapshots/TestGenerate-unexported.graphql-unexported.graphql.go index f3e1f54a..dfaf60af 100644 --- a/generate/testdata/snapshots/TestGenerate-unexported.graphql-unexported.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-unexported.graphql-unexported.graphql.go @@ -177,7 +177,7 @@ type unexportedUser struct { // GetId returns unexportedUser.Id, and is useful for accessing the field via an interface. func (v *unexportedUser) GetId() testutil.ID { return v.Id } -// The query or mutation executed by unexported. +// The query, mutation or subscription executed by unexported. const unexported_Operation = ` query unexported ($query: UserQueryInput) { user(query: $query) { diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetter-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetter-testdata-queries-generated.go index 4ef93ec9..0711819e 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetter-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetter-testdata-queries-generated.go @@ -35,7 +35,7 @@ type SimpleQueryUser struct { // GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface. func (v *SimpleQueryUser) GetId() string { return v.Id } -// The query or mutation executed by SimpleQuery. +// The query, mutation or subscription executed by SimpleQuery. const SimpleQuery_Operation = ` query SimpleQuery { user { diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterCustomContext-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterCustomContext-testdata-queries-generated.go index 2a16c728..8e8556ad 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterCustomContext-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterCustomContext-testdata-queries-generated.go @@ -38,7 +38,7 @@ type SimpleQueryUser struct { // GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface. func (v *SimpleQueryUser) GetId() string { return v.Id } -// The query or mutation executed by SimpleQuery. +// The query, mutation or subscription executed by SimpleQuery. const SimpleQuery_Operation = ` query SimpleQuery { user { diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterNoContext-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterNoContext-testdata-queries-generated.go index a34cf8d1..114d7fe7 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterNoContext-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterNoContext-testdata-queries-generated.go @@ -33,7 +33,7 @@ type SimpleQueryUser struct { // GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface. func (v *SimpleQueryUser) GetId() string { return v.Id } -// The query or mutation executed by SimpleQuery. +// The query, mutation or subscription executed by SimpleQuery. const SimpleQuery_Operation = ` query SimpleQuery { user { diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-CustomContext-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-CustomContext-testdata-queries-generated.go index e9618132..1ab82fc5 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-CustomContext-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-CustomContext-testdata-queries-generated.go @@ -38,7 +38,7 @@ type SimpleQueryUser struct { // GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface. func (v *SimpleQueryUser) GetId() string { return v.Id } -// The query or mutation executed by SimpleQuery. +// The query, mutation or subscription executed by SimpleQuery. const SimpleQuery_Operation = ` query SimpleQuery { user { diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-CustomContextWithAlias-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-CustomContextWithAlias-testdata-queries-generated.go index a6d2535a..e7ce02d1 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-CustomContextWithAlias-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-CustomContextWithAlias-testdata-queries-generated.go @@ -38,7 +38,7 @@ type SimpleQueryUser struct { // GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface. func (v *SimpleQueryUser) GetId() string { return v.Id } -// The query or mutation executed by SimpleQuery. +// The query, mutation or subscription executed by SimpleQuery. const SimpleQuery_Operation = ` query SimpleQuery { user { diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-DefaultConfig-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-DefaultConfig-testdata-queries-generated.go index 2a18a3b9..045edae9 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-DefaultConfig-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-DefaultConfig-testdata-queries-generated.go @@ -34,7 +34,7 @@ type SimpleQueryUser struct { // GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface. func (v *SimpleQueryUser) GetId() string { return v.Id } -// The query or mutation executed by SimpleQuery. +// The query, mutation or subscription executed by SimpleQuery. const SimpleQuery_Operation = ` query SimpleQuery { user { diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingAll-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingAll-testdata-queries-generated.go index 3d296e52..92f7134e 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingAll-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingAll-testdata-queries-generated.go @@ -64,7 +64,7 @@ const ( Role_TEACHER Role = "TEACHER" ) -// The query or mutation executed by QueryWithEnums. +// The query, mutation or subscription executed by QueryWithEnums. const QueryWithEnums_Operation = ` query QueryWithEnums { user { diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingSpecific-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingSpecific-testdata-queries-generated.go index 3d296e52..92f7134e 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingSpecific-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingSpecific-testdata-queries-generated.go @@ -64,7 +64,7 @@ const ( Role_TEACHER Role = "TEACHER" ) -// The query or mutation executed by QueryWithEnums. +// The query, mutation or subscription executed by QueryWithEnums. const QueryWithEnums_Operation = ` query QueryWithEnums { user { diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-ExportOperations-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-ExportOperations-testdata-queries-generated.go index 2a18a3b9..045edae9 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-ExportOperations-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-ExportOperations-testdata-queries-generated.go @@ -34,7 +34,7 @@ type SimpleQueryUser struct { // GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface. func (v *SimpleQueryUser) GetId() string { return v.Id } -// The query or mutation executed by SimpleQuery. +// The query, mutation or subscription executed by SimpleQuery. const SimpleQuery_Operation = ` query SimpleQuery { user { diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-Extensions-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-Extensions-testdata-queries-generated.go index da4a5d05..919b04ab 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-Extensions-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-Extensions-testdata-queries-generated.go @@ -34,7 +34,7 @@ type SimpleQueryUser struct { // GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface. func (v *SimpleQueryUser) GetId() string { return v.Id } -// The query or mutation executed by SimpleQuery. +// The query, mutation or subscription executed by SimpleQuery. const SimpleQuery_Operation = ` query SimpleQuery { user { diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-NoContext-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-NoContext-testdata-queries-generated.go index 01005a7f..8e74f4f6 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-NoContext-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-NoContext-testdata-queries-generated.go @@ -32,7 +32,7 @@ type SimpleQueryUser struct { // GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface. func (v *SimpleQueryUser) GetId() string { return v.Id } -// The query or mutation executed by SimpleQuery. +// The query, mutation or subscription executed by SimpleQuery. const SimpleQuery_Operation = ` query SimpleQuery { user { diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalGeneric-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalGeneric-testdata-queries-generated.go index 5d7d29cf..066eaa3c 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalGeneric-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalGeneric-testdata-queries-generated.go @@ -82,7 +82,7 @@ type __ListInputQueryInput struct { // GetNames returns __ListInputQueryInput.Names, and is useful for accessing the field via an interface. func (v *__ListInputQueryInput) GetNames() []testutil.Option[string] { return v.Names } -// The query or mutation executed by ListInputQuery. +// The query, mutation or subscription executed by ListInputQuery. const ListInputQuery_Operation = ` query ListInputQuery ($names: [String]) { user(query: {names:$names}) { @@ -117,7 +117,7 @@ func ListInputQuery( return &data_, err_ } -// The query or mutation executed by QueryWithSlices. +// The query, mutation or subscription executed by QueryWithSlices. const QueryWithSlices_Operation = ` query QueryWithSlices { user { diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointer-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointer-testdata-queries-generated.go index 781bc540..2935cfac 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointer-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointer-testdata-queries-generated.go @@ -139,7 +139,7 @@ type __ListInputQueryInput struct { // GetNames returns __ListInputQueryInput.Names, and is useful for accessing the field via an interface. func (v *__ListInputQueryInput) GetNames() []*string { return v.Names } -// The query or mutation executed by ListInputQuery. +// The query, mutation or subscription executed by ListInputQuery. const ListInputQuery_Operation = ` query ListInputQuery ($names: [String]) { user(query: {names:$names}) { @@ -174,7 +174,7 @@ func ListInputQuery( return &data_, err_ } -// The query or mutation executed by QueryWithSlices. +// The query, mutation or subscription executed by QueryWithSlices. const QueryWithSlices_Operation = ` query QueryWithSlices { user { @@ -208,7 +208,7 @@ func QueryWithSlices( return &data_, err_ } -// The query or mutation executed by SimpleQueryNoOverride. +// The query, mutation or subscription executed by SimpleQueryNoOverride. const SimpleQueryNoOverride_Operation = ` query SimpleQueryNoOverride { user { @@ -240,7 +240,7 @@ func SimpleQueryNoOverride( return &data_, err_ } -// The query or mutation executed by SimpleQueryWithPointerFalseOverride. +// The query, mutation or subscription executed by SimpleQueryWithPointerFalseOverride. const SimpleQueryWithPointerFalseOverride_Operation = ` query SimpleQueryWithPointerFalseOverride { user { diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalValue-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalValue-testdata-queries-generated.go index 82416cda..2f87f5b8 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalValue-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalValue-testdata-queries-generated.go @@ -77,7 +77,7 @@ type __ListInputQueryInput struct { // GetNames returns __ListInputQueryInput.Names, and is useful for accessing the field via an interface. func (v *__ListInputQueryInput) GetNames() []string { return v.Names } -// The query or mutation executed by ListInputQuery. +// The query, mutation or subscription executed by ListInputQuery. const ListInputQuery_Operation = ` query ListInputQuery ($names: [String]) { user(query: {names:$names}) { @@ -112,7 +112,7 @@ func ListInputQuery( return &data_, err_ } -// The query or mutation executed by QueryWithSlices. +// The query, mutation or subscription executed by QueryWithSlices. const QueryWithSlices_Operation = ` query QueryWithSlices { user { diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-PackageBindings-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-PackageBindings-testdata-queries-generated.go index 9340d5e6..fe24616f 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-PackageBindings-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-PackageBindings-testdata-queries-generated.go @@ -35,7 +35,7 @@ type SimpleQueryUser struct { // GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface. func (v *SimpleQueryUser) GetId() testutil.ID { return v.Id } -// The query or mutation executed by SimpleQuery. +// The query, mutation or subscription executed by SimpleQuery. const SimpleQuery_Operation = ` query SimpleQuery { user { diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-PackageName-testdata-queries-myfile.go b/generate/testdata/snapshots/TestGenerateWithConfig-PackageName-testdata-queries-myfile.go index 4d382768..61f31c2c 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-PackageName-testdata-queries-myfile.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-PackageName-testdata-queries-myfile.go @@ -34,7 +34,7 @@ type SimpleQueryUser struct { // GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface. func (v *SimpleQueryUser) GetId() string { return v.Id } -// The query or mutation executed by SimpleQuery. +// The query, mutation or subscription executed by SimpleQuery. const SimpleQuery_Operation = ` query SimpleQuery { user { diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-StructReferences-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-StructReferences-testdata-queries-generated.go index 8365a6f5..7ccb0f66 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-StructReferences-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-StructReferences-testdata-queries-generated.go @@ -226,7 +226,7 @@ type __InputObjectQueryInput struct { // GetQuery returns __InputObjectQueryInput.Query, and is useful for accessing the field via an interface. func (v *__InputObjectQueryInput) GetQuery() *UserQueryInput { return v.Query } -// The query or mutation executed by InputObjectQuery. +// The query, mutation or subscription executed by InputObjectQuery. const InputObjectQuery_Operation = ` query InputObjectQuery ($query: UserQueryInput) { user(query: $query) { @@ -261,7 +261,7 @@ func InputObjectQuery( return &data_, err_ } -// The query or mutation executed by QueryWithStructs. +// The query, mutation or subscription executed by QueryWithStructs. const QueryWithStructs_Operation = ` query QueryWithStructs { user { diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-StructReferencesAndOptionalPointer-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-StructReferencesAndOptionalPointer-testdata-queries-generated.go index 61c785f9..3224391a 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-StructReferencesAndOptionalPointer-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-StructReferencesAndOptionalPointer-testdata-queries-generated.go @@ -229,7 +229,7 @@ type __InputObjectQueryInput struct { // GetQuery returns __InputObjectQueryInput.Query, and is useful for accessing the field via an interface. func (v *__InputObjectQueryInput) GetQuery() *UserQueryInput { return v.Query } -// The query or mutation executed by InputObjectQuery. +// The query, mutation or subscription executed by InputObjectQuery. const InputObjectQuery_Operation = ` query InputObjectQuery ($query: UserQueryInput) { user(query: $query) { @@ -264,7 +264,7 @@ func InputObjectQuery( return &data_, err_ } -// The query or mutation executed by QueryWithStructs. +// The query, mutation or subscription executed by QueryWithStructs. const QueryWithStructs_Operation = ` query QueryWithStructs { user { diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-Subpackage-testdata-queries-mypkg-myfile.go b/generate/testdata/snapshots/TestGenerateWithConfig-Subpackage-testdata-queries-mypkg-myfile.go index 4d382768..61f31c2c 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-Subpackage-testdata-queries-mypkg-myfile.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-Subpackage-testdata-queries-mypkg-myfile.go @@ -34,7 +34,7 @@ type SimpleQueryUser struct { // GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface. func (v *SimpleQueryUser) GetId() string { return v.Id } -// The query or mutation executed by SimpleQuery. +// The query, mutation or subscription executed by SimpleQuery. const SimpleQuery_Operation = ` query SimpleQuery { user { diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-SubpackageConfig-testdata-queries-mypkg-myfile.go b/generate/testdata/snapshots/TestGenerateWithConfig-SubpackageConfig-testdata-queries-mypkg-myfile.go index 4d382768..61f31c2c 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-SubpackageConfig-testdata-queries-mypkg-myfile.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-SubpackageConfig-testdata-queries-mypkg-myfile.go @@ -34,7 +34,7 @@ type SimpleQueryUser struct { // GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface. func (v *SimpleQueryUser) GetId() string { return v.Id } -// The query or mutation executed by SimpleQuery. +// The query, mutation or subscription executed by SimpleQuery. const SimpleQuery_Operation = ` query SimpleQuery { user { diff --git a/go.mod b/go.mod index bac27203..6fe9424c 100644 --- a/go.mod +++ b/go.mod @@ -6,6 +6,7 @@ require ( github.com/99designs/gqlgen v0.17.35 github.com/alexflint/go-arg v1.4.2 github.com/bradleyjkemp/cupaloy/v2 v2.6.0 + github.com/gorilla/websocket v1.5.0 github.com/stretchr/testify v1.8.2 github.com/vektah/gqlparser/v2 v2.5.8 golang.org/x/tools v0.9.3 @@ -16,7 +17,6 @@ require ( github.com/agnivade/levenshtein v1.1.1 // indirect github.com/alexflint/go-scalar v1.0.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/gorilla/websocket v1.5.0 // indirect github.com/hashicorp/golang-lru/v2 v2.0.3 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect diff --git a/graphql/client.go b/graphql/client.go index 469e3c04..38930309 100644 --- a/graphql/client.go +++ b/graphql/client.go @@ -11,6 +11,7 @@ import ( "net/url" "strings" + "github.com/gorilla/websocket" "github.com/vektah/gqlparser/v2/gqlerror" ) @@ -38,12 +39,25 @@ type Client interface { req *Request, resp *Response, ) error + + DialWebSocket( + ctx context.Context, + req *Request, + resp *Response, + dataUpdated chan bool, + ) (done chan struct{}, errChan chan error, err error) +} + +type WebSocketClient struct { + Dialer Dialer + Header http.Header } type client struct { - httpClient Doer - endpoint string - method string + httpClient Doer + webSocketClient WebSocketClient + endpoint string + method string } // NewClient returns a [Client] which makes requests to the given endpoint, @@ -59,7 +73,7 @@ type client struct { // // [example/main.go]: https://github.com/Khan/genqlient/blob/main/example/main.go#L12-L20 func NewClient(endpoint string, httpClient Doer) Client { - return newClient(endpoint, httpClient, http.MethodPost) + return newClient(endpoint, httpClient, http.MethodPost, WebSocketClient{}) } // NewClientUsingGet returns a [Client] which makes GET requests to the given @@ -80,14 +94,19 @@ func NewClient(endpoint string, httpClient Doer) Client { // // [example/main.go]: https://github.com/Khan/genqlient/blob/main/example/main.go#L12-L20 func NewClientUsingGet(endpoint string, httpClient Doer) Client { - return newClient(endpoint, httpClient, http.MethodGet) + return newClient(endpoint, httpClient, http.MethodGet, WebSocketClient{}) } -func newClient(endpoint string, httpClient Doer, method string) Client { +func NewClientUsingWebSocket(endpoint string, webSocketClient WebSocketClient) Client { + webSocketClient.Header.Add("Sec-WebSocket-Protocol", "graphql-transport-ws") + return newClient(endpoint, nil, "", webSocketClient) +} + +func newClient(endpoint string, httpClient Doer, method string, webSocketClient WebSocketClient) Client { if httpClient == nil || httpClient == (*http.Client)(nil) { httpClient = http.DefaultClient } - return &client{httpClient, endpoint, method} + return &client{httpClient, webSocketClient, endpoint, method} } // Doer encapsulates the methods from [*http.Client] needed by [Client]. @@ -97,6 +116,10 @@ type Doer interface { Do(*http.Request) (*http.Response, error) } +type Dialer interface { + DialContext(ctx context.Context, urlStr string, requestHeader http.Header) (*websocket.Conn, *http.Response, error) +} + // Request contains all the values required to build queries executed by // the [Client]. // @@ -177,6 +200,54 @@ func (c *client) MakeRequest(ctx context.Context, req *Request, resp *Response) return nil } +func (c *client) DialWebSocket(ctx context.Context, req *Request, resp *Response, dataUpdated chan bool) (done chan struct{}, errChan chan error, err error) { + done = make(chan struct{}, 1) + errChan = make(chan error, 1) + startedWithError := make(chan error, 1) + + go c.webSocketSubscriptionRoutine( + ctx, + req, + resp, + dataUpdated, + startedWithError, + errChan, + done, + ) + err = <-startedWithError + close(startedWithError) + + return done, errChan, err +} + +func (c *client) webSocketSubscriptionRoutine(ctx context.Context, req *Request, resp *Response, dataUpdated chan bool, startedWithError chan error, errChan chan error, done chan struct{}) { + conn, res, err := c.webSocketClient.Dialer.DialContext(ctx, c.endpoint, c.webSocketClient.Header) + if err != nil { + startedWithError <- err + close(done) + return + } + defer res.Body.Close() + defer conn.Close() + + go listenWebSocket(conn, resp, dataUpdated, errChan, done) + + err = sendInit(conn) + if err != nil { + startedWithError <- err + return + } + err = sendSubscribe(conn, req) + if err != nil { + startedWithError <- err + return + } + + startedWithError <- nil + + waitToEndWebSocket(conn, errChan, done) +} + func (c *client) createPostRequest(req *Request) (*http.Request, error) { body, err := json.Marshal(req) if err != nil { diff --git a/graphql/websocket.go b/graphql/websocket.go new file mode 100644 index 00000000..d835c3a4 --- /dev/null +++ b/graphql/websocket.go @@ -0,0 +1,136 @@ +package graphql + +import ( + "encoding/json" + + "github.com/gorilla/websocket" +) + +const ( + webSocketTypeConnInit = "connection_init" + webSocketTypeConnAck = "connection_ack" + webSocketTypeSubscribe = "subscribe" + webSocketTypeNext = "next" + webSocketTypeError = "error" + webSocketTypeComplete = "complete" +) + +type webSocketSendMessage struct { + Payload *Request `json:"payload"` + Type string `json:"type"` +} + +type webSocketReceiveMessage struct { + Type string `json:"type"` + Payload json.RawMessage `json:"payload"` +} + +func sendInit(conn *websocket.Conn) error { + connInit := webSocketSendMessage{ + Type: webSocketTypeConnInit, + } + return sendStructAsJSON(conn, connInit) +} + +func sendSubscribe(conn *websocket.Conn, req *Request) error { + subscription := webSocketSendMessage{ + Type: webSocketTypeSubscribe, + Payload: req, + } + return sendStructAsJSON(conn, subscription) +} + +func sendComplete(conn *websocket.Conn) error { + complete := webSocketSendMessage{ + Type: webSocketTypeComplete, + } + return sendStructAsJSON(conn, complete) +} + +func sendStructAsJSON(conn *websocket.Conn, object any) error { + jsonBytes, err := json.Marshal(object) + if err != nil { + return err + } + return conn.WriteMessage(websocket.TextMessage, jsonBytes) +} + +func listenWebSocket(conn *websocket.Conn, resp *Response, dataUpdated chan bool, errChan chan error, done chan struct{}) { + var connAckReceived bool + var err error + defer endListenWebSocket(dataUpdated, errChan, done, err) + for !connAckReceived { + connAckReceived, err = receiveWebSocketConnAck(conn) + if err != nil { + errChan <- err + return + } + } + for { + _, message, err := conn.ReadMessage() + if err != nil { + errChan <- err + return + } + err = forwardWebSocketData(resp, dataUpdated, message) + if err != nil { + errChan <- err + return + } + } +} + +func endListenWebSocket(dataUpdated chan bool, errChan chan error, done chan struct{}, err error) { + errChan <- err + close(dataUpdated) + close(errChan) + close(done) +} + +func receiveWebSocketConnAck(conn *websocket.Conn) (bool, error) { + _, message, err := conn.ReadMessage() + if err != nil { + return false, err + } + return checkConnectionAckReceived(message) +} + +func checkConnectionAckReceived(message []byte) (bool, error) { + wsMessage := &webSocketSendMessage{} + err := json.Unmarshal(message, wsMessage) + if err != nil { + return false, err + } + return wsMessage.Type == webSocketTypeConnAck, nil +} + +func forwardWebSocketData(resp *Response, dataUpdated chan bool, message []byte) error { + var wsMsg webSocketReceiveMessage + err := json.Unmarshal(message, &wsMsg) + if err != nil { + return err + } + switch wsMsg.Type { + case webSocketTypeNext, webSocketTypeError: + err = json.Unmarshal(wsMsg.Payload, resp) + if err != nil { + return err + } + dataUpdated <- true + default: + } + return nil +} + +func waitToEndWebSocket(conn *websocket.Conn, errChan chan error, done chan struct{}) { + <-done + err := sendComplete(conn) + if err != nil { + errChan <- err + } + err = conn.WriteMessage(websocket.CloseMessage, websocket.FormatCloseMessage(websocket.CloseNormalClosure, "")) + if err != nil { + errChan <- err + return + } +} diff --git a/internal/integration/generated.go b/internal/integration/generated.go index 1f0e079d..bf9381c2 100644 --- a/internal/integration/generated.go +++ b/internal/integration/generated.go @@ -3078,7 +3078,7 @@ type simpleQueryResponse struct { // GetMe returns simpleQueryResponse.Me, and is useful for accessing the field via an interface. func (v *simpleQueryResponse) GetMe() simpleQueryMeUser { return v.Me } -// The query or mutation executed by createUser. +// The query, mutation or subscription executed by createUser. const createUser_Operation = ` mutation createUser ($user: NewUser!) { createUser(input: $user) { @@ -3114,7 +3114,7 @@ func createUser( return &data_, resp_.Extensions, err_ } -// The query or mutation executed by failingQuery. +// The query, mutation or subscription executed by failingQuery. const failingQuery_Operation = ` query failingQuery { fail @@ -3146,7 +3146,7 @@ func failingQuery( return &data_, resp_.Extensions, err_ } -// The query or mutation executed by queryWithCustomMarshal. +// The query, mutation or subscription executed by queryWithCustomMarshal. const queryWithCustomMarshal_Operation = ` query queryWithCustomMarshal ($date: Date!) { usersBornOn(date: $date) { @@ -3183,7 +3183,7 @@ func queryWithCustomMarshal( return &data_, resp_.Extensions, err_ } -// The query or mutation executed by queryWithCustomMarshalOptional. +// The query, mutation or subscription executed by queryWithCustomMarshalOptional. const queryWithCustomMarshalOptional_Operation = ` query queryWithCustomMarshalOptional ($date: Date, $id: ID) { userSearch(birthdate: $date, id: $id) { @@ -3222,7 +3222,7 @@ func queryWithCustomMarshalOptional( return &data_, resp_.Extensions, err_ } -// The query or mutation executed by queryWithCustomMarshalSlice. +// The query, mutation or subscription executed by queryWithCustomMarshalSlice. const queryWithCustomMarshalSlice_Operation = ` query queryWithCustomMarshalSlice ($dates: [Date!]!) { usersBornOnDates(dates: $dates) { @@ -3259,7 +3259,7 @@ func queryWithCustomMarshalSlice( return &data_, resp_.Extensions, err_ } -// The query or mutation executed by queryWithFlatten. +// The query, mutation or subscription executed by queryWithFlatten. const queryWithFlatten_Operation = ` query queryWithFlatten ($ids: [ID!]!) { ... QueryFragment @@ -3330,7 +3330,7 @@ func queryWithFlatten( return &data_, resp_.Extensions, err_ } -// The query or mutation executed by queryWithFragments. +// The query, mutation or subscription executed by queryWithFragments. const queryWithFragments_Operation = ` query queryWithFragments ($ids: [ID!]!) { beings(ids: $ids) { @@ -3395,7 +3395,7 @@ func queryWithFragments( return &data_, resp_.Extensions, err_ } -// The query or mutation executed by queryWithInterfaceListField. +// The query, mutation or subscription executed by queryWithInterfaceListField. const queryWithInterfaceListField_Operation = ` query queryWithInterfaceListField ($ids: [ID!]!) { beings(ids: $ids) { @@ -3432,7 +3432,7 @@ func queryWithInterfaceListField( return &data_, resp_.Extensions, err_ } -// The query or mutation executed by queryWithInterfaceListPointerField. +// The query, mutation or subscription executed by queryWithInterfaceListPointerField. const queryWithInterfaceListPointerField_Operation = ` query queryWithInterfaceListPointerField ($ids: [ID!]!) { beings(ids: $ids) { @@ -3469,7 +3469,7 @@ func queryWithInterfaceListPointerField( return &data_, resp_.Extensions, err_ } -// The query or mutation executed by queryWithInterfaceNoFragments. +// The query, mutation or subscription executed by queryWithInterfaceNoFragments. const queryWithInterfaceNoFragments_Operation = ` query queryWithInterfaceNoFragments ($id: ID!) { being(id: $id) { @@ -3510,7 +3510,7 @@ func queryWithInterfaceNoFragments( return &data_, resp_.Extensions, err_ } -// The query or mutation executed by queryWithNamedFragments. +// The query, mutation or subscription executed by queryWithNamedFragments. const queryWithNamedFragments_Operation = ` query queryWithNamedFragments ($ids: [ID!]!) { beings(ids: $ids) { @@ -3575,7 +3575,7 @@ func queryWithNamedFragments( return &data_, resp_.Extensions, err_ } -// The query or mutation executed by queryWithOmitempty. +// The query, mutation or subscription executed by queryWithOmitempty. const queryWithOmitempty_Operation = ` query queryWithOmitempty ($id: ID) { user(id: $id) { @@ -3612,7 +3612,7 @@ func queryWithOmitempty( return &data_, resp_.Extensions, err_ } -// The query or mutation executed by queryWithVariables. +// The query, mutation or subscription executed by queryWithVariables. const queryWithVariables_Operation = ` query queryWithVariables ($id: ID!) { user(id: $id) { @@ -3649,7 +3649,7 @@ func queryWithVariables( return &data_, resp_.Extensions, err_ } -// The query or mutation executed by simpleQuery. +// The query, mutation or subscription executed by simpleQuery. const simpleQuery_Operation = ` query simpleQuery { me { @@ -3682,7 +3682,7 @@ func simpleQuery( return &data_, resp_.Extensions, err_ } -// The query or mutation executed by simpleQueryExt. +// The query, mutation or subscription executed by simpleQueryExt. const simpleQueryExt_Operation = ` query simpleQueryExt { me { diff --git a/internal/integration/roundtrip.go b/internal/integration/roundtrip.go index 1be9996a..7262c1bb 100644 --- a/internal/integration/roundtrip.go +++ b/internal/integration/roundtrip.go @@ -103,6 +103,10 @@ func (c *roundtripClient) MakeRequest(ctx context.Context, req *graphql.Request, return nil } +func (c *roundtripClient) DialWebSocket(ctx context.Context, req *graphql.Request, resp *graphql.Response, dataUpdated chan bool) (done chan struct{}, errChan chan error, err error) { + return nil, nil, nil +} + func newRoundtripClients(t *testing.T, endpoint string) []graphql.Client { return []graphql.Client{newRoundtripClient(t, endpoint), newRoundtripGetClient(t, endpoint)} } From 39049b50f5cc361b51c41e956aa6160748a679f6 Mon Sep 17 00:00:00 2001 From: matthieu4294967296moineau Date: Fri, 25 Aug 2023 10:50:59 +0200 Subject: [PATCH 02/35] added basic tests --- docs/INTRODUCTION.md | 2 +- generate/operation.go.tmpl | 4 +- .../queries/SimpleSubscription.graphql | 1 + generate/testdata/queries/schema.graphql | 4 + ...tion.graphql-SimpleSubscription.graphql.go | 73 +++++++++++ ...on.graphql-SimpleSubscription.graphql.json | 9 ++ graphql/client.go | 25 +++- internal/integration/generated.go | 64 ++++++++++ internal/integration/integration_test.go | 48 ++++++++ internal/integration/roundtrip.go | 12 +- internal/integration/schema.graphql | 4 + internal/integration/server/gqlgen_exec.go | 115 ++++++++++++++++++ internal/integration/server/server.go | 26 +++- 13 files changed, 379 insertions(+), 8 deletions(-) create mode 100644 generate/testdata/queries/SimpleSubscription.graphql create mode 100644 generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go create mode 100644 generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.json diff --git a/docs/INTRODUCTION.md b/docs/INTRODUCTION.md index e1fe33df..cb6d6a69 100644 --- a/docs/INTRODUCTION.md +++ b/docs/INTRODUCTION.md @@ -8,7 +8,7 @@ You want the schema in GraphQL [Schema Definition Language (SDL)](https://graphq ## Step 2: Write your queries -Next, write your GraphQL query. This is often easiest to do in an interactive explorer like [GraphiQL](https://github.com/graphql/graphiql/tree/main/packages/graphiql#readme); the syntax is just standard [GraphQL syntax](https://graphql.org/learn/queries/) and supports both queries and mutations. Put it in `genqlient.graphql`: +Next, write your GraphQL query. This is often easiest to do in an interactive explorer like [GraphiQL](https://github.com/graphql/graphiql/tree/main/packages/graphiql#readme); the syntax is just standard [GraphQL syntax](https://graphql.org/learn/queries/) and supports queries, mutations and subscriptions. Put it in `genqlient.graphql`: ```graphql query getUser($login: String!) { user(login: $login) { diff --git a/generate/operation.go.tmpl b/generate/operation.go.tmpl index b17f6369..7a165d97 100644 --- a/generate/operation.go.tmpl +++ b/generate/operation.go.tmpl @@ -42,9 +42,9 @@ func {{.Name}}( dataChan_ := make(chan {{.Name}}WsResponse, 1) dataUpdated_ := make(chan bool, 1) - doneChan_, errChan_, err_ := client_.DialWebSocket(ctx_, req_, resp_, dataUpdated_) + doneChan_, errChan_, err_ := client_.DialWebSocket({{if ne .Config.ContextType "-" -}}ctx_{{else}}context.Background(){{end}}, req_, resp_, dataUpdated_) if err_ != nil { - return nil, nil, nil, err_ + return nil, nil, nil,{{if .Config.Extensions -}} nil,{{end}} err_ } go {{.Name}}ForwardData(dataChan_, resp_, dataUpdated_, errChan_) {{else}} diff --git a/generate/testdata/queries/SimpleSubscription.graphql b/generate/testdata/queries/SimpleSubscription.graphql new file mode 100644 index 00000000..169bbc08 --- /dev/null +++ b/generate/testdata/queries/SimpleSubscription.graphql @@ -0,0 +1 @@ +subscription SimpleSubscription { count } \ No newline at end of file diff --git a/generate/testdata/queries/schema.graphql b/generate/testdata/queries/schema.graphql index 17db360a..7cd3f65d 100644 --- a/generate/testdata/queries/schema.graphql +++ b/generate/testdata/queries/schema.graphql @@ -208,3 +208,7 @@ input IntComparisonExp { _neq: Int _nin: [Int!] } + +type Subscription { + count: Int! +} \ No newline at end of file diff --git a/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go new file mode 100644 index 00000000..451e182b --- /dev/null +++ b/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go @@ -0,0 +1,73 @@ +// Code generated by github.com/Khan/genqlient, DO NOT EDIT. + +package test + +import ( + "context" + + "github.com/Khan/genqlient/graphql" +) + +// SimpleSubscriptionResponse is returned by SimpleSubscription on success. +type SimpleSubscriptionResponse struct { + Count int `json:"count"` +} + +// GetCount returns SimpleSubscriptionResponse.Count, and is useful for accessing the field via an interface. +func (v *SimpleSubscriptionResponse) GetCount() int { return v.Count } + +// The query, mutation or subscription executed by SimpleSubscription. +const SimpleSubscription_Operation = ` +subscription SimpleSubscription { + count +} +` + +func SimpleSubscription( + client_ graphql.Client, +) (chan SimpleSubscriptionWsResponse, chan struct{}, chan error, error) { + req_ := &graphql.Request{ + OpName: "SimpleSubscription", + Query: SimpleSubscription_Operation, + } + var err_ error + + var data_ SimpleSubscriptionResponse + resp_ := &graphql.Response{Data: &data_} + + dataChan_ := make(chan SimpleSubscriptionWsResponse, 1) + dataUpdated_ := make(chan bool, 1) + + doneChan_, errChan_, err_ := client_.DialWebSocket(context.Background(), req_, resp_, dataUpdated_) + if err_ != nil { + return nil, nil, nil, err_ + } + go SimpleSubscriptionForwardData(dataChan_, resp_, dataUpdated_, errChan_) + + return dataChan_, doneChan_, errChan_, err_ +} + +type SimpleSubscriptionWsResponse struct { + Data *SimpleSubscriptionResponse + Extensions map[string]interface{} + Errors error +} + +func SimpleSubscriptionForwardData(dataChan_ chan SimpleSubscriptionWsResponse, resp_ *graphql.Response, dataUpdated_ chan bool, errChan_ chan error) { + defer close(dataChan_) + for { + _, more_ := <-dataUpdated_ + if !more_ { + return + } + data_ := SimpleSubscriptionWsResponse{ + Extensions: resp_.Extensions, + Errors: resp_.Errors, + } + if resp_.Data != nil { + data_.Data = resp_.Data.(*SimpleSubscriptionResponse) + } + dataChan_ <- data_ + } +} + diff --git a/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.json b/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.json new file mode 100644 index 00000000..6a4193c1 --- /dev/null +++ b/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.json @@ -0,0 +1,9 @@ +{ + "operations": [ + { + "operationName": "SimpleSubscription", + "query": "\nsubscription SimpleSubscription {\n\tcount\n}\n", + "sourceLocation": "testdata/queries/SimpleSubscription.graphql" + } + ] +} diff --git a/graphql/client.go b/graphql/client.go index 38930309..ecd9b99d 100644 --- a/graphql/client.go +++ b/graphql/client.go @@ -60,6 +60,8 @@ type client struct { method string } +const constMethodWebSocket = "websocket" + // NewClient returns a [Client] which makes requests to the given endpoint, // suitable for most users. // @@ -99,7 +101,7 @@ func NewClientUsingGet(endpoint string, httpClient Doer) Client { func NewClientUsingWebSocket(endpoint string, webSocketClient WebSocketClient) Client { webSocketClient.Header.Add("Sec-WebSocket-Protocol", "graphql-transport-ws") - return newClient(endpoint, nil, "", webSocketClient) + return newClient(endpoint, nil, constMethodWebSocket, webSocketClient) } func newClient(endpoint string, httpClient Doer, method string, webSocketClient WebSocketClient) Client { @@ -201,6 +203,18 @@ func (c *client) MakeRequest(ctx context.Context, req *Request, resp *Response) } func (c *client) DialWebSocket(ctx context.Context, req *Request, resp *Response, dataUpdated chan bool) (done chan struct{}, errChan chan error, err error) { + if c.method != constMethodWebSocket { + return nil, nil, errors.New("client does not support websocket") + } + if req.Query != "" { + if strings.HasPrefix(strings.TrimSpace(req.Query), "query") { + return nil, nil, errors.New("client does not support queries") + } + if strings.HasPrefix(strings.TrimSpace(req.Query), "mutation") { + return nil, nil, errors.New("client does not support mutations") + } + } + done = make(chan struct{}, 1) errChan = make(chan error, 1) startedWithError := make(chan error, 1) @@ -249,6 +263,12 @@ func (c *client) webSocketSubscriptionRoutine(ctx context.Context, req *Request, } func (c *client) createPostRequest(req *Request) (*http.Request, error) { + if req.Query != "" { + if strings.HasPrefix(strings.TrimSpace(req.Query), "subscription") { + return nil, errors.New("client does not support subscriptions") + } + } + body, err := json.Marshal(req) if err != nil { return nil, err @@ -278,6 +298,9 @@ func (c *client) createGetRequest(req *Request) (*http.Request, error) { if strings.HasPrefix(strings.TrimSpace(req.Query), "mutation") { return nil, errors.New("client does not support mutations") } + if strings.HasPrefix(strings.TrimSpace(req.Query), "subscription") { + return nil, errors.New("client does not support subscriptions") + } queryParams.Set("query", req.Query) queryUpdated = true } diff --git a/internal/integration/generated.go b/internal/integration/generated.go index bf9381c2..632663d5 100644 --- a/internal/integration/generated.go +++ b/internal/integration/generated.go @@ -1305,6 +1305,14 @@ type __queryWithVariablesInput struct { // GetId returns __queryWithVariablesInput.Id, and is useful for accessing the field via an interface. func (v *__queryWithVariablesInput) GetId() string { return v.Id } +// countResponse is returned by count on success. +type countResponse struct { + Count int `json:"count"` +} + +// GetCount returns countResponse.Count, and is useful for accessing the field via an interface. +func (v *countResponse) GetCount() int { return v.Count } + // createUserCreateUser includes the requested fields of the GraphQL type User. type createUserCreateUser struct { Id string `json:"id"` @@ -3078,6 +3086,62 @@ type simpleQueryResponse struct { // GetMe returns simpleQueryResponse.Me, and is useful for accessing the field via an interface. func (v *simpleQueryResponse) GetMe() simpleQueryMeUser { return v.Me } +// The query, mutation or subscription executed by count. +const count_Operation = ` +subscription count { + count +} +` + +func count( + ctx_ context.Context, + client_ graphql.Client, +) (chan countWsResponse, chan struct{}, chan error, map[string]interface{}, error) { + req_ := &graphql.Request{ + OpName: "count", + Query: count_Operation, + } + var err_ error + + var data_ countResponse + resp_ := &graphql.Response{Data: &data_} + + dataChan_ := make(chan countWsResponse, 1) + dataUpdated_ := make(chan bool, 1) + + doneChan_, errChan_, err_ := client_.DialWebSocket(ctx_, req_, resp_, dataUpdated_) + if err_ != nil { + return nil, nil, nil, nil, err_ + } + go countForwardData(dataChan_, resp_, dataUpdated_, errChan_) + + return dataChan_, doneChan_, errChan_, resp_.Extensions, err_ +} + +type countWsResponse struct { + Data *countResponse + Extensions map[string]interface{} + Errors error +} + +func countForwardData(dataChan_ chan countWsResponse, resp_ *graphql.Response, dataUpdated_ chan bool, errChan_ chan error) { + defer close(dataChan_) + for { + _, more_ := <-dataUpdated_ + if !more_ { + return + } + data_ := countWsResponse{ + Extensions: resp_.Extensions, + Errors: resp_.Errors, + } + if resp_.Data != nil { + data_.Data = resp_.Data.(*countResponse) + } + dataChan_ <- data_ + } +} + // The query, mutation or subscription executed by createUser. const createUser_Operation = ` mutation createUser ($user: NewUser!) { diff --git a/internal/integration/integration_test.go b/internal/integration/integration_test.go index 0e056fab..efc85c5d 100644 --- a/internal/integration/integration_test.go +++ b/internal/integration/integration_test.go @@ -7,7 +7,9 @@ package integration import ( "context" + "fmt" "net/http" + "strings" "testing" "time" @@ -46,6 +48,7 @@ func TestMutation(t *testing.T) { defer server.Close() postClient := newRoundtripClient(t, server.URL) getClient := newRoundtripGetClient(t, server.URL) + websocketClient := newRoundtripWebScoketClient(t, "ws"+strings.TrimPrefix(server.URL, "http")) resp, _, err := createUser(ctx, postClient, NewUser{Name: "Jack"}) require.NoError(t, err) @@ -54,6 +57,51 @@ func TestMutation(t *testing.T) { _, _, err = createUser(ctx, getClient, NewUser{Name: "Jill"}) require.Errorf(t, err, "client does not support mutations") + + _, _, err = createUser(ctx, websocketClient, NewUser{Name: "Jill"}) + require.Errorf(t, err, "client does not support mutations") +} + +func TestSubscription(t *testing.T) { + _ = `# @genqlient + subscription count { count }` + + ctx := context.Background() + server := server.RunServer() + defer server.Close() + postClient := newRoundtripClient(t, server.URL) + getClient := newRoundtripGetClient(t, server.URL) + websocketClient := newRoundtripWebScoketClient(t, "ws"+strings.TrimPrefix(server.URL, "http")) + + _, _, _, _, err := count(ctx, getClient) + require.Errorf(t, err, "client does not support websocket") + + _, _, _, _, err = count(ctx, postClient) + require.Errorf(t, err, "client does not support websocket") + + start := time.Now() + respChan, doneChan, errChan, _, err := count(ctx, websocketClient) + require.NoError(t, err) + defer func() { doneChan <- struct{}{} }() + counter := 0 + for loop := true; loop; { + select { + case resp, more := <-respChan: + if !more { + loop = false + break + } + require.NotNil(t, resp.Data) + assert.Equal(t, counter, resp.Data.Count) + require.Zero(t, resp.Errors.Error()) + loop = time.Since(start) < time.Second*2 + counter++ + case err := <-errChan: + require.NoError(t, err) + case <-time.After(time.Second * 5): + require.NoError(t, fmt.Errorf("subscription timed out")) + } + } } func TestServerError(t *testing.T) { diff --git a/internal/integration/roundtrip.go b/internal/integration/roundtrip.go index 7262c1bb..d49e211c 100644 --- a/internal/integration/roundtrip.go +++ b/internal/integration/roundtrip.go @@ -13,6 +13,7 @@ import ( "testing" "github.com/Khan/genqlient/graphql" + "github.com/gorilla/websocket" "github.com/stretchr/testify/assert" ) @@ -104,7 +105,7 @@ func (c *roundtripClient) MakeRequest(ctx context.Context, req *graphql.Request, } func (c *roundtripClient) DialWebSocket(ctx context.Context, req *graphql.Request, resp *graphql.Response, dataUpdated chan bool) (done chan struct{}, errChan chan error, err error) { - return nil, nil, nil + return c.wrapped.DialWebSocket(ctx, req, resp, dataUpdated) } func newRoundtripClients(t *testing.T, endpoint string) []graphql.Client { @@ -130,3 +131,12 @@ func newRoundtripGetClient(t *testing.T, endpoint string) graphql.Client { t: t, } } + +func newRoundtripWebScoketClient(t *testing.T, endpoint string) graphql.Client { + dialer := websocket.DefaultDialer + webSocketClient := graphql.WebSocketClient{Dialer: dialer, Header: http.Header{}} + return &roundtripClient{ + wrapped: graphql.NewClientUsingWebSocket(endpoint, webSocketClient), + t: t, + } +} diff --git a/internal/integration/schema.graphql b/internal/integration/schema.graphql index 7857a4a7..373baeca 100644 --- a/internal/integration/schema.graphql +++ b/internal/integration/schema.graphql @@ -16,6 +16,10 @@ type Mutation { createUser(input: NewUser!): User! } +type Subscription { + count: Int! +} + type User implements Being & Lucky { id: ID! name: String! diff --git a/internal/integration/server/gqlgen_exec.go b/internal/integration/server/gqlgen_exec.go index 10b07b03..cddccae7 100644 --- a/internal/integration/server/gqlgen_exec.go +++ b/internal/integration/server/gqlgen_exec.go @@ -7,6 +7,7 @@ import ( "context" "errors" "fmt" + "io" "strconv" "sync" "sync/atomic" @@ -37,6 +38,7 @@ type Config struct { type ResolverRoot interface { Mutation() MutationResolver Query() QueryResolver + Subscription() SubscriptionResolver } type DirectiveRoot struct { @@ -75,6 +77,10 @@ type ComplexityRoot struct { UsersBornOnDates func(childComplexity int, dates []string) int } + Subscription struct { + Count func(childComplexity int) int + } + User struct { Birthdate func(childComplexity int) int Friends func(childComplexity int) int @@ -99,6 +105,9 @@ type QueryResolver interface { UserSearch(ctx context.Context, birthdate *string, id *string) ([]*User, error) Fail(ctx context.Context) (*bool, error) } +type SubscriptionResolver interface { + Count(ctx context.Context) (<-chan int, error) +} type executableSchema struct { resolvers ResolverRoot @@ -274,6 +283,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.UsersBornOnDates(childComplexity, args["dates"].([]string)), true + case "Subscription.count": + if e.complexity.Subscription.Count == nil { + break + } + + return e.complexity.Subscription.Count(childComplexity), true + case "User.birthdate": if e.complexity.User.Birthdate == nil { break @@ -370,6 +386,23 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { var buf bytes.Buffer data.MarshalGQL(&buf) + return &graphql.Response{ + Data: buf.Bytes(), + } + } + case ast.Subscription: + next := ec._Subscription(ctx, rc.Operation.SelectionSet) + + var buf bytes.Buffer + return func(ctx context.Context) *graphql.Response { + buf.Reset() + data := next(ctx) + + if data == nil { + return nil + } + data.MarshalGQL(&buf) + return &graphql.Response{ Data: buf.Bytes(), } @@ -440,6 +473,10 @@ type Mutation { createUser(input: NewUser!): User! } +type Subscription { + count: Int! +} + type User implements Being & Lucky { id: ID! name: String! @@ -1694,6 +1731,64 @@ func (ec *executionContext) fieldContext_Query___schema(ctx context.Context, fie return fc, nil } +func (ec *executionContext) _Subscription_count(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { + fc, err := ec.fieldContext_Subscription_count(ctx, field) + if err != nil { + return nil + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Subscription().Count(rctx) + }) + if err != nil { + ec.Error(ctx, err) + return nil + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return nil + } + return func(ctx context.Context) graphql.Marshaler { + select { + case res, ok := <-resTmp.(<-chan int): + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalNInt2int(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + case <-ctx.Done(): + return nil + } + } +} + +func (ec *executionContext) fieldContext_Subscription_count(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Subscription", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _User_id(ctx context.Context, field graphql.CollectedField, obj *User) (ret graphql.Marshaler) { fc, err := ec.fieldContext_User_id(ctx, field) if err != nil { @@ -4223,6 +4318,26 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr return out } +var subscriptionImplementors = []string{"Subscription"} + +func (ec *executionContext) _Subscription(ctx context.Context, sel ast.SelectionSet) func(ctx context.Context) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, subscriptionImplementors) + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ + Object: "Subscription", + }) + if len(fields) != 1 { + ec.Errorf(ctx, "must subscribe to exactly one stream") + return nil + } + + switch fields[0].Name { + case "count": + return ec._Subscription_count(ctx, fields[0]) + default: + panic("unknown field " + strconv.Quote(fields[0].Name)) + } +} + var userImplementors = []string{"User", "Being", "Lucky"} func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj *User) graphql.Marshaler { diff --git a/internal/integration/server/server.go b/internal/integration/server/server.go index 00dbb308..c0bdbf56 100644 --- a/internal/integration/server/server.go +++ b/internal/integration/server/server.go @@ -5,6 +5,7 @@ import ( "fmt" "net/http/httptest" "strconv" + "time" "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/handler" @@ -154,10 +155,24 @@ func (m mutationResolver) CreateUser(ctx context.Context, input NewUser) (*User, return &newUser, nil } +func (s *subscriptionResolver) Count(ctx context.Context) (<-chan int, error) { + respChan := make(chan int, 1) + go func(respChan chan int) { + counter := 0 + for { + respChan <- counter + counter++ + time.Sleep(time.Second) + } + }(respChan) + return respChan, nil +} + func RunServer() *httptest.Server { gqlgenServer := handler.New(NewExecutableSchema(Config{Resolvers: &resolver{}})) gqlgenServer.AddTransport(transport.POST{}) gqlgenServer.AddTransport(transport.GET{}) + gqlgenServer.AddTransport(transport.Websocket{}) gqlgenServer.AroundResponses(func(ctx context.Context, next graphql.ResponseHandler) *graphql.Response { graphql.RegisterExtension(ctx, "foobar", "test") return next(ctx) @@ -166,9 +181,10 @@ func RunServer() *httptest.Server { } type ( - resolver struct{} - queryResolver struct{} - mutationResolver struct{} + resolver struct{} + queryResolver struct{} + mutationResolver struct{} + subscriptionResolver struct{} ) func (r *resolver) Mutation() MutationResolver { @@ -177,4 +193,8 @@ func (r *resolver) Mutation() MutationResolver { func (r *resolver) Query() QueryResolver { return &queryResolver{} } +func (r *resolver) Subscription() SubscriptionResolver { + return &subscriptionResolver{} +} + //go:generate go run github.com/99designs/gqlgen From 9c73c20643fbb6fd1c1af08e21df270c82a1f25d Mon Sep 17 00:00:00 2001 From: matthieu4294967296moineau Date: Wed, 30 Aug 2023 16:32:54 +0200 Subject: [PATCH 03/35] corrected according to comments --- example/generated.go | 16 +-- generate/operation.go.tmpl | 18 +-- ....graphql-ComplexInlineFragments.graphql.go | 8 +- ...s.graphql-ComplexNamedFragments.graphql.go | 8 +- ...ovariantInterfaceImplementation.graphql.go | 8 +- ...omMarshal.graphql-CustomMarshal.graphql.go | 8 +- ...lice.graphql-CustomMarshalSlice.graphql.go | 8 +- ...erate-DateTime.graphql-DateTime.graphql.go | 8 +- ...nterface.graphql-EmptyInterface.graphql.go | 8 +- ...enerate-Flatten.graphql-Flatten.graphql.go | 8 +- ...tGenerate-Hasura.graphql-Hasura.graphql.go | 8 +- ...ate-InputEnum.graphql-InputEnum.graphql.go | 8 +- ...InputObject.graphql-InputObject.graphql.go | 8 +- ...ield.graphql-InterfaceListField.graphql.go | 8 +- ...nterfaceListOfListsOfListsField.graphql.go | 8 +- ...esting.graphql-InterfaceNesting.graphql.go | 8 +- ...ts.graphql-InterfaceNoFragments.graphql.go | 8 +- ...ate-ListInput.graphql-ListInput.graphql.go | 8 +- ...ists.graphql-ListOfListsOfLists.graphql.go | 8 +- ...ives.graphql-MultipleDirectives.graphql.go | 8 +- ...-MutationArgsWithCollidingNames.graphql.go | 8 +- ...ate-Omitempty.graphql-Omitempty.graphql.go | 8 +- ...erate-Pointers.graphql-Pointers.graphql.go | 8 +- ...rsInline.graphql-PointersInline.graphql.go | 8 +- ...enerate-Pokemon.graphql-Pokemon.graphql.go | 8 +- ...ithAlias.graphql-QueryWithAlias.graphql.go | 8 +- ...as.graphql-QueryWithDoubleAlias.graphql.go | 8 +- ...ithEnums.graphql-QueryWithEnums.graphql.go | 8 +- ...hSlices.graphql-QueryWithSlices.graphql.go | 8 +- ...tructs.graphql-QueryWithStructs.graphql.go | 8 +- ...ate-Recursion.graphql-Recursion.graphql.go | 8 +- ...nt.graphql-SimpleInlineFragment.graphql.go | 8 +- ...SimpleInput.graphql-SimpleInput.graphql.go | 8 +- ...Mutation.graphql-SimpleMutation.graphql.go | 8 +- ...ent.graphql-SimpleNamedFragment.graphql.go | 8 +- ...SimpleQuery.graphql-SimpleQuery.graphql.go | 8 +- ...e.graphql-SimpleQueryNoOverride.graphql.go | 8 +- ...leQueryWithPointerFalseOverride.graphql.go | 8 +- ...tion.graphql-SimpleSubscription.graphql.go | 15 +- ...ructOption.graphql-StructOption.graphql.go | 8 +- ...erate-TypeName.graphql-TypeName.graphql.go | 8 +- ...ate-TypeNames.graphql-TypeNames.graphql.go | 8 +- ...gments.graphql-UnionNoFragments.graphql.go | 8 +- ...EnumTwice.graphql-UsesEnumTwice.graphql.go | 8 +- ...e-unexported.graphql-unexported.graphql.go | 8 +- ...ClientGetter-testdata-queries-generated.go | 8 +- ...ustomContext-testdata-queries-generated.go | 8 +- ...terNoContext-testdata-queries-generated.go | 8 +- ...ustomContext-testdata-queries-generated.go | 8 +- ...extWithAlias-testdata-queries-generated.go | 8 +- ...efaultConfig-testdata-queries-generated.go | 8 +- ...RawCasingAll-testdata-queries-generated.go | 8 +- ...singSpecific-testdata-queries-generated.go | 8 +- ...rtOperations-testdata-queries-generated.go | 8 +- ...g-Extensions-testdata-queries-generated.go | 8 +- ...ig-NoContext-testdata-queries-generated.go | 8 +- ...ionalGeneric-testdata-queries-generated.go | 16 +-- ...ionalPointer-testdata-queries-generated.go | 32 ++--- ...ptionalValue-testdata-queries-generated.go | 16 +-- ...kageBindings-testdata-queries-generated.go | 8 +- ...fig-PackageName-testdata-queries-myfile.go | 8 +- ...ctReferences-testdata-queries-generated.go | 16 +-- ...ionalPointer-testdata-queries-generated.go | 16 +-- ...ubpackage-testdata-queries-mypkg-myfile.go | 8 +- ...ageConfig-testdata-queries-mypkg-myfile.go | 8 +- graphql/client.go | 55 +++---- graphql/websocket.go | 111 +++++++++++--- internal/integration/generated.go | 135 +++++++++--------- internal/integration/integration_test.go | 7 +- internal/integration/roundtrip.go | 18 ++- 70 files changed, 507 insertions(+), 420 deletions(-) diff --git a/example/generated.go b/example/generated.go index f08d698d..fc2b3e3e 100644 --- a/example/generated.go +++ b/example/generated.go @@ -84,7 +84,7 @@ func getUser( ctx_ context.Context, client_ graphql.Client, Login string, -) (*getUserResponse, error) { +) (data_ *getUserResponse, err error) { req_ := &graphql.Request{ OpName: "getUser", Query: getUser_Operation, @@ -94,8 +94,8 @@ func getUser( } var err_ error - var data_ getUserResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &getUserResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -103,7 +103,7 @@ func getUser( resp_, ) - return &data_, err_ + return data_, err_ } // The query, mutation or subscription executed by getViewer. @@ -119,15 +119,15 @@ query getViewer { func getViewer( ctx_ context.Context, client_ graphql.Client, -) (*getViewerResponse, error) { +) (data_ *getViewerResponse, err error) { req_ := &graphql.Request{ OpName: "getViewer", Query: getViewer_Operation, } var err_ error - var data_ getViewerResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &getViewerResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -135,5 +135,5 @@ func getViewer( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/operation.go.tmpl b/generate/operation.go.tmpl index 7a165d97..597a3007 100644 --- a/generate/operation.go.tmpl +++ b/generate/operation.go.tmpl @@ -15,7 +15,7 @@ func {{.Name}}( {{.GraphQLName}} {{.GoType.Reference}}, {{end -}} {{end -}} -) ({{if eq .Type "subscription"}}chan {{.Name}}WsResponse{{else}}*{{.ResponseName}}{{end}}, {{if eq .Type "subscription"}}chan struct{}, chan error, {{end}}{{if .Config.Extensions -}}map[string]interface{},{{end}} error) { +) ({{if eq .Type "subscription"}}dataChan_ chan {{.Name}}WsResponse, doneChan_ chan bool, errChan_ chan error{{else}}data_ *{{.ResponseName}}{{end}}, {{if .Config.Extensions -}}ext_ map[string]interface{},{{end}}err error) { req_ := &graphql.Request{ OpName: "{{.Name}}", Query: {{.Name}}_Operation, @@ -36,17 +36,19 @@ func {{.Name}}( return nil, {{if .Config.Extensions -}}nil,{{end -}} err_ } {{end}} - var data_ {{.ResponseName}} - resp_ := &graphql.Response{Data: &data_} {{if eq .Type "subscription"}} - dataChan_ := make(chan {{.Name}}WsResponse, 1) + var data_ *{{.ResponseName}}{{end}} + data_ = &{{.ResponseName}}{} + resp_ := &graphql.Response{Data: data_} + {{if eq .Type "subscription"}} + dataChan_ = make(chan {{.Name}}WsResponse, 1) dataUpdated_ := make(chan bool, 1) - doneChan_, errChan_, err_ := client_.DialWebSocket({{if ne .Config.ContextType "-" -}}ctx_{{else}}context.Background(){{end}}, req_, resp_, dataUpdated_) + doneChan_, errChan_, err_ = client_.DialWebSocket({{if ne .Config.ContextType "-" -}}ctx_{{else}}context.Background(){{end}}, req_, resp_, dataUpdated_) if err_ != nil { return nil, nil, nil,{{if .Config.Extensions -}} nil,{{end}} err_ } - go {{.Name}}ForwardData(dataChan_, resp_, dataUpdated_, errChan_) + go {{.Name}}ForwardData(dataChan_, resp_, dataUpdated_) {{else}} err_ = client_.MakeRequest( @@ -56,7 +58,7 @@ func {{.Name}}( ) {{end}} - return {{if eq .Type "subscription"}}dataChan_, doneChan_, errChan_{{else}}&data_{{end}}, {{if .Config.Extensions -}}resp_.Extensions,{{end -}} err_ + return {{if eq .Type "subscription"}}dataChan_, doneChan_, errChan_{{else}}data_{{end}}, {{if .Config.Extensions -}}resp_.Extensions,{{end -}} err_ } {{if eq .Type "subscription"}} @@ -66,7 +68,7 @@ type {{.Name}}WsResponse struct { Errors error } -func {{.Name}}ForwardData(dataChan_ chan {{.Name}}WsResponse, resp_ *graphql.Response, dataUpdated_ chan bool, errChan_ chan error) { +func {{.Name}}ForwardData(dataChan_ chan {{.Name}}WsResponse, resp_ *graphql.Response, dataUpdated_ chan bool) { defer close(dataChan_) for { _, more_ := <-dataUpdated_ diff --git a/generate/testdata/snapshots/TestGenerate-ComplexInlineFragments.graphql-ComplexInlineFragments.graphql.go b/generate/testdata/snapshots/TestGenerate-ComplexInlineFragments.graphql-ComplexInlineFragments.graphql.go index 33ca6472..b6fac09b 100644 --- a/generate/testdata/snapshots/TestGenerate-ComplexInlineFragments.graphql-ComplexInlineFragments.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-ComplexInlineFragments.graphql-ComplexInlineFragments.graphql.go @@ -1436,15 +1436,15 @@ query ComplexInlineFragments { // interfaces yet. func ComplexInlineFragments( client_ graphql.Client, -) (*ComplexInlineFragmentsResponse, error) { +) (data_ *ComplexInlineFragmentsResponse, err error) { req_ := &graphql.Request{ OpName: "ComplexInlineFragments", Query: ComplexInlineFragments_Operation, } var err_ error - var data_ ComplexInlineFragmentsResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &ComplexInlineFragmentsResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -1452,6 +1452,6 @@ func ComplexInlineFragments( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-ComplexNamedFragments.graphql-ComplexNamedFragments.graphql.go b/generate/testdata/snapshots/TestGenerate-ComplexNamedFragments.graphql-ComplexNamedFragments.graphql.go index aa961e9e..019923dd 100644 --- a/generate/testdata/snapshots/TestGenerate-ComplexNamedFragments.graphql-ComplexNamedFragments.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-ComplexNamedFragments.graphql-ComplexNamedFragments.graphql.go @@ -1802,15 +1802,15 @@ fragment MoreVideoFields on Video { func ComplexNamedFragments( client_ graphql.Client, -) (*ComplexNamedFragmentsResponse, error) { +) (data_ *ComplexNamedFragmentsResponse, err error) { req_ := &graphql.Request{ OpName: "ComplexNamedFragments", Query: ComplexNamedFragments_Operation, } var err_ error - var data_ ComplexNamedFragmentsResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &ComplexNamedFragmentsResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -1818,6 +1818,6 @@ func ComplexNamedFragments( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-CovariantInterfaceImplementation.graphql-CovariantInterfaceImplementation.graphql.go b/generate/testdata/snapshots/TestGenerate-CovariantInterfaceImplementation.graphql-CovariantInterfaceImplementation.graphql.go index 5b57a770..b97bc3c4 100644 --- a/generate/testdata/snapshots/TestGenerate-CovariantInterfaceImplementation.graphql-CovariantInterfaceImplementation.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-CovariantInterfaceImplementation.graphql-CovariantInterfaceImplementation.graphql.go @@ -2394,15 +2394,15 @@ fragment TopicFields on Topic { func CovariantInterfaceImplementation( client_ graphql.Client, -) (*CovariantInterfaceImplementationResponse, error) { +) (data_ *CovariantInterfaceImplementationResponse, err error) { req_ := &graphql.Request{ OpName: "CovariantInterfaceImplementation", Query: CovariantInterfaceImplementation_Operation, } var err_ error - var data_ CovariantInterfaceImplementationResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &CovariantInterfaceImplementationResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -2410,6 +2410,6 @@ func CovariantInterfaceImplementation( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-CustomMarshal.graphql-CustomMarshal.graphql.go b/generate/testdata/snapshots/TestGenerate-CustomMarshal.graphql-CustomMarshal.graphql.go index 22915599..d860f7bf 100644 --- a/generate/testdata/snapshots/TestGenerate-CustomMarshal.graphql-CustomMarshal.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-CustomMarshal.graphql-CustomMarshal.graphql.go @@ -187,7 +187,7 @@ query CustomMarshal ($date: Date!) { func CustomMarshal( client_ graphql.Client, date time.Time, -) (*CustomMarshalResponse, error) { +) (data_ *CustomMarshalResponse, err error) { req_ := &graphql.Request{ OpName: "CustomMarshal", Query: CustomMarshal_Operation, @@ -197,8 +197,8 @@ func CustomMarshal( } var err_ error - var data_ CustomMarshalResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &CustomMarshalResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -206,6 +206,6 @@ func CustomMarshal( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-CustomMarshalSlice.graphql-CustomMarshalSlice.graphql.go b/generate/testdata/snapshots/TestGenerate-CustomMarshalSlice.graphql-CustomMarshalSlice.graphql.go index 7fd51620..f14be3c6 100644 --- a/generate/testdata/snapshots/TestGenerate-CustomMarshalSlice.graphql-CustomMarshalSlice.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-CustomMarshalSlice.graphql-CustomMarshalSlice.graphql.go @@ -215,7 +215,7 @@ func CustomMarshalSlice( client_ graphql.Client, datesss [][][]time.Time, datesssp [][][]*time.Time, -) (*CustomMarshalSliceResponse, error) { +) (data_ *CustomMarshalSliceResponse, err error) { req_ := &graphql.Request{ OpName: "CustomMarshalSlice", Query: CustomMarshalSlice_Operation, @@ -226,8 +226,8 @@ func CustomMarshalSlice( } var err_ error - var data_ CustomMarshalSliceResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &CustomMarshalSliceResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -235,6 +235,6 @@ func CustomMarshalSlice( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-DateTime.graphql-DateTime.graphql.go b/generate/testdata/snapshots/TestGenerate-DateTime.graphql-DateTime.graphql.go index f45812a2..ae9bce40 100644 --- a/generate/testdata/snapshots/TestGenerate-DateTime.graphql-DateTime.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-DateTime.graphql-DateTime.graphql.go @@ -39,7 +39,7 @@ func convertTimezone( client_ graphql.Client, dt time.Time, tz string, -) (*convertTimezoneResponse, error) { +) (data_ *convertTimezoneResponse, err error) { req_ := &graphql.Request{ OpName: "convertTimezone", Query: convertTimezone_Operation, @@ -50,8 +50,8 @@ func convertTimezone( } var err_ error - var data_ convertTimezoneResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &convertTimezoneResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -59,6 +59,6 @@ func convertTimezone( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-EmptyInterface.graphql-EmptyInterface.graphql.go b/generate/testdata/snapshots/TestGenerate-EmptyInterface.graphql-EmptyInterface.graphql.go index 7cc47e6b..c579b24a 100644 --- a/generate/testdata/snapshots/TestGenerate-EmptyInterface.graphql-EmptyInterface.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-EmptyInterface.graphql-EmptyInterface.graphql.go @@ -30,15 +30,15 @@ query EmptyInterface { func EmptyInterface( client_ graphql.Client, -) (*EmptyInterfaceResponse, error) { +) (data_ *EmptyInterfaceResponse, err error) { req_ := &graphql.Request{ OpName: "EmptyInterface", Query: EmptyInterface_Operation, } var err_ error - var data_ EmptyInterfaceResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &EmptyInterfaceResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -46,6 +46,6 @@ func EmptyInterface( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-Flatten.graphql-Flatten.graphql.go b/generate/testdata/snapshots/TestGenerate-Flatten.graphql-Flatten.graphql.go index 24e03d40..96d6f587 100644 --- a/generate/testdata/snapshots/TestGenerate-Flatten.graphql-Flatten.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-Flatten.graphql-Flatten.graphql.go @@ -306,15 +306,15 @@ fragment ChildVideoFields on Video { func ComplexNamedFragments( client_ graphql.Client, -) (*InnerQueryFragment, error) { +) (data_ *InnerQueryFragment, err error) { req_ := &graphql.Request{ OpName: "ComplexNamedFragments", Query: ComplexNamedFragments_Operation, } var err_ error - var data_ InnerQueryFragment - resp_ := &graphql.Response{Data: &data_} + data_ = &InnerQueryFragment{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -322,6 +322,6 @@ func ComplexNamedFragments( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-Hasura.graphql-Hasura.graphql.go b/generate/testdata/snapshots/TestGenerate-Hasura.graphql-Hasura.graphql.go index bb80690f..b10eab39 100644 --- a/generate/testdata/snapshots/TestGenerate-Hasura.graphql-Hasura.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-Hasura.graphql-Hasura.graphql.go @@ -94,7 +94,7 @@ query GetPokemon ($where: getPokemonBoolExp!) { func GetPokemon( client_ graphql.Client, where *GetPokemonBoolExp, -) (*GetPokemonResponse, error) { +) (data_ *GetPokemonResponse, err error) { req_ := &graphql.Request{ OpName: "GetPokemon", Query: GetPokemon_Operation, @@ -104,8 +104,8 @@ func GetPokemon( } var err_ error - var data_ GetPokemonResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &GetPokemonResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -113,6 +113,6 @@ func GetPokemon( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-InputEnum.graphql-InputEnum.graphql.go b/generate/testdata/snapshots/TestGenerate-InputEnum.graphql-InputEnum.graphql.go index 20d961f9..68f295e1 100644 --- a/generate/testdata/snapshots/TestGenerate-InputEnum.graphql-InputEnum.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-InputEnum.graphql-InputEnum.graphql.go @@ -66,7 +66,7 @@ query InputEnumQuery ($role: Role!) { func InputEnumQuery( client_ graphql.Client, role Role, -) (*InputEnumQueryResponse, error) { +) (data_ *InputEnumQueryResponse, err error) { req_ := &graphql.Request{ OpName: "InputEnumQuery", Query: InputEnumQuery_Operation, @@ -76,8 +76,8 @@ func InputEnumQuery( } var err_ error - var data_ InputEnumQueryResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &InputEnumQueryResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -85,6 +85,6 @@ func InputEnumQuery( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-InputObject.graphql-InputObject.graphql.go b/generate/testdata/snapshots/TestGenerate-InputObject.graphql-InputObject.graphql.go index 174e227c..d0bed3d6 100644 --- a/generate/testdata/snapshots/TestGenerate-InputObject.graphql-InputObject.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-InputObject.graphql-InputObject.graphql.go @@ -189,7 +189,7 @@ query InputObjectQuery ($query: UserQueryInput) { func InputObjectQuery( client_ graphql.Client, query UserQueryInput, -) (*InputObjectQueryResponse, error) { +) (data_ *InputObjectQueryResponse, err error) { req_ := &graphql.Request{ OpName: "InputObjectQuery", Query: InputObjectQuery_Operation, @@ -199,8 +199,8 @@ func InputObjectQuery( } var err_ error - var data_ InputObjectQueryResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &InputObjectQueryResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -208,6 +208,6 @@ func InputObjectQuery( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-InterfaceListField.graphql-InterfaceListField.graphql.go b/generate/testdata/snapshots/TestGenerate-InterfaceListField.graphql-InterfaceListField.graphql.go index 57cbc34f..45239a4a 100644 --- a/generate/testdata/snapshots/TestGenerate-InterfaceListField.graphql-InterfaceListField.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-InterfaceListField.graphql-InterfaceListField.graphql.go @@ -546,15 +546,15 @@ query InterfaceListField { func InterfaceListField( client_ graphql.Client, -) (*InterfaceListFieldResponse, error) { +) (data_ *InterfaceListFieldResponse, err error) { req_ := &graphql.Request{ OpName: "InterfaceListField", Query: InterfaceListField_Operation, } var err_ error - var data_ InterfaceListFieldResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &InterfaceListFieldResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -562,6 +562,6 @@ func InterfaceListField( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-InterfaceListOfListsOfListsField.graphql-InterfaceListOfListsOfListsField.graphql.go b/generate/testdata/snapshots/TestGenerate-InterfaceListOfListsOfListsField.graphql-InterfaceListOfListsOfListsField.graphql.go index ed9516cd..e7c7168e 100644 --- a/generate/testdata/snapshots/TestGenerate-InterfaceListOfListsOfListsField.graphql-InterfaceListOfListsOfListsField.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-InterfaceListOfListsOfListsField.graphql-InterfaceListOfListsOfListsField.graphql.go @@ -524,15 +524,15 @@ query InterfaceListOfListOfListsField { func InterfaceListOfListOfListsField( client_ graphql.Client, -) (*InterfaceListOfListOfListsFieldResponse, error) { +) (data_ *InterfaceListOfListOfListsFieldResponse, err error) { req_ := &graphql.Request{ OpName: "InterfaceListOfListOfListsField", Query: InterfaceListOfListOfListsField_Operation, } var err_ error - var data_ InterfaceListOfListOfListsFieldResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &InterfaceListOfListOfListsFieldResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -540,6 +540,6 @@ func InterfaceListOfListOfListsField( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-InterfaceNesting.graphql-InterfaceNesting.graphql.go b/generate/testdata/snapshots/TestGenerate-InterfaceNesting.graphql-InterfaceNesting.graphql.go index b287dff4..e672e9aa 100644 --- a/generate/testdata/snapshots/TestGenerate-InterfaceNesting.graphql-InterfaceNesting.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-InterfaceNesting.graphql-InterfaceNesting.graphql.go @@ -526,15 +526,15 @@ query InterfaceNesting { func InterfaceNesting( client_ graphql.Client, -) (*InterfaceNestingResponse, error) { +) (data_ *InterfaceNestingResponse, err error) { req_ := &graphql.Request{ OpName: "InterfaceNesting", Query: InterfaceNesting_Operation, } var err_ error - var data_ InterfaceNestingResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &InterfaceNestingResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -542,6 +542,6 @@ func InterfaceNesting( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-InterfaceNoFragments.graphql-InterfaceNoFragments.graphql.go b/generate/testdata/snapshots/TestGenerate-InterfaceNoFragments.graphql-InterfaceNoFragments.graphql.go index 0acea26b..5a1e11ef 100644 --- a/generate/testdata/snapshots/TestGenerate-InterfaceNoFragments.graphql-InterfaceNoFragments.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-InterfaceNoFragments.graphql-InterfaceNoFragments.graphql.go @@ -653,15 +653,15 @@ query InterfaceNoFragmentsQuery { func InterfaceNoFragmentsQuery( client_ graphql.Client, -) (*InterfaceNoFragmentsQueryResponse, error) { +) (data_ *InterfaceNoFragmentsQueryResponse, err error) { req_ := &graphql.Request{ OpName: "InterfaceNoFragmentsQuery", Query: InterfaceNoFragmentsQuery_Operation, } var err_ error - var data_ InterfaceNoFragmentsQueryResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &InterfaceNoFragmentsQueryResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -669,6 +669,6 @@ func InterfaceNoFragmentsQuery( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-ListInput.graphql-ListInput.graphql.go b/generate/testdata/snapshots/TestGenerate-ListInput.graphql-ListInput.graphql.go index 2e282545..b2b97058 100644 --- a/generate/testdata/snapshots/TestGenerate-ListInput.graphql-ListInput.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-ListInput.graphql-ListInput.graphql.go @@ -53,7 +53,7 @@ query ListInputQuery ($names: [String]) { func ListInputQuery( client_ graphql.Client, names []string, -) (*ListInputQueryResponse, error) { +) (data_ *ListInputQueryResponse, err error) { req_ := &graphql.Request{ OpName: "ListInputQuery", Query: ListInputQuery_Operation, @@ -63,8 +63,8 @@ func ListInputQuery( } var err_ error - var data_ ListInputQueryResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &ListInputQueryResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -72,6 +72,6 @@ func ListInputQuery( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-ListOfListsOfLists.graphql-ListOfListsOfLists.graphql.go b/generate/testdata/snapshots/TestGenerate-ListOfListsOfLists.graphql-ListOfListsOfLists.graphql.go index d76f8469..714074fa 100644 --- a/generate/testdata/snapshots/TestGenerate-ListOfListsOfLists.graphql-ListOfListsOfLists.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-ListOfListsOfLists.graphql-ListOfListsOfLists.graphql.go @@ -25,15 +25,15 @@ query ListOfListsOfLists { func ListOfListsOfLists( client_ graphql.Client, -) (*ListOfListsOfListsResponse, error) { +) (data_ *ListOfListsOfListsResponse, err error) { req_ := &graphql.Request{ OpName: "ListOfListsOfLists", Query: ListOfListsOfLists_Operation, } var err_ error - var data_ ListOfListsOfListsResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &ListOfListsOfListsResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -41,6 +41,6 @@ func ListOfListsOfLists( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-MultipleDirectives.graphql-MultipleDirectives.graphql.go b/generate/testdata/snapshots/TestGenerate-MultipleDirectives.graphql-MultipleDirectives.graphql.go index 32349980..b6c2cf5c 100644 --- a/generate/testdata/snapshots/TestGenerate-MultipleDirectives.graphql-MultipleDirectives.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-MultipleDirectives.graphql-MultipleDirectives.graphql.go @@ -341,7 +341,7 @@ func MultipleDirectives( client_ graphql.Client, query MyInput, queries []*UserQueryInput, -) (*MyMultipleDirectivesResponse, error) { +) (data_ *MyMultipleDirectivesResponse, err error) { req_ := &graphql.Request{ OpName: "MultipleDirectives", Query: MultipleDirectives_Operation, @@ -352,8 +352,8 @@ func MultipleDirectives( } var err_ error - var data_ MyMultipleDirectivesResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &MyMultipleDirectivesResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -361,6 +361,6 @@ func MultipleDirectives( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-MutationArgsWithCollidingNames.graphql-MutationArgsWithCollidingNames.graphql.go b/generate/testdata/snapshots/TestGenerate-MutationArgsWithCollidingNames.graphql-MutationArgsWithCollidingNames.graphql.go index 6edf917b..cf1b315c 100644 --- a/generate/testdata/snapshots/TestGenerate-MutationArgsWithCollidingNames.graphql-MutationArgsWithCollidingNames.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-MutationArgsWithCollidingNames.graphql-MutationArgsWithCollidingNames.graphql.go @@ -66,7 +66,7 @@ func MutationArgsWithCollidingNames( req int, resp int, client string, -) (*MutationArgsWithCollidingNamesResponse, error) { +) (data_ *MutationArgsWithCollidingNamesResponse, err error) { req_ := &graphql.Request{ OpName: "MutationArgsWithCollidingNames", Query: MutationArgsWithCollidingNames_Operation, @@ -79,8 +79,8 @@ func MutationArgsWithCollidingNames( } var err_ error - var data_ MutationArgsWithCollidingNamesResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &MutationArgsWithCollidingNamesResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -88,6 +88,6 @@ func MutationArgsWithCollidingNames( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-Omitempty.graphql-Omitempty.graphql.go b/generate/testdata/snapshots/TestGenerate-Omitempty.graphql-Omitempty.graphql.go index 25b4eab9..d2762a41 100644 --- a/generate/testdata/snapshots/TestGenerate-Omitempty.graphql-Omitempty.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-Omitempty.graphql-Omitempty.graphql.go @@ -240,7 +240,7 @@ func OmitEmptyQuery( dt time.Time, tz string, tzNoOmitEmpty string, -) (*OmitEmptyQueryResponse, error) { +) (data_ *OmitEmptyQueryResponse, err error) { req_ := &graphql.Request{ OpName: "OmitEmptyQuery", Query: OmitEmptyQuery_Operation, @@ -254,8 +254,8 @@ func OmitEmptyQuery( } var err_ error - var data_ OmitEmptyQueryResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &OmitEmptyQueryResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -263,6 +263,6 @@ func OmitEmptyQuery( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-Pointers.graphql-Pointers.graphql.go b/generate/testdata/snapshots/TestGenerate-Pointers.graphql-Pointers.graphql.go index eb755b73..108c4c42 100644 --- a/generate/testdata/snapshots/TestGenerate-Pointers.graphql-Pointers.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-Pointers.graphql-Pointers.graphql.go @@ -252,7 +252,7 @@ func PointersQuery( query *UserQueryInput, dt time.Time, tz *string, -) (*PointersQueryResponse, error) { +) (data_ *PointersQueryResponse, err error) { req_ := &graphql.Request{ OpName: "PointersQuery", Query: PointersQuery_Operation, @@ -264,8 +264,8 @@ func PointersQuery( } var err_ error - var data_ PointersQueryResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &PointersQueryResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -273,6 +273,6 @@ func PointersQuery( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-PointersInline.graphql-PointersInline.graphql.go b/generate/testdata/snapshots/TestGenerate-PointersInline.graphql-PointersInline.graphql.go index 7f5a3762..0b67cc7c 100644 --- a/generate/testdata/snapshots/TestGenerate-PointersInline.graphql-PointersInline.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-PointersInline.graphql-PointersInline.graphql.go @@ -249,7 +249,7 @@ func PointersQuery( query *UserQueryInput, dt *time.Time, tz string, -) (*PointersQueryResponse, error) { +) (data_ *PointersQueryResponse, err error) { req_ := &graphql.Request{ OpName: "PointersQuery", Query: PointersQuery_Operation, @@ -261,8 +261,8 @@ func PointersQuery( } var err_ error - var data_ PointersQueryResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &PointersQueryResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -270,6 +270,6 @@ func PointersQuery( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-Pokemon.graphql-Pokemon.graphql.go b/generate/testdata/snapshots/TestGenerate-Pokemon.graphql-Pokemon.graphql.go index ba9278f7..6e0ad09e 100644 --- a/generate/testdata/snapshots/TestGenerate-Pokemon.graphql-Pokemon.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-Pokemon.graphql-Pokemon.graphql.go @@ -93,7 +93,7 @@ query GetPokemonSiblings ($input: PokemonInput!) { func GetPokemonSiblings( client_ graphql.Client, input testutil.Pokemon, -) (*GetPokemonSiblingsResponse, error) { +) (data_ *GetPokemonSiblingsResponse, err error) { req_ := &graphql.Request{ OpName: "GetPokemonSiblings", Query: GetPokemonSiblings_Operation, @@ -103,8 +103,8 @@ func GetPokemonSiblings( } var err_ error - var data_ GetPokemonSiblingsResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &GetPokemonSiblingsResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -112,6 +112,6 @@ func GetPokemonSiblings( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-QueryWithAlias.graphql-QueryWithAlias.graphql.go b/generate/testdata/snapshots/TestGenerate-QueryWithAlias.graphql-QueryWithAlias.graphql.go index 104d50f8..7daa0a65 100644 --- a/generate/testdata/snapshots/TestGenerate-QueryWithAlias.graphql-QueryWithAlias.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-QueryWithAlias.graphql-QueryWithAlias.graphql.go @@ -52,15 +52,15 @@ query QueryWithAlias { func QueryWithAlias( client_ graphql.Client, -) (*QueryWithAliasResponse, error) { +) (data_ *QueryWithAliasResponse, err error) { req_ := &graphql.Request{ OpName: "QueryWithAlias", Query: QueryWithAlias_Operation, } var err_ error - var data_ QueryWithAliasResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &QueryWithAliasResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -68,6 +68,6 @@ func QueryWithAlias( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-QueryWithDoubleAlias.graphql-QueryWithDoubleAlias.graphql.go b/generate/testdata/snapshots/TestGenerate-QueryWithDoubleAlias.graphql-QueryWithDoubleAlias.graphql.go index 4f922f24..2860b848 100644 --- a/generate/testdata/snapshots/TestGenerate-QueryWithDoubleAlias.graphql-QueryWithDoubleAlias.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-QueryWithDoubleAlias.graphql-QueryWithDoubleAlias.graphql.go @@ -52,15 +52,15 @@ query QueryWithDoubleAlias { func QueryWithDoubleAlias( client_ graphql.Client, -) (*QueryWithDoubleAliasResponse, error) { +) (data_ *QueryWithDoubleAliasResponse, err error) { req_ := &graphql.Request{ OpName: "QueryWithDoubleAlias", Query: QueryWithDoubleAlias_Operation, } var err_ error - var data_ QueryWithDoubleAliasResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &QueryWithDoubleAliasResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -68,6 +68,6 @@ func QueryWithDoubleAlias( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-QueryWithEnums.graphql-QueryWithEnums.graphql.go b/generate/testdata/snapshots/TestGenerate-QueryWithEnums.graphql-QueryWithEnums.graphql.go index 86748419..51a9d34a 100644 --- a/generate/testdata/snapshots/TestGenerate-QueryWithEnums.graphql-QueryWithEnums.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-QueryWithEnums.graphql-QueryWithEnums.graphql.go @@ -76,15 +76,15 @@ query QueryWithEnums { func QueryWithEnums( client_ graphql.Client, -) (*QueryWithEnumsResponse, error) { +) (data_ *QueryWithEnumsResponse, err error) { req_ := &graphql.Request{ OpName: "QueryWithEnums", Query: QueryWithEnums_Operation, } var err_ error - var data_ QueryWithEnumsResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &QueryWithEnumsResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -92,6 +92,6 @@ func QueryWithEnums( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-QueryWithSlices.graphql-QueryWithSlices.graphql.go b/generate/testdata/snapshots/TestGenerate-QueryWithSlices.graphql-QueryWithSlices.graphql.go index b949c5e8..a1fe9049 100644 --- a/generate/testdata/snapshots/TestGenerate-QueryWithSlices.graphql-QueryWithSlices.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-QueryWithSlices.graphql-QueryWithSlices.graphql.go @@ -55,15 +55,15 @@ query QueryWithSlices { func QueryWithSlices( client_ graphql.Client, -) (*QueryWithSlicesResponse, error) { +) (data_ *QueryWithSlicesResponse, err error) { req_ := &graphql.Request{ OpName: "QueryWithSlices", Query: QueryWithSlices_Operation, } var err_ error - var data_ QueryWithSlicesResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &QueryWithSlicesResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -71,6 +71,6 @@ func QueryWithSlices( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-QueryWithStructs.graphql-QueryWithStructs.graphql.go b/generate/testdata/snapshots/TestGenerate-QueryWithStructs.graphql-QueryWithStructs.graphql.go index 5a04fa27..596f633f 100644 --- a/generate/testdata/snapshots/TestGenerate-QueryWithStructs.graphql-QueryWithStructs.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-QueryWithStructs.graphql-QueryWithStructs.graphql.go @@ -57,15 +57,15 @@ query QueryWithStructs { func QueryWithStructs( client_ graphql.Client, -) (*QueryWithStructsResponse, error) { +) (data_ *QueryWithStructsResponse, err error) { req_ := &graphql.Request{ OpName: "QueryWithStructs", Query: QueryWithStructs_Operation, } var err_ error - var data_ QueryWithStructsResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &QueryWithStructsResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -73,6 +73,6 @@ func QueryWithStructs( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-Recursion.graphql-Recursion.graphql.go b/generate/testdata/snapshots/TestGenerate-Recursion.graphql-Recursion.graphql.go index 75f3e549..30a833bc 100644 --- a/generate/testdata/snapshots/TestGenerate-Recursion.graphql-Recursion.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-Recursion.graphql-Recursion.graphql.go @@ -86,7 +86,7 @@ query Recursion ($input: RecursiveInput!) { func Recursion( client_ graphql.Client, input RecursiveInput, -) (*RecursionResponse, error) { +) (data_ *RecursionResponse, err error) { req_ := &graphql.Request{ OpName: "Recursion", Query: Recursion_Operation, @@ -96,8 +96,8 @@ func Recursion( } var err_ error - var data_ RecursionResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &RecursionResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -105,6 +105,6 @@ func Recursion( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-SimpleInlineFragment.graphql-SimpleInlineFragment.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleInlineFragment.graphql-SimpleInlineFragment.graphql.go index c832529c..d5d738b4 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleInlineFragment.graphql-SimpleInlineFragment.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleInlineFragment.graphql-SimpleInlineFragment.graphql.go @@ -258,15 +258,15 @@ query SimpleInlineFragment { func SimpleInlineFragment( client_ graphql.Client, -) (*SimpleInlineFragmentResponse, error) { +) (data_ *SimpleInlineFragmentResponse, err error) { req_ := &graphql.Request{ OpName: "SimpleInlineFragment", Query: SimpleInlineFragment_Operation, } var err_ error - var data_ SimpleInlineFragmentResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &SimpleInlineFragmentResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -274,6 +274,6 @@ func SimpleInlineFragment( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-SimpleInput.graphql-SimpleInput.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleInput.graphql-SimpleInput.graphql.go index ec92b37e..45f5a563 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleInput.graphql-SimpleInput.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleInput.graphql-SimpleInput.graphql.go @@ -53,7 +53,7 @@ query SimpleInputQuery ($name: String!) { func SimpleInputQuery( client_ graphql.Client, name string, -) (*SimpleInputQueryResponse, error) { +) (data_ *SimpleInputQueryResponse, err error) { req_ := &graphql.Request{ OpName: "SimpleInputQuery", Query: SimpleInputQuery_Operation, @@ -63,8 +63,8 @@ func SimpleInputQuery( } var err_ error - var data_ SimpleInputQueryResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &SimpleInputQueryResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -72,6 +72,6 @@ func SimpleInputQuery( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-SimpleMutation.graphql-SimpleMutation.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleMutation.graphql-SimpleMutation.graphql.go index 08e09e09..c7d5c5bd 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleMutation.graphql-SimpleMutation.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleMutation.graphql-SimpleMutation.graphql.go @@ -58,7 +58,7 @@ mutation SimpleMutation ($name: String!) { func SimpleMutation( client_ graphql.Client, name string, -) (*SimpleMutationResponse, error) { +) (data_ *SimpleMutationResponse, err error) { req_ := &graphql.Request{ OpName: "SimpleMutation", Query: SimpleMutation_Operation, @@ -68,8 +68,8 @@ func SimpleMutation( } var err_ error - var data_ SimpleMutationResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &SimpleMutationResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -77,6 +77,6 @@ func SimpleMutation( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-SimpleNamedFragment.graphql-SimpleNamedFragment.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleNamedFragment.graphql-SimpleNamedFragment.graphql.go index 01bfe779..14fe5dd1 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleNamedFragment.graphql-SimpleNamedFragment.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleNamedFragment.graphql-SimpleNamedFragment.graphql.go @@ -573,15 +573,15 @@ fragment VideoFields on Video { func SimpleNamedFragment( client_ graphql.Client, -) (*SimpleNamedFragmentResponse, error) { +) (data_ *SimpleNamedFragmentResponse, err error) { req_ := &graphql.Request{ OpName: "SimpleNamedFragment", Query: SimpleNamedFragment_Operation, } var err_ error - var data_ SimpleNamedFragmentResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &SimpleNamedFragmentResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -589,6 +589,6 @@ func SimpleNamedFragment( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-SimpleQuery.graphql-SimpleQuery.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleQuery.graphql-SimpleQuery.graphql.go index 3069c18a..19d52095 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleQuery.graphql-SimpleQuery.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleQuery.graphql-SimpleQuery.graphql.go @@ -44,15 +44,15 @@ query SimpleQuery { func SimpleQuery( client_ graphql.Client, -) (*SimpleQueryResponse, error) { +) (data_ *SimpleQueryResponse, err error) { req_ := &graphql.Request{ OpName: "SimpleQuery", Query: SimpleQuery_Operation, } var err_ error - var data_ SimpleQueryResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &SimpleQueryResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -60,6 +60,6 @@ func SimpleQuery( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-SimpleQueryNoOverride.graphql-SimpleQueryNoOverride.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleQueryNoOverride.graphql-SimpleQueryNoOverride.graphql.go index 3470be45..b2d499cd 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleQueryNoOverride.graphql-SimpleQueryNoOverride.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleQueryNoOverride.graphql-SimpleQueryNoOverride.graphql.go @@ -49,15 +49,15 @@ query SimpleQueryNoOverride { func SimpleQueryNoOverride( client_ graphql.Client, -) (*SimpleQueryNoOverrideResponse, error) { +) (data_ *SimpleQueryNoOverrideResponse, err error) { req_ := &graphql.Request{ OpName: "SimpleQueryNoOverride", Query: SimpleQueryNoOverride_Operation, } var err_ error - var data_ SimpleQueryNoOverrideResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &SimpleQueryNoOverrideResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -65,6 +65,6 @@ func SimpleQueryNoOverride( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-SimpleQueryWithPointerFalseOverride.graphql-SimpleQueryWithPointerFalseOverride.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleQueryWithPointerFalseOverride.graphql-SimpleQueryWithPointerFalseOverride.graphql.go index 292d17a3..227f52c7 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleQueryWithPointerFalseOverride.graphql-SimpleQueryWithPointerFalseOverride.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleQueryWithPointerFalseOverride.graphql-SimpleQueryWithPointerFalseOverride.graphql.go @@ -51,15 +51,15 @@ query SimpleQueryWithPointerFalseOverride { func SimpleQueryWithPointerFalseOverride( client_ graphql.Client, -) (*SimpleQueryWithPointerFalseOverrideResponse, error) { +) (data_ *SimpleQueryWithPointerFalseOverrideResponse, err error) { req_ := &graphql.Request{ OpName: "SimpleQueryWithPointerFalseOverride", Query: SimpleQueryWithPointerFalseOverride_Operation, } var err_ error - var data_ SimpleQueryWithPointerFalseOverrideResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &SimpleQueryWithPointerFalseOverrideResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -67,6 +67,6 @@ func SimpleQueryWithPointerFalseOverride( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go index 451e182b..de0983d7 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go @@ -25,24 +25,25 @@ subscription SimpleSubscription { func SimpleSubscription( client_ graphql.Client, -) (chan SimpleSubscriptionWsResponse, chan struct{}, chan error, error) { +) (dataChan_ chan SimpleSubscriptionWsResponse, doneChan_ chan bool, errChan_ chan error, err error) { req_ := &graphql.Request{ OpName: "SimpleSubscription", Query: SimpleSubscription_Operation, } var err_ error - var data_ SimpleSubscriptionResponse - resp_ := &graphql.Response{Data: &data_} + var data_ *SimpleSubscriptionResponse + data_ = &SimpleSubscriptionResponse{} + resp_ := &graphql.Response{Data: data_} - dataChan_ := make(chan SimpleSubscriptionWsResponse, 1) + dataChan_ = make(chan SimpleSubscriptionWsResponse, 1) dataUpdated_ := make(chan bool, 1) - doneChan_, errChan_, err_ := client_.DialWebSocket(context.Background(), req_, resp_, dataUpdated_) + doneChan_, errChan_, err_ = client_.DialWebSocket(context.Background(), req_, resp_, dataUpdated_) if err_ != nil { return nil, nil, nil, err_ } - go SimpleSubscriptionForwardData(dataChan_, resp_, dataUpdated_, errChan_) + go SimpleSubscriptionForwardData(dataChan_, resp_, dataUpdated_) return dataChan_, doneChan_, errChan_, err_ } @@ -53,7 +54,7 @@ type SimpleSubscriptionWsResponse struct { Errors error } -func SimpleSubscriptionForwardData(dataChan_ chan SimpleSubscriptionWsResponse, resp_ *graphql.Response, dataUpdated_ chan bool, errChan_ chan error) { +func SimpleSubscriptionForwardData(dataChan_ chan SimpleSubscriptionWsResponse, resp_ *graphql.Response, dataUpdated_ chan bool) { defer close(dataChan_) for { _, more_ := <-dataUpdated_ diff --git a/generate/testdata/snapshots/TestGenerate-StructOption.graphql-StructOption.graphql.go b/generate/testdata/snapshots/TestGenerate-StructOption.graphql-StructOption.graphql.go index 63836c02..4e88c47a 100644 --- a/generate/testdata/snapshots/TestGenerate-StructOption.graphql-StructOption.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-StructOption.graphql-StructOption.graphql.go @@ -457,15 +457,15 @@ fragment VideoFields on Video { func StructOption( client_ graphql.Client, -) (*StructOptionResponse, error) { +) (data_ *StructOptionResponse, err error) { req_ := &graphql.Request{ OpName: "StructOption", Query: StructOption_Operation, } var err_ error - var data_ StructOptionResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &StructOptionResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -473,6 +473,6 @@ func StructOption( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-TypeName.graphql-TypeName.graphql.go b/generate/testdata/snapshots/TestGenerate-TypeName.graphql-TypeName.graphql.go index f967d81d..0c30ef64 100644 --- a/generate/testdata/snapshots/TestGenerate-TypeName.graphql-TypeName.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-TypeName.graphql-TypeName.graphql.go @@ -49,15 +49,15 @@ query TypeNameQuery { func TypeNameQuery( client_ graphql.Client, -) (*TypeNameQueryResponse, error) { +) (data_ *TypeNameQueryResponse, err error) { req_ := &graphql.Request{ OpName: "TypeNameQuery", Query: TypeNameQuery_Operation, } var err_ error - var data_ TypeNameQueryResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &TypeNameQueryResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -65,6 +65,6 @@ func TypeNameQuery( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-TypeNames.graphql-TypeNames.graphql.go b/generate/testdata/snapshots/TestGenerate-TypeNames.graphql-TypeNames.graphql.go index 34e0fed2..2bb981d8 100644 --- a/generate/testdata/snapshots/TestGenerate-TypeNames.graphql-TypeNames.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-TypeNames.graphql-TypeNames.graphql.go @@ -285,15 +285,15 @@ query TypeNames { func TypeNames( client_ graphql.Client, -) (*Resp, error) { +) (data_ *Resp, err error) { req_ := &graphql.Request{ OpName: "TypeNames", Query: TypeNames_Operation, } var err_ error - var data_ Resp - resp_ := &graphql.Response{Data: &data_} + data_ = &Resp{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -301,6 +301,6 @@ func TypeNames( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-UnionNoFragments.graphql-UnionNoFragments.graphql.go b/generate/testdata/snapshots/TestGenerate-UnionNoFragments.graphql-UnionNoFragments.graphql.go index dd123b3b..ea74b1d1 100644 --- a/generate/testdata/snapshots/TestGenerate-UnionNoFragments.graphql-UnionNoFragments.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-UnionNoFragments.graphql-UnionNoFragments.graphql.go @@ -185,15 +185,15 @@ query UnionNoFragmentsQuery { func UnionNoFragmentsQuery( client_ graphql.Client, -) (*UnionNoFragmentsQueryResponse, error) { +) (data_ *UnionNoFragmentsQueryResponse, err error) { req_ := &graphql.Request{ OpName: "UnionNoFragmentsQuery", Query: UnionNoFragmentsQuery_Operation, } var err_ error - var data_ UnionNoFragmentsQueryResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &UnionNoFragmentsQueryResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -201,6 +201,6 @@ func UnionNoFragmentsQuery( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-UsesEnumTwice.graphql-UsesEnumTwice.graphql.go b/generate/testdata/snapshots/TestGenerate-UsesEnumTwice.graphql-UsesEnumTwice.graphql.go index 88519924..ab8dc138 100644 --- a/generate/testdata/snapshots/TestGenerate-UsesEnumTwice.graphql-UsesEnumTwice.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-UsesEnumTwice.graphql-UsesEnumTwice.graphql.go @@ -76,15 +76,15 @@ query UsesEnumTwiceQuery { func UsesEnumTwiceQuery( client_ graphql.Client, -) (*UsesEnumTwiceQueryResponse, error) { +) (data_ *UsesEnumTwiceQueryResponse, err error) { req_ := &graphql.Request{ OpName: "UsesEnumTwiceQuery", Query: UsesEnumTwiceQuery_Operation, } var err_ error - var data_ UsesEnumTwiceQueryResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &UsesEnumTwiceQueryResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -92,6 +92,6 @@ func UsesEnumTwiceQuery( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-unexported.graphql-unexported.graphql.go b/generate/testdata/snapshots/TestGenerate-unexported.graphql-unexported.graphql.go index dfaf60af..043d87e4 100644 --- a/generate/testdata/snapshots/TestGenerate-unexported.graphql-unexported.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-unexported.graphql-unexported.graphql.go @@ -189,7 +189,7 @@ query unexported ($query: UserQueryInput) { func unexported( client_ graphql.Client, query UserQueryInput, -) (*unexportedResponse, error) { +) (data_ *unexportedResponse, err error) { req_ := &graphql.Request{ OpName: "unexported", Query: unexported_Operation, @@ -199,8 +199,8 @@ func unexported( } var err_ error - var data_ unexportedResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &unexportedResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -208,6 +208,6 @@ func unexported( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetter-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetter-testdata-queries-generated.go index 0711819e..f3c8977f 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetter-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetter-testdata-queries-generated.go @@ -46,7 +46,7 @@ query SimpleQuery { func SimpleQuery( ctx_ context.Context, -) (*SimpleQueryResponse, error) { +) (data_ *SimpleQueryResponse, err error) { req_ := &graphql.Request{ OpName: "SimpleQuery", Query: SimpleQuery_Operation, @@ -59,8 +59,8 @@ func SimpleQuery( return nil, err_ } - var data_ SimpleQueryResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &SimpleQueryResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -68,6 +68,6 @@ func SimpleQuery( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterCustomContext-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterCustomContext-testdata-queries-generated.go index 8e8556ad..371cddd5 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterCustomContext-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterCustomContext-testdata-queries-generated.go @@ -49,7 +49,7 @@ query SimpleQuery { func SimpleQuery( ctx_ testutil.MyContext, -) (*SimpleQueryResponse, error) { +) (data_ *SimpleQueryResponse, err error) { req_ := &graphql.Request{ OpName: "SimpleQuery", Query: SimpleQuery_Operation, @@ -62,8 +62,8 @@ func SimpleQuery( return nil, err_ } - var data_ SimpleQueryResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &SimpleQueryResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -71,6 +71,6 @@ func SimpleQuery( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterNoContext-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterNoContext-testdata-queries-generated.go index 114d7fe7..2cc9729a 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterNoContext-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterNoContext-testdata-queries-generated.go @@ -42,7 +42,7 @@ query SimpleQuery { } ` -func SimpleQuery() (*SimpleQueryResponse, error) { +func SimpleQuery() (data_ *SimpleQueryResponse, err error) { req_ := &graphql.Request{ OpName: "SimpleQuery", Query: SimpleQuery_Operation, @@ -55,8 +55,8 @@ func SimpleQuery() (*SimpleQueryResponse, error) { return nil, err_ } - var data_ SimpleQueryResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &SimpleQueryResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -64,6 +64,6 @@ func SimpleQuery() (*SimpleQueryResponse, error) { resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-CustomContext-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-CustomContext-testdata-queries-generated.go index 1ab82fc5..91edbae6 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-CustomContext-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-CustomContext-testdata-queries-generated.go @@ -50,15 +50,15 @@ query SimpleQuery { func SimpleQuery( ctx_ testutil.MyContext, client_ graphql.Client, -) (*SimpleQueryResponse, error) { +) (data_ *SimpleQueryResponse, err error) { req_ := &graphql.Request{ OpName: "SimpleQuery", Query: SimpleQuery_Operation, } var err_ error - var data_ SimpleQueryResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &SimpleQueryResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -66,6 +66,6 @@ func SimpleQuery( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-CustomContextWithAlias-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-CustomContextWithAlias-testdata-queries-generated.go index e7ce02d1..4d636265 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-CustomContextWithAlias-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-CustomContextWithAlias-testdata-queries-generated.go @@ -50,15 +50,15 @@ query SimpleQuery { func SimpleQuery( ctx_ junkfunname.MyContext, client_ graphql.Client, -) (*SimpleQueryResponse, error) { +) (data_ *SimpleQueryResponse, err error) { req_ := &graphql.Request{ OpName: "SimpleQuery", Query: SimpleQuery_Operation, } var err_ error - var data_ SimpleQueryResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &SimpleQueryResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -66,6 +66,6 @@ func SimpleQuery( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-DefaultConfig-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-DefaultConfig-testdata-queries-generated.go index 045edae9..782538c8 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-DefaultConfig-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-DefaultConfig-testdata-queries-generated.go @@ -46,15 +46,15 @@ query SimpleQuery { func SimpleQuery( ctx_ context.Context, client_ graphql.Client, -) (*SimpleQueryResponse, error) { +) (data_ *SimpleQueryResponse, err error) { req_ := &graphql.Request{ OpName: "SimpleQuery", Query: SimpleQuery_Operation, } var err_ error - var data_ SimpleQueryResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &SimpleQueryResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -62,6 +62,6 @@ func SimpleQuery( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingAll-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingAll-testdata-queries-generated.go index 92f7134e..1b9e14b9 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingAll-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingAll-testdata-queries-generated.go @@ -79,15 +79,15 @@ query QueryWithEnums { func QueryWithEnums( ctx_ context.Context, client_ graphql.Client, -) (*QueryWithEnumsResponse, error) { +) (data_ *QueryWithEnumsResponse, err error) { req_ := &graphql.Request{ OpName: "QueryWithEnums", Query: QueryWithEnums_Operation, } var err_ error - var data_ QueryWithEnumsResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &QueryWithEnumsResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -95,6 +95,6 @@ func QueryWithEnums( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingSpecific-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingSpecific-testdata-queries-generated.go index 92f7134e..1b9e14b9 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingSpecific-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingSpecific-testdata-queries-generated.go @@ -79,15 +79,15 @@ query QueryWithEnums { func QueryWithEnums( ctx_ context.Context, client_ graphql.Client, -) (*QueryWithEnumsResponse, error) { +) (data_ *QueryWithEnumsResponse, err error) { req_ := &graphql.Request{ OpName: "QueryWithEnums", Query: QueryWithEnums_Operation, } var err_ error - var data_ QueryWithEnumsResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &QueryWithEnumsResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -95,6 +95,6 @@ func QueryWithEnums( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-ExportOperations-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-ExportOperations-testdata-queries-generated.go index 045edae9..782538c8 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-ExportOperations-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-ExportOperations-testdata-queries-generated.go @@ -46,15 +46,15 @@ query SimpleQuery { func SimpleQuery( ctx_ context.Context, client_ graphql.Client, -) (*SimpleQueryResponse, error) { +) (data_ *SimpleQueryResponse, err error) { req_ := &graphql.Request{ OpName: "SimpleQuery", Query: SimpleQuery_Operation, } var err_ error - var data_ SimpleQueryResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &SimpleQueryResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -62,6 +62,6 @@ func SimpleQuery( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-Extensions-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-Extensions-testdata-queries-generated.go index 919b04ab..0df568fb 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-Extensions-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-Extensions-testdata-queries-generated.go @@ -46,15 +46,15 @@ query SimpleQuery { func SimpleQuery( ctx_ context.Context, client_ graphql.Client, -) (*SimpleQueryResponse, map[string]interface{}, error) { +) (data_ *SimpleQueryResponse, ext_ map[string]interface{}, err error) { req_ := &graphql.Request{ OpName: "SimpleQuery", Query: SimpleQuery_Operation, } var err_ error - var data_ SimpleQueryResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &SimpleQueryResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -62,6 +62,6 @@ func SimpleQuery( resp_, ) - return &data_, resp_.Extensions, err_ + return data_, resp_.Extensions, err_ } diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-NoContext-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-NoContext-testdata-queries-generated.go index 8e74f4f6..694fdee1 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-NoContext-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-NoContext-testdata-queries-generated.go @@ -43,15 +43,15 @@ query SimpleQuery { func SimpleQuery( client_ graphql.Client, -) (*SimpleQueryResponse, error) { +) (data_ *SimpleQueryResponse, err error) { req_ := &graphql.Request{ OpName: "SimpleQuery", Query: SimpleQuery_Operation, } var err_ error - var data_ SimpleQueryResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &SimpleQueryResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -59,6 +59,6 @@ func SimpleQuery( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalGeneric-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalGeneric-testdata-queries-generated.go index 066eaa3c..c95c65e5 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalGeneric-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalGeneric-testdata-queries-generated.go @@ -95,7 +95,7 @@ func ListInputQuery( ctx_ context.Context, client_ graphql.Client, names []testutil.Option[string], -) (*ListInputQueryResponse, error) { +) (data_ *ListInputQueryResponse, err error) { req_ := &graphql.Request{ OpName: "ListInputQuery", Query: ListInputQuery_Operation, @@ -105,8 +105,8 @@ func ListInputQuery( } var err_ error - var data_ ListInputQueryResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &ListInputQueryResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -114,7 +114,7 @@ func ListInputQuery( resp_, ) - return &data_, err_ + return data_, err_ } // The query, mutation or subscription executed by QueryWithSlices. @@ -132,15 +132,15 @@ query QueryWithSlices { func QueryWithSlices( ctx_ context.Context, client_ graphql.Client, -) (*QueryWithSlicesResponse, error) { +) (data_ *QueryWithSlicesResponse, err error) { req_ := &graphql.Request{ OpName: "QueryWithSlices", Query: QueryWithSlices_Operation, } var err_ error - var data_ QueryWithSlicesResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &QueryWithSlicesResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -148,6 +148,6 @@ func QueryWithSlices( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointer-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointer-testdata-queries-generated.go index 2935cfac..7e943e36 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointer-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointer-testdata-queries-generated.go @@ -152,7 +152,7 @@ func ListInputQuery( ctx_ context.Context, client_ graphql.Client, names []*string, -) (*ListInputQueryResponse, error) { +) (data_ *ListInputQueryResponse, err error) { req_ := &graphql.Request{ OpName: "ListInputQuery", Query: ListInputQuery_Operation, @@ -162,8 +162,8 @@ func ListInputQuery( } var err_ error - var data_ ListInputQueryResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &ListInputQueryResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -171,7 +171,7 @@ func ListInputQuery( resp_, ) - return &data_, err_ + return data_, err_ } // The query, mutation or subscription executed by QueryWithSlices. @@ -189,15 +189,15 @@ query QueryWithSlices { func QueryWithSlices( ctx_ context.Context, client_ graphql.Client, -) (*QueryWithSlicesResponse, error) { +) (data_ *QueryWithSlicesResponse, err error) { req_ := &graphql.Request{ OpName: "QueryWithSlices", Query: QueryWithSlices_Operation, } var err_ error - var data_ QueryWithSlicesResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &QueryWithSlicesResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -205,7 +205,7 @@ func QueryWithSlices( resp_, ) - return &data_, err_ + return data_, err_ } // The query, mutation or subscription executed by SimpleQueryNoOverride. @@ -221,15 +221,15 @@ query SimpleQueryNoOverride { func SimpleQueryNoOverride( ctx_ context.Context, client_ graphql.Client, -) (*SimpleQueryNoOverrideResponse, error) { +) (data_ *SimpleQueryNoOverrideResponse, err error) { req_ := &graphql.Request{ OpName: "SimpleQueryNoOverride", Query: SimpleQueryNoOverride_Operation, } var err_ error - var data_ SimpleQueryNoOverrideResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &SimpleQueryNoOverrideResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -237,7 +237,7 @@ func SimpleQueryNoOverride( resp_, ) - return &data_, err_ + return data_, err_ } // The query, mutation or subscription executed by SimpleQueryWithPointerFalseOverride. @@ -253,15 +253,15 @@ query SimpleQueryWithPointerFalseOverride { func SimpleQueryWithPointerFalseOverride( ctx_ context.Context, client_ graphql.Client, -) (*SimpleQueryWithPointerFalseOverrideResponse, error) { +) (data_ *SimpleQueryWithPointerFalseOverrideResponse, err error) { req_ := &graphql.Request{ OpName: "SimpleQueryWithPointerFalseOverride", Query: SimpleQueryWithPointerFalseOverride_Operation, } var err_ error - var data_ SimpleQueryWithPointerFalseOverrideResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &SimpleQueryWithPointerFalseOverrideResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -269,6 +269,6 @@ func SimpleQueryWithPointerFalseOverride( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalValue-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalValue-testdata-queries-generated.go index 2f87f5b8..f1b477fc 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalValue-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalValue-testdata-queries-generated.go @@ -90,7 +90,7 @@ func ListInputQuery( ctx_ context.Context, client_ graphql.Client, names []string, -) (*ListInputQueryResponse, error) { +) (data_ *ListInputQueryResponse, err error) { req_ := &graphql.Request{ OpName: "ListInputQuery", Query: ListInputQuery_Operation, @@ -100,8 +100,8 @@ func ListInputQuery( } var err_ error - var data_ ListInputQueryResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &ListInputQueryResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -109,7 +109,7 @@ func ListInputQuery( resp_, ) - return &data_, err_ + return data_, err_ } // The query, mutation or subscription executed by QueryWithSlices. @@ -127,15 +127,15 @@ query QueryWithSlices { func QueryWithSlices( ctx_ context.Context, client_ graphql.Client, -) (*QueryWithSlicesResponse, error) { +) (data_ *QueryWithSlicesResponse, err error) { req_ := &graphql.Request{ OpName: "QueryWithSlices", Query: QueryWithSlices_Operation, } var err_ error - var data_ QueryWithSlicesResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &QueryWithSlicesResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -143,6 +143,6 @@ func QueryWithSlices( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-PackageBindings-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-PackageBindings-testdata-queries-generated.go index fe24616f..be14a82c 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-PackageBindings-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-PackageBindings-testdata-queries-generated.go @@ -47,15 +47,15 @@ query SimpleQuery { func SimpleQuery( ctx_ context.Context, client_ graphql.Client, -) (*SimpleQueryResponse, error) { +) (data_ *SimpleQueryResponse, err error) { req_ := &graphql.Request{ OpName: "SimpleQuery", Query: SimpleQuery_Operation, } var err_ error - var data_ SimpleQueryResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &SimpleQueryResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -63,6 +63,6 @@ func SimpleQuery( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-PackageName-testdata-queries-myfile.go b/generate/testdata/snapshots/TestGenerateWithConfig-PackageName-testdata-queries-myfile.go index 61f31c2c..cb671179 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-PackageName-testdata-queries-myfile.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-PackageName-testdata-queries-myfile.go @@ -46,15 +46,15 @@ query SimpleQuery { func SimpleQuery( ctx_ context.Context, client_ graphql.Client, -) (*SimpleQueryResponse, error) { +) (data_ *SimpleQueryResponse, err error) { req_ := &graphql.Request{ OpName: "SimpleQuery", Query: SimpleQuery_Operation, } var err_ error - var data_ SimpleQueryResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &SimpleQueryResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -62,6 +62,6 @@ func SimpleQuery( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-StructReferences-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-StructReferences-testdata-queries-generated.go index 7ccb0f66..b7ef2bc9 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-StructReferences-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-StructReferences-testdata-queries-generated.go @@ -239,7 +239,7 @@ func InputObjectQuery( ctx_ context.Context, client_ graphql.Client, query *UserQueryInput, -) (*InputObjectQueryResponse, error) { +) (data_ *InputObjectQueryResponse, err error) { req_ := &graphql.Request{ OpName: "InputObjectQuery", Query: InputObjectQuery_Operation, @@ -249,8 +249,8 @@ func InputObjectQuery( } var err_ error - var data_ InputObjectQueryResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &InputObjectQueryResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -258,7 +258,7 @@ func InputObjectQuery( resp_, ) - return &data_, err_ + return data_, err_ } // The query, mutation or subscription executed by QueryWithStructs. @@ -276,15 +276,15 @@ query QueryWithStructs { func QueryWithStructs( ctx_ context.Context, client_ graphql.Client, -) (*QueryWithStructsResponse, error) { +) (data_ *QueryWithStructsResponse, err error) { req_ := &graphql.Request{ OpName: "QueryWithStructs", Query: QueryWithStructs_Operation, } var err_ error - var data_ QueryWithStructsResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &QueryWithStructsResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -292,6 +292,6 @@ func QueryWithStructs( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-StructReferencesAndOptionalPointer-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-StructReferencesAndOptionalPointer-testdata-queries-generated.go index 3224391a..6330a4c5 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-StructReferencesAndOptionalPointer-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-StructReferencesAndOptionalPointer-testdata-queries-generated.go @@ -242,7 +242,7 @@ func InputObjectQuery( ctx_ context.Context, client_ graphql.Client, query *UserQueryInput, -) (*InputObjectQueryResponse, error) { +) (data_ *InputObjectQueryResponse, err error) { req_ := &graphql.Request{ OpName: "InputObjectQuery", Query: InputObjectQuery_Operation, @@ -252,8 +252,8 @@ func InputObjectQuery( } var err_ error - var data_ InputObjectQueryResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &InputObjectQueryResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -261,7 +261,7 @@ func InputObjectQuery( resp_, ) - return &data_, err_ + return data_, err_ } // The query, mutation or subscription executed by QueryWithStructs. @@ -279,15 +279,15 @@ query QueryWithStructs { func QueryWithStructs( ctx_ context.Context, client_ graphql.Client, -) (*QueryWithStructsResponse, error) { +) (data_ *QueryWithStructsResponse, err error) { req_ := &graphql.Request{ OpName: "QueryWithStructs", Query: QueryWithStructs_Operation, } var err_ error - var data_ QueryWithStructsResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &QueryWithStructsResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -295,6 +295,6 @@ func QueryWithStructs( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-Subpackage-testdata-queries-mypkg-myfile.go b/generate/testdata/snapshots/TestGenerateWithConfig-Subpackage-testdata-queries-mypkg-myfile.go index 61f31c2c..cb671179 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-Subpackage-testdata-queries-mypkg-myfile.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-Subpackage-testdata-queries-mypkg-myfile.go @@ -46,15 +46,15 @@ query SimpleQuery { func SimpleQuery( ctx_ context.Context, client_ graphql.Client, -) (*SimpleQueryResponse, error) { +) (data_ *SimpleQueryResponse, err error) { req_ := &graphql.Request{ OpName: "SimpleQuery", Query: SimpleQuery_Operation, } var err_ error - var data_ SimpleQueryResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &SimpleQueryResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -62,6 +62,6 @@ func SimpleQuery( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-SubpackageConfig-testdata-queries-mypkg-myfile.go b/generate/testdata/snapshots/TestGenerateWithConfig-SubpackageConfig-testdata-queries-mypkg-myfile.go index 61f31c2c..cb671179 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-SubpackageConfig-testdata-queries-mypkg-myfile.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-SubpackageConfig-testdata-queries-mypkg-myfile.go @@ -46,15 +46,15 @@ query SimpleQuery { func SimpleQuery( ctx_ context.Context, client_ graphql.Client, -) (*SimpleQueryResponse, error) { +) (data_ *SimpleQueryResponse, err error) { req_ := &graphql.Request{ OpName: "SimpleQuery", Query: SimpleQuery_Operation, } var err_ error - var data_ SimpleQueryResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &SimpleQueryResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -62,6 +62,6 @@ func SimpleQuery( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/graphql/client.go b/graphql/client.go index ecd9b99d..97eced39 100644 --- a/graphql/client.go +++ b/graphql/client.go @@ -11,7 +11,6 @@ import ( "net/url" "strings" - "github.com/gorilla/websocket" "github.com/vektah/gqlparser/v2/gqlerror" ) @@ -45,7 +44,7 @@ type Client interface { req *Request, resp *Response, dataUpdated chan bool, - ) (done chan struct{}, errChan chan error, err error) + ) (doneChan chan bool, errChan chan error, err error) } type WebSocketClient struct { @@ -119,7 +118,13 @@ type Doer interface { } type Dialer interface { - DialContext(ctx context.Context, urlStr string, requestHeader http.Header) (*websocket.Conn, *http.Response, error) + DialContext(ctx context.Context, urlStr string, requestHeader http.Header) (WSConn, *http.Response, error) +} + +type WSConn interface { + Close() error + WriteMessage(messageType int, data []byte) error + ReadMessage() (messageType int, p []byte, err error) } // Request contains all the values required to build queries executed by @@ -202,7 +207,7 @@ func (c *client) MakeRequest(ctx context.Context, req *Request, resp *Response) return nil } -func (c *client) DialWebSocket(ctx context.Context, req *Request, resp *Response, dataUpdated chan bool) (done chan struct{}, errChan chan error, err error) { +func (c *client) DialWebSocket(ctx context.Context, req *Request, resp *Response, dataUpdated chan bool) (doneChan chan bool, errChan chan error, err error) { if c.method != constMethodWebSocket { return nil, nil, errors.New("client does not support websocket") } @@ -215,51 +220,51 @@ func (c *client) DialWebSocket(ctx context.Context, req *Request, resp *Response } } - done = make(chan struct{}, 1) + doneChan = make(chan bool, 1) errChan = make(chan error, 1) - startedWithError := make(chan error, 1) - go c.webSocketSubscriptionRoutine( + err = c.subscribeAndListen( ctx, req, resp, dataUpdated, - startedWithError, errChan, - done, + doneChan, ) - err = <-startedWithError - close(startedWithError) - return done, errChan, err + return doneChan, errChan, err } -func (c *client) webSocketSubscriptionRoutine(ctx context.Context, req *Request, resp *Response, dataUpdated chan bool, startedWithError chan error, errChan chan error, done chan struct{}) { +func (c *client) subscribeAndListen(ctx context.Context, req *Request, resp *Response, dataUpdated chan bool, errChan chan error, doneChan chan bool) error { conn, res, err := c.webSocketClient.Dialer.DialContext(ctx, c.endpoint, c.webSocketClient.Header) if err != nil { - startedWithError <- err - close(done) - return + close(doneChan) + return err } defer res.Body.Close() - defer conn.Close() - - go listenWebSocket(conn, resp, dataUpdated, errChan, done) err = sendInit(conn) if err != nil { - startedWithError <- err - return + conn.Close() + return err + } + err = waitForConnAck(conn) + if err != nil { + conn.Close() + return err } + + go listenWebSocket(conn, resp, dataUpdated, errChan, doneChan) + err = sendSubscribe(conn, req) if err != nil { - startedWithError <- err - return + conn.Close() + return err } - startedWithError <- nil + go waitToEndWebSocket(conn, errChan, doneChan) - waitToEndWebSocket(conn, errChan, done) + return nil } func (c *client) createPostRequest(req *Request) (*http.Request, error) { diff --git a/graphql/websocket.go b/graphql/websocket.go index d835c3a4..117f633b 100644 --- a/graphql/websocket.go +++ b/graphql/websocket.go @@ -1,18 +1,61 @@ package graphql import ( + "encoding/binary" "encoding/json" + "fmt" + "time" +) - "github.com/gorilla/websocket" +const ( + webSocketTypeConnInit = "connection_init" + webSocketTypeConnAck = "connection_ack" + webSocketTypeSubscribe = "subscribe" + webSocketTypeNext = "next" + webSocketTypeError = "error" + webSocketTypeComplete = "complete" + websocketConnAckTimeOut = time.Second * 30 +) + +// Close codes defined in RFC 6455, section 11.7. +const ( + CloseNormalClosure = 1000 + CloseGoingAway = 1001 + CloseProtocolError = 1002 + CloseUnsupportedData = 1003 + CloseNoStatusReceived = 1005 + CloseAbnormalClosure = 1006 + CloseInvalidFramePayloadData = 1007 + ClosePolicyViolation = 1008 + CloseMessageTooBig = 1009 + CloseMandatoryExtension = 1010 + CloseInternalServerErr = 1011 + CloseServiceRestart = 1012 + CloseTryAgainLater = 1013 + CloseTLSHandshake = 1015 ) +// The message types are defined in RFC 6455, section 11.8. const ( - webSocketTypeConnInit = "connection_init" - webSocketTypeConnAck = "connection_ack" - webSocketTypeSubscribe = "subscribe" - webSocketTypeNext = "next" - webSocketTypeError = "error" - webSocketTypeComplete = "complete" + // TextMessage denotes a text data message. The text message payload is + // interpreted as UTF-8 encoded text data. + TextMessage = 1 + + // BinaryMessage denotes a binary data message. + BinaryMessage = 2 + + // CloseMessage denotes a close control message. The optional message + // payload contains a numeric code and text. Use the FormatCloseMessage + // function to format a close message payload. + CloseMessage = 8 + + // PingMessage denotes a ping control message. The optional message payload + // is UTF-8 encoded text. + PingMessage = 9 + + // PongMessage denotes a pong control message. The optional message payload + // is UTF-8 encoded text. + PongMessage = 10 ) type webSocketSendMessage struct { @@ -25,14 +68,14 @@ type webSocketReceiveMessage struct { Payload json.RawMessage `json:"payload"` } -func sendInit(conn *websocket.Conn) error { +func sendInit(conn WSConn) error { connInit := webSocketSendMessage{ Type: webSocketTypeConnInit, } return sendStructAsJSON(conn, connInit) } -func sendSubscribe(conn *websocket.Conn, req *Request) error { +func sendSubscribe(conn WSConn, req *Request) error { subscription := webSocketSendMessage{ Type: webSocketTypeSubscribe, Payload: req, @@ -40,32 +83,39 @@ func sendSubscribe(conn *websocket.Conn, req *Request) error { return sendStructAsJSON(conn, subscription) } -func sendComplete(conn *websocket.Conn) error { +func sendComplete(conn WSConn) error { complete := webSocketSendMessage{ Type: webSocketTypeComplete, } return sendStructAsJSON(conn, complete) } -func sendStructAsJSON(conn *websocket.Conn, object any) error { +func sendStructAsJSON(conn WSConn, object any) error { jsonBytes, err := json.Marshal(object) if err != nil { return err } - return conn.WriteMessage(websocket.TextMessage, jsonBytes) + return conn.WriteMessage(TextMessage, jsonBytes) } -func listenWebSocket(conn *websocket.Conn, resp *Response, dataUpdated chan bool, errChan chan error, done chan struct{}) { +func waitForConnAck(conn WSConn) error { var connAckReceived bool var err error - defer endListenWebSocket(dataUpdated, errChan, done, err) + start := time.Now() for !connAckReceived { connAckReceived, err = receiveWebSocketConnAck(conn) if err != nil { - errChan <- err - return + return err + } + if time.Since(start) > websocketConnAckTimeOut { + return fmt.Errorf("timed out while waiting for connAck (> %v)", websocketConnAckTimeOut) } } + return nil +} + +func listenWebSocket(conn WSConn, resp *Response, dataUpdated chan bool, errChan chan error, doneChan chan bool) { + defer endListenWebSocket(dataUpdated, errChan, doneChan) for { _, message, err := conn.ReadMessage() if err != nil { @@ -80,14 +130,13 @@ func listenWebSocket(conn *websocket.Conn, resp *Response, dataUpdated chan bool } } -func endListenWebSocket(dataUpdated chan bool, errChan chan error, done chan struct{}, err error) { - errChan <- err +func endListenWebSocket(dataUpdated chan bool, errChan chan error, doneChan chan bool) { close(dataUpdated) close(errChan) - close(done) + close(doneChan) } -func receiveWebSocketConnAck(conn *websocket.Conn) (bool, error) { +func receiveWebSocketConnAck(conn WSConn) (bool, error) { _, message, err := conn.ReadMessage() if err != nil { return false, err @@ -122,15 +171,31 @@ func forwardWebSocketData(resp *Response, dataUpdated chan bool, message []byte) return nil } -func waitToEndWebSocket(conn *websocket.Conn, errChan chan error, done chan struct{}) { - <-done +func waitToEndWebSocket(conn WSConn, errChan chan error, doneChan chan bool) { + defer conn.Close() + <-doneChan err := sendComplete(conn) if err != nil { errChan <- err } - err = conn.WriteMessage(websocket.CloseMessage, websocket.FormatCloseMessage(websocket.CloseNormalClosure, "")) + err = conn.WriteMessage(CloseMessage, formatCloseMessage(CloseNormalClosure, "")) if err != nil { errChan <- err return } } + +// formatCloseMessage formats closeCode and text as a WebSocket close message. +// An empty message is returned for code CloseNoStatusReceived. +func formatCloseMessage(closeCode int, text string) []byte { + if closeCode == CloseNoStatusReceived { + // Return empty message because it's illegal to send + // CloseNoStatusReceived. Return non-nil value in case application + // checks for nil. + return []byte{} + } + buf := make([]byte, 2+len(text)) + binary.BigEndian.PutUint16(buf, uint16(closeCode)) + copy(buf[2:], text) + return buf +} diff --git a/internal/integration/generated.go b/internal/integration/generated.go index 632663d5..39591e1f 100644 --- a/internal/integration/generated.go +++ b/internal/integration/generated.go @@ -3096,24 +3096,25 @@ subscription count { func count( ctx_ context.Context, client_ graphql.Client, -) (chan countWsResponse, chan struct{}, chan error, map[string]interface{}, error) { +) (dataChan_ chan countWsResponse, doneChan_ chan bool, errChan_ chan error, ext_ map[string]interface{}, err error) { req_ := &graphql.Request{ OpName: "count", Query: count_Operation, } var err_ error - var data_ countResponse - resp_ := &graphql.Response{Data: &data_} + var data_ *countResponse + data_ = &countResponse{} + resp_ := &graphql.Response{Data: data_} - dataChan_ := make(chan countWsResponse, 1) + dataChan_ = make(chan countWsResponse, 1) dataUpdated_ := make(chan bool, 1) - doneChan_, errChan_, err_ := client_.DialWebSocket(ctx_, req_, resp_, dataUpdated_) + doneChan_, errChan_, err_ = client_.DialWebSocket(ctx_, req_, resp_, dataUpdated_) if err_ != nil { return nil, nil, nil, nil, err_ } - go countForwardData(dataChan_, resp_, dataUpdated_, errChan_) + go countForwardData(dataChan_, resp_, dataUpdated_) return dataChan_, doneChan_, errChan_, resp_.Extensions, err_ } @@ -3124,7 +3125,7 @@ type countWsResponse struct { Errors error } -func countForwardData(dataChan_ chan countWsResponse, resp_ *graphql.Response, dataUpdated_ chan bool, errChan_ chan error) { +func countForwardData(dataChan_ chan countWsResponse, resp_ *graphql.Response, dataUpdated_ chan bool) { defer close(dataChan_) for { _, more_ := <-dataUpdated_ @@ -3156,7 +3157,7 @@ func createUser( ctx_ context.Context, client_ graphql.Client, user NewUser, -) (*createUserResponse, map[string]interface{}, error) { +) (data_ *createUserResponse, ext_ map[string]interface{}, err error) { req_ := &graphql.Request{ OpName: "createUser", Query: createUser_Operation, @@ -3166,8 +3167,8 @@ func createUser( } var err_ error - var data_ createUserResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &createUserResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -3175,7 +3176,7 @@ func createUser( resp_, ) - return &data_, resp_.Extensions, err_ + return data_, resp_.Extensions, err_ } // The query, mutation or subscription executed by failingQuery. @@ -3191,15 +3192,15 @@ query failingQuery { func failingQuery( ctx_ context.Context, client_ graphql.Client, -) (*failingQueryResponse, map[string]interface{}, error) { +) (data_ *failingQueryResponse, ext_ map[string]interface{}, err error) { req_ := &graphql.Request{ OpName: "failingQuery", Query: failingQuery_Operation, } var err_ error - var data_ failingQueryResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &failingQueryResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -3207,7 +3208,7 @@ func failingQuery( resp_, ) - return &data_, resp_.Extensions, err_ + return data_, resp_.Extensions, err_ } // The query, mutation or subscription executed by queryWithCustomMarshal. @@ -3225,7 +3226,7 @@ func queryWithCustomMarshal( ctx_ context.Context, client_ graphql.Client, date time.Time, -) (*queryWithCustomMarshalResponse, map[string]interface{}, error) { +) (data_ *queryWithCustomMarshalResponse, ext_ map[string]interface{}, err error) { req_ := &graphql.Request{ OpName: "queryWithCustomMarshal", Query: queryWithCustomMarshal_Operation, @@ -3235,8 +3236,8 @@ func queryWithCustomMarshal( } var err_ error - var data_ queryWithCustomMarshalResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &queryWithCustomMarshalResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -3244,7 +3245,7 @@ func queryWithCustomMarshal( resp_, ) - return &data_, resp_.Extensions, err_ + return data_, resp_.Extensions, err_ } // The query, mutation or subscription executed by queryWithCustomMarshalOptional. @@ -3263,7 +3264,7 @@ func queryWithCustomMarshalOptional( client_ graphql.Client, date *time.Time, id *string, -) (*queryWithCustomMarshalOptionalResponse, map[string]interface{}, error) { +) (data_ *queryWithCustomMarshalOptionalResponse, ext_ map[string]interface{}, err error) { req_ := &graphql.Request{ OpName: "queryWithCustomMarshalOptional", Query: queryWithCustomMarshalOptional_Operation, @@ -3274,8 +3275,8 @@ func queryWithCustomMarshalOptional( } var err_ error - var data_ queryWithCustomMarshalOptionalResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &queryWithCustomMarshalOptionalResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -3283,7 +3284,7 @@ func queryWithCustomMarshalOptional( resp_, ) - return &data_, resp_.Extensions, err_ + return data_, resp_.Extensions, err_ } // The query, mutation or subscription executed by queryWithCustomMarshalSlice. @@ -3301,7 +3302,7 @@ func queryWithCustomMarshalSlice( ctx_ context.Context, client_ graphql.Client, dates []time.Time, -) (*queryWithCustomMarshalSliceResponse, map[string]interface{}, error) { +) (data_ *queryWithCustomMarshalSliceResponse, ext_ map[string]interface{}, err error) { req_ := &graphql.Request{ OpName: "queryWithCustomMarshalSlice", Query: queryWithCustomMarshalSlice_Operation, @@ -3311,8 +3312,8 @@ func queryWithCustomMarshalSlice( } var err_ error - var data_ queryWithCustomMarshalSliceResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &queryWithCustomMarshalSliceResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -3320,7 +3321,7 @@ func queryWithCustomMarshalSlice( resp_, ) - return &data_, resp_.Extensions, err_ + return data_, resp_.Extensions, err_ } // The query, mutation or subscription executed by queryWithFlatten. @@ -3372,7 +3373,7 @@ func queryWithFlatten( ctx_ context.Context, client_ graphql.Client, ids []string, -) (*QueryFragment, map[string]interface{}, error) { +) (data_ *QueryFragment, ext_ map[string]interface{}, err error) { req_ := &graphql.Request{ OpName: "queryWithFlatten", Query: queryWithFlatten_Operation, @@ -3382,8 +3383,8 @@ func queryWithFlatten( } var err_ error - var data_ QueryFragment - resp_ := &graphql.Response{Data: &data_} + data_ = &QueryFragment{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -3391,7 +3392,7 @@ func queryWithFlatten( resp_, ) - return &data_, resp_.Extensions, err_ + return data_, resp_.Extensions, err_ } // The query, mutation or subscription executed by queryWithFragments. @@ -3437,7 +3438,7 @@ func queryWithFragments( ctx_ context.Context, client_ graphql.Client, ids []string, -) (*queryWithFragmentsResponse, map[string]interface{}, error) { +) (data_ *queryWithFragmentsResponse, ext_ map[string]interface{}, err error) { req_ := &graphql.Request{ OpName: "queryWithFragments", Query: queryWithFragments_Operation, @@ -3447,8 +3448,8 @@ func queryWithFragments( } var err_ error - var data_ queryWithFragmentsResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &queryWithFragmentsResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -3456,7 +3457,7 @@ func queryWithFragments( resp_, ) - return &data_, resp_.Extensions, err_ + return data_, resp_.Extensions, err_ } // The query, mutation or subscription executed by queryWithInterfaceListField. @@ -3474,7 +3475,7 @@ func queryWithInterfaceListField( ctx_ context.Context, client_ graphql.Client, ids []string, -) (*queryWithInterfaceListFieldResponse, map[string]interface{}, error) { +) (data_ *queryWithInterfaceListFieldResponse, ext_ map[string]interface{}, err error) { req_ := &graphql.Request{ OpName: "queryWithInterfaceListField", Query: queryWithInterfaceListField_Operation, @@ -3484,8 +3485,8 @@ func queryWithInterfaceListField( } var err_ error - var data_ queryWithInterfaceListFieldResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &queryWithInterfaceListFieldResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -3493,7 +3494,7 @@ func queryWithInterfaceListField( resp_, ) - return &data_, resp_.Extensions, err_ + return data_, resp_.Extensions, err_ } // The query, mutation or subscription executed by queryWithInterfaceListPointerField. @@ -3511,7 +3512,7 @@ func queryWithInterfaceListPointerField( ctx_ context.Context, client_ graphql.Client, ids []string, -) (*queryWithInterfaceListPointerFieldResponse, map[string]interface{}, error) { +) (data_ *queryWithInterfaceListPointerFieldResponse, ext_ map[string]interface{}, err error) { req_ := &graphql.Request{ OpName: "queryWithInterfaceListPointerField", Query: queryWithInterfaceListPointerField_Operation, @@ -3521,8 +3522,8 @@ func queryWithInterfaceListPointerField( } var err_ error - var data_ queryWithInterfaceListPointerFieldResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &queryWithInterfaceListPointerFieldResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -3530,7 +3531,7 @@ func queryWithInterfaceListPointerField( resp_, ) - return &data_, resp_.Extensions, err_ + return data_, resp_.Extensions, err_ } // The query, mutation or subscription executed by queryWithInterfaceNoFragments. @@ -3552,7 +3553,7 @@ func queryWithInterfaceNoFragments( ctx_ context.Context, client_ graphql.Client, id string, -) (*queryWithInterfaceNoFragmentsResponse, map[string]interface{}, error) { +) (data_ *queryWithInterfaceNoFragmentsResponse, ext_ map[string]interface{}, err error) { req_ := &graphql.Request{ OpName: "queryWithInterfaceNoFragments", Query: queryWithInterfaceNoFragments_Operation, @@ -3562,8 +3563,8 @@ func queryWithInterfaceNoFragments( } var err_ error - var data_ queryWithInterfaceNoFragmentsResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &queryWithInterfaceNoFragmentsResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -3571,7 +3572,7 @@ func queryWithInterfaceNoFragments( resp_, ) - return &data_, resp_.Extensions, err_ + return data_, resp_.Extensions, err_ } // The query, mutation or subscription executed by queryWithNamedFragments. @@ -3617,7 +3618,7 @@ func queryWithNamedFragments( ctx_ context.Context, client_ graphql.Client, ids []string, -) (*queryWithNamedFragmentsResponse, map[string]interface{}, error) { +) (data_ *queryWithNamedFragmentsResponse, ext_ map[string]interface{}, err error) { req_ := &graphql.Request{ OpName: "queryWithNamedFragments", Query: queryWithNamedFragments_Operation, @@ -3627,8 +3628,8 @@ func queryWithNamedFragments( } var err_ error - var data_ queryWithNamedFragmentsResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &queryWithNamedFragmentsResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -3636,7 +3637,7 @@ func queryWithNamedFragments( resp_, ) - return &data_, resp_.Extensions, err_ + return data_, resp_.Extensions, err_ } // The query, mutation or subscription executed by queryWithOmitempty. @@ -3654,7 +3655,7 @@ func queryWithOmitempty( ctx_ context.Context, client_ graphql.Client, id string, -) (*queryWithOmitemptyResponse, map[string]interface{}, error) { +) (data_ *queryWithOmitemptyResponse, ext_ map[string]interface{}, err error) { req_ := &graphql.Request{ OpName: "queryWithOmitempty", Query: queryWithOmitempty_Operation, @@ -3664,8 +3665,8 @@ func queryWithOmitempty( } var err_ error - var data_ queryWithOmitemptyResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &queryWithOmitemptyResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -3673,7 +3674,7 @@ func queryWithOmitempty( resp_, ) - return &data_, resp_.Extensions, err_ + return data_, resp_.Extensions, err_ } // The query, mutation or subscription executed by queryWithVariables. @@ -3691,7 +3692,7 @@ func queryWithVariables( ctx_ context.Context, client_ graphql.Client, id string, -) (*queryWithVariablesResponse, map[string]interface{}, error) { +) (data_ *queryWithVariablesResponse, ext_ map[string]interface{}, err error) { req_ := &graphql.Request{ OpName: "queryWithVariables", Query: queryWithVariables_Operation, @@ -3701,8 +3702,8 @@ func queryWithVariables( } var err_ error - var data_ queryWithVariablesResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &queryWithVariablesResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -3710,7 +3711,7 @@ func queryWithVariables( resp_, ) - return &data_, resp_.Extensions, err_ + return data_, resp_.Extensions, err_ } // The query, mutation or subscription executed by simpleQuery. @@ -3727,15 +3728,15 @@ query simpleQuery { func simpleQuery( ctx_ context.Context, client_ graphql.Client, -) (*simpleQueryResponse, map[string]interface{}, error) { +) (data_ *simpleQueryResponse, ext_ map[string]interface{}, err error) { req_ := &graphql.Request{ OpName: "simpleQuery", Query: simpleQuery_Operation, } var err_ error - var data_ simpleQueryResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &simpleQueryResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -3743,7 +3744,7 @@ func simpleQuery( resp_, ) - return &data_, resp_.Extensions, err_ + return data_, resp_.Extensions, err_ } // The query, mutation or subscription executed by simpleQueryExt. @@ -3760,15 +3761,15 @@ query simpleQueryExt { func simpleQueryExt( ctx_ context.Context, client_ graphql.Client, -) (*simpleQueryExtResponse, map[string]interface{}, error) { +) (data_ *simpleQueryExtResponse, ext_ map[string]interface{}, err error) { req_ := &graphql.Request{ OpName: "simpleQueryExt", Query: simpleQueryExt_Operation, } var err_ error - var data_ simpleQueryExtResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &simpleQueryExtResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -3776,5 +3777,5 @@ func simpleQueryExt( resp_, ) - return &data_, resp_.Extensions, err_ + return data_, resp_.Extensions, err_ } diff --git a/internal/integration/integration_test.go b/internal/integration/integration_test.go index efc85c5d..bf413d1e 100644 --- a/internal/integration/integration_test.go +++ b/internal/integration/integration_test.go @@ -9,7 +9,6 @@ import ( "context" "fmt" "net/http" - "strings" "testing" "time" @@ -48,7 +47,7 @@ func TestMutation(t *testing.T) { defer server.Close() postClient := newRoundtripClient(t, server.URL) getClient := newRoundtripGetClient(t, server.URL) - websocketClient := newRoundtripWebScoketClient(t, "ws"+strings.TrimPrefix(server.URL, "http")) + websocketClient := newRoundtripWebScoketClient(t, server.URL) resp, _, err := createUser(ctx, postClient, NewUser{Name: "Jack"}) require.NoError(t, err) @@ -71,7 +70,7 @@ func TestSubscription(t *testing.T) { defer server.Close() postClient := newRoundtripClient(t, server.URL) getClient := newRoundtripGetClient(t, server.URL) - websocketClient := newRoundtripWebScoketClient(t, "ws"+strings.TrimPrefix(server.URL, "http")) + websocketClient := newRoundtripWebScoketClient(t, server.URL) _, _, _, _, err := count(ctx, getClient) require.Errorf(t, err, "client does not support websocket") @@ -82,7 +81,7 @@ func TestSubscription(t *testing.T) { start := time.Now() respChan, doneChan, errChan, _, err := count(ctx, websocketClient) require.NoError(t, err) - defer func() { doneChan <- struct{}{} }() + defer func() { doneChan <- true }() counter := 0 for loop := true; loop; { select { diff --git a/internal/integration/roundtrip.go b/internal/integration/roundtrip.go index d49e211c..20fa54a4 100644 --- a/internal/integration/roundtrip.go +++ b/internal/integration/roundtrip.go @@ -10,6 +10,7 @@ import ( "fmt" "io" "net/http" + "strings" "testing" "github.com/Khan/genqlient/graphql" @@ -104,7 +105,7 @@ func (c *roundtripClient) MakeRequest(ctx context.Context, req *graphql.Request, return nil } -func (c *roundtripClient) DialWebSocket(ctx context.Context, req *graphql.Request, resp *graphql.Response, dataUpdated chan bool) (done chan struct{}, errChan chan error, err error) { +func (c *roundtripClient) DialWebSocket(ctx context.Context, req *graphql.Request, resp *graphql.Response, dataUpdated chan bool) (doneChan chan bool, errChan chan error, err error) { return c.wrapped.DialWebSocket(ctx, req, resp, dataUpdated) } @@ -132,9 +133,22 @@ func newRoundtripGetClient(t *testing.T, endpoint string) graphql.Client { } } +type MyDialer struct { + *websocket.Dialer +} + +func (md *MyDialer) DialContext(ctx context.Context, urlStr string, requestHeader http.Header) (graphql.WSConn, *http.Response, error) { + conn, resp, err := md.Dialer.DialContext(ctx, urlStr, requestHeader) + return graphql.WSConn(conn), resp, err +} + func newRoundtripWebScoketClient(t *testing.T, endpoint string) graphql.Client { dialer := websocket.DefaultDialer - webSocketClient := graphql.WebSocketClient{Dialer: dialer, Header: http.Header{}} + webSocketClient := graphql.WebSocketClient{Dialer: &MyDialer{Dialer: dialer}, Header: http.Header{}} + if !strings.HasPrefix(endpoint, "ws") { + _, address, _ := strings.Cut(endpoint, "://") + endpoint = "ws://" + address + } return &roundtripClient{ wrapped: graphql.NewClientUsingWebSocket(endpoint, webSocketClient), t: t, From 4bf21017a049c4bb41cdafc599efd253a1f60f1a Mon Sep 17 00:00:00 2001 From: matthieu4294967296moineau Date: Wed, 30 Aug 2023 17:51:50 +0200 Subject: [PATCH 04/35] doc --- generate/operation.go.tmpl | 11 ++++-- ...tion.graphql-SimpleSubscription.graphql.go | 6 ++-- graphql/client.go | 35 +++++++++++++++++++ internal/integration/generated.go | 6 ++-- 4 files changed, 51 insertions(+), 7 deletions(-) diff --git a/generate/operation.go.tmpl b/generate/operation.go.tmpl index 597a3007..6596cf78 100644 --- a/generate/operation.go.tmpl +++ b/generate/operation.go.tmpl @@ -2,6 +2,13 @@ const {{.Name}}_Operation = `{{$.Body}}` {{.Doc}} +{{if eq .Type "subscription"}} +{{if eq .Doc ""}} +// {{.Name}} +{{end -}} +// +// To close the connection, use the doneChan_: `defer doneChan_ <- true` +{{end -}} func {{.Name}}( {{if ne .Config.ContextType "-" -}} ctx_ {{ref .Config.ContextType}}, @@ -36,9 +43,7 @@ func {{.Name}}( return nil, {{if .Config.Extensions -}}nil,{{end -}} err_ } {{end}} - {{if eq .Type "subscription"}} - var data_ *{{.ResponseName}}{{end}} - data_ = &{{.ResponseName}}{} + data_ {{if eq .Type "subscription"}}:{{end}}= &{{.ResponseName}}{} resp_ := &graphql.Response{Data: data_} {{if eq .Type "subscription"}} dataChan_ = make(chan {{.Name}}WsResponse, 1) diff --git a/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go index de0983d7..380ce270 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go @@ -23,6 +23,9 @@ subscription SimpleSubscription { } ` +// SimpleSubscription +// +// To close the connection, use the doneChan_: `defer doneChan_ <- true` func SimpleSubscription( client_ graphql.Client, ) (dataChan_ chan SimpleSubscriptionWsResponse, doneChan_ chan bool, errChan_ chan error, err error) { @@ -32,8 +35,7 @@ func SimpleSubscription( } var err_ error - var data_ *SimpleSubscriptionResponse - data_ = &SimpleSubscriptionResponse{} + data_ := &SimpleSubscriptionResponse{} resp_ := &graphql.Response{Data: data_} dataChan_ = make(chan SimpleSubscriptionWsResponse, 1) diff --git a/graphql/client.go b/graphql/client.go index 97eced39..8bf777ed 100644 --- a/graphql/client.go +++ b/graphql/client.go @@ -39,6 +39,32 @@ type Client interface { resp *Response, ) error + // DialWebSocket must open a webSocket connection and subscribe to an endpoint + // of the client's GraphQL API. + // + // ctx is the context that should be used to make this request. If context + // is disabled in the genqlient settings, this will be set to + // context.Background(). + // + // req contains the data to be sent to the GraphQL server. Will be marshalled + // into JSON bytes. + // + // resp is the Response object into which the server's response will be + // unmarshalled. Typically GraphQL APIs will return JSON which can be + // unmarshalled directly into resp. + // If the response contains an error, this must also be returned by + // DialWebSocket. The field resp.Data will be prepopulated with a pointer + // to an empty struct of the correct generated type (e.g. MyQueryResponse). + // + // dataUpdated is a channel used to notify that new data has arrived via the + // webSocket connection. + // + // doneChan is a channel used to end the websocket connection. + // + // errChan is a channel on which are sent the errors of webSocket + // communication. + // + // err is any error that occurs when setting up the webSocket connection. DialWebSocket( ctx context.Context, req *Request, @@ -98,6 +124,11 @@ func NewClientUsingGet(endpoint string, httpClient Doer) Client { return newClient(endpoint, httpClient, http.MethodGet, WebSocketClient{}) } +// NewClientUsingWebSocket returns a [Client] which makes subscription requests +// to the given endpoint using webSocket. +// +// The client does not support queries nor mutations, and will return an error +// if passed a request that attempts one. func NewClientUsingWebSocket(endpoint string, webSocketClient WebSocketClient) Client { webSocketClient.Header.Add("Sec-WebSocket-Protocol", "graphql-transport-ws") return newClient(endpoint, nil, constMethodWebSocket, webSocketClient) @@ -117,10 +148,14 @@ type Doer interface { Do(*http.Request) (*http.Response, error) } +// Dialer encapsulates DialContext method and is similar to [github.com/gorilla/websocket] +// [*websocket.Dialer] method type Dialer interface { DialContext(ctx context.Context, urlStr string, requestHeader http.Header) (WSConn, *http.Response, error) } +// WSConn encapsulates basic methods for a webSocket connection, taking model on +// [github.com/gorilla/websocket] [*websocket.Conn] type WSConn interface { Close() error WriteMessage(messageType int, data []byte) error diff --git a/internal/integration/generated.go b/internal/integration/generated.go index 39591e1f..936f8c61 100644 --- a/internal/integration/generated.go +++ b/internal/integration/generated.go @@ -3093,6 +3093,9 @@ subscription count { } ` +// count +// +// To close the connection, use the doneChan_: `defer doneChan_ <- true` func count( ctx_ context.Context, client_ graphql.Client, @@ -3103,8 +3106,7 @@ func count( } var err_ error - var data_ *countResponse - data_ = &countResponse{} + data_ := &countResponse{} resp_ := &graphql.Response{Data: data_} dataChan_ = make(chan countWsResponse, 1) From 5463429ad06fbe88b42806cb3d415142f36534a9 Mon Sep 17 00:00:00 2001 From: matthieu4294967296moineau Date: Thu, 31 Aug 2023 11:04:35 +0200 Subject: [PATCH 05/35] changed dataUpdated chan to respChan --- generate/operation.go.tmpl | 47 +++++++++++-------- ...tion.graphql-SimpleSubscription.graphql.go | 41 +++++++++------- graphql/client.go | 21 +++------ graphql/websocket.go | 18 +++---- internal/integration/generated.go | 46 ++++++++++-------- internal/integration/integration_test.go | 8 ++-- internal/integration/roundtrip.go | 4 +- 7 files changed, 97 insertions(+), 88 deletions(-) diff --git a/generate/operation.go.tmpl b/generate/operation.go.tmpl index 6596cf78..4f564f00 100644 --- a/generate/operation.go.tmpl +++ b/generate/operation.go.tmpl @@ -22,7 +22,7 @@ func {{.Name}}( {{.GraphQLName}} {{.GoType.Reference}}, {{end -}} {{end -}} -) ({{if eq .Type "subscription"}}dataChan_ chan {{.Name}}WsResponse, doneChan_ chan bool, errChan_ chan error{{else}}data_ *{{.ResponseName}}{{end}}, {{if .Config.Extensions -}}ext_ map[string]interface{},{{end}}err error) { +) ({{if eq .Type "subscription"}}dataChan_ chan {{.Name}}WsResponse, doneChan_ chan bool, errChan_ chan error,{{else}}data_ *{{.ResponseName}}, {{if .Config.Extensions -}}ext_ map[string]interface{},{{end}}{{end}} err error) { req_ := &graphql.Request{ OpName: "{{.Name}}", Query: {{.Name}}_Operation, @@ -43,18 +43,18 @@ func {{.Name}}( return nil, {{if .Config.Extensions -}}nil,{{end -}} err_ } {{end}} - data_ {{if eq .Type "subscription"}}:{{end}}= &{{.ResponseName}}{} - resp_ := &graphql.Response{Data: data_} {{if eq .Type "subscription"}} dataChan_ = make(chan {{.Name}}WsResponse, 1) - dataUpdated_ := make(chan bool, 1) + respChan_ := make(chan json.RawMessage, 1) - doneChan_, errChan_, err_ = client_.DialWebSocket({{if ne .Config.ContextType "-" -}}ctx_{{else}}context.Background(){{end}}, req_, resp_, dataUpdated_) + doneChan_, errChan_, err_ = client_.DialWebSocket({{if ne .Config.ContextType "-" -}}ctx_{{else}}context.Background(){{end}}, req_, respChan_) if err_ != nil { - return nil, nil, nil,{{if .Config.Extensions -}} nil,{{end}} err_ + return nil, nil, nil, err_ } - go {{.Name}}ForwardData(dataChan_, resp_, dataUpdated_) + go {{.Name}}ForwardData(dataChan_, errChan_, respChan_) {{else}} + data_ = &{{.ResponseName}}{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( {{if ne .Config.ContextType "-"}}ctx_{{else}}nil{{end}}, @@ -63,31 +63,40 @@ func {{.Name}}( ) {{end}} - return {{if eq .Type "subscription"}}dataChan_, doneChan_, errChan_{{else}}data_{{end}}, {{if .Config.Extensions -}}resp_.Extensions,{{end -}} err_ + return {{if eq .Type "subscription"}}dataChan_, doneChan_, errChan_,{{else}}data_, {{if .Config.Extensions -}}resp_.Extensions,{{end -}}{{end}} err_ } {{if eq .Type "subscription"}} type {{.Name}}WsResponse struct { - Data *{{.ResponseName}} - Extensions map[string]interface{} - Errors error + Data *{{.ResponseName}} `json:"data"` + Extensions map[string]interface{} `json:"extensions,omitempty"` + Errors error `json:"errors"` } -func {{.Name}}ForwardData(dataChan_ chan {{.Name}}WsResponse, resp_ *graphql.Response, dataUpdated_ chan bool) { +func {{.Name}}ForwardData(dataChan_ chan {{.Name}}WsResponse, errChan_ chan error, respChan_ chan json.RawMessage) { defer close(dataChan_) + var gqlResp graphql.Response + var wsResp {{.Name}}WsResponse for { - _, more_ := <-dataUpdated_ + jsonRaw, more_ := <-respChan_ if !more_ { return } - data_ := {{.Name}}WsResponse{ - Extensions: resp_.Extensions, - Errors: resp_.Errors, + err := json.Unmarshal(jsonRaw, &gqlResp) + if err != nil { + errChan_ <- err + return } - if resp_.Data != nil { - data_.Data = resp_.Data.(*{{.ResponseName}}) + if len(gqlResp.Errors) == 0 { + err = json.Unmarshal(jsonRaw, &wsResp) + if err != nil { + errChan_ <- err + return + } + } else { + wsResp.Errors = gqlResp.Errors } - dataChan_ <- data_ + dataChan_ <- wsResp } } {{end}} diff --git a/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go index 380ce270..7904ee83 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go @@ -4,6 +4,7 @@ package test import ( "context" + "encoding/json" "github.com/Khan/genqlient/graphql" ) @@ -35,42 +36,48 @@ func SimpleSubscription( } var err_ error - data_ := &SimpleSubscriptionResponse{} - resp_ := &graphql.Response{Data: data_} - dataChan_ = make(chan SimpleSubscriptionWsResponse, 1) - dataUpdated_ := make(chan bool, 1) + respChan_ := make(chan json.RawMessage, 1) - doneChan_, errChan_, err_ = client_.DialWebSocket(context.Background(), req_, resp_, dataUpdated_) + doneChan_, errChan_, err_ = client_.DialWebSocket(context.Background(), req_, respChan_) if err_ != nil { return nil, nil, nil, err_ } - go SimpleSubscriptionForwardData(dataChan_, resp_, dataUpdated_) + go SimpleSubscriptionForwardData(dataChan_, errChan_, respChan_) return dataChan_, doneChan_, errChan_, err_ } type SimpleSubscriptionWsResponse struct { - Data *SimpleSubscriptionResponse - Extensions map[string]interface{} - Errors error + Data *SimpleSubscriptionResponse `json:"data"` + Extensions map[string]interface{} `json:"extensions,omitempty"` + Errors error `json:"errors"` } -func SimpleSubscriptionForwardData(dataChan_ chan SimpleSubscriptionWsResponse, resp_ *graphql.Response, dataUpdated_ chan bool) { +func SimpleSubscriptionForwardData(dataChan_ chan SimpleSubscriptionWsResponse, errChan_ chan error, respChan_ chan json.RawMessage) { defer close(dataChan_) + var gqlResp graphql.Response + var wsResp SimpleSubscriptionWsResponse for { - _, more_ := <-dataUpdated_ + jsonRaw, more_ := <-respChan_ if !more_ { return } - data_ := SimpleSubscriptionWsResponse{ - Extensions: resp_.Extensions, - Errors: resp_.Errors, + err := json.Unmarshal(jsonRaw, &gqlResp) + if err != nil { + errChan_ <- err + return } - if resp_.Data != nil { - data_.Data = resp_.Data.(*SimpleSubscriptionResponse) + if len(gqlResp.Errors) == 0 { + err = json.Unmarshal(jsonRaw, &wsResp) + if err != nil { + errChan_ <- err + return + } + } else { + wsResp.Errors = gqlResp.Errors } - dataChan_ <- data_ + dataChan_ <- wsResp } } diff --git a/graphql/client.go b/graphql/client.go index 8bf777ed..9c6ee50a 100644 --- a/graphql/client.go +++ b/graphql/client.go @@ -49,14 +49,7 @@ type Client interface { // req contains the data to be sent to the GraphQL server. Will be marshalled // into JSON bytes. // - // resp is the Response object into which the server's response will be - // unmarshalled. Typically GraphQL APIs will return JSON which can be - // unmarshalled directly into resp. - // If the response contains an error, this must also be returned by - // DialWebSocket. The field resp.Data will be prepopulated with a pointer - // to an empty struct of the correct generated type (e.g. MyQueryResponse). - // - // dataUpdated is a channel used to notify that new data has arrived via the + // respChan is a channel used to send the data that arrives via the // webSocket connection. // // doneChan is a channel used to end the websocket connection. @@ -68,8 +61,7 @@ type Client interface { DialWebSocket( ctx context.Context, req *Request, - resp *Response, - dataUpdated chan bool, + respChan chan json.RawMessage, ) (doneChan chan bool, errChan chan error, err error) } @@ -242,7 +234,7 @@ func (c *client) MakeRequest(ctx context.Context, req *Request, resp *Response) return nil } -func (c *client) DialWebSocket(ctx context.Context, req *Request, resp *Response, dataUpdated chan bool) (doneChan chan bool, errChan chan error, err error) { +func (c *client) DialWebSocket(ctx context.Context, req *Request, respChan chan json.RawMessage) (doneChan chan bool, errChan chan error, err error) { if c.method != constMethodWebSocket { return nil, nil, errors.New("client does not support websocket") } @@ -261,8 +253,7 @@ func (c *client) DialWebSocket(ctx context.Context, req *Request, resp *Response err = c.subscribeAndListen( ctx, req, - resp, - dataUpdated, + respChan, errChan, doneChan, ) @@ -270,7 +261,7 @@ func (c *client) DialWebSocket(ctx context.Context, req *Request, resp *Response return doneChan, errChan, err } -func (c *client) subscribeAndListen(ctx context.Context, req *Request, resp *Response, dataUpdated chan bool, errChan chan error, doneChan chan bool) error { +func (c *client) subscribeAndListen(ctx context.Context, req *Request, respChan chan json.RawMessage, errChan chan error, doneChan chan bool) error { conn, res, err := c.webSocketClient.Dialer.DialContext(ctx, c.endpoint, c.webSocketClient.Header) if err != nil { close(doneChan) @@ -289,7 +280,7 @@ func (c *client) subscribeAndListen(ctx context.Context, req *Request, resp *Res return err } - go listenWebSocket(conn, resp, dataUpdated, errChan, doneChan) + go listenWebSocket(conn, respChan, errChan, doneChan) err = sendSubscribe(conn, req) if err != nil { diff --git a/graphql/websocket.go b/graphql/websocket.go index 117f633b..f608eb93 100644 --- a/graphql/websocket.go +++ b/graphql/websocket.go @@ -114,15 +114,15 @@ func waitForConnAck(conn WSConn) error { return nil } -func listenWebSocket(conn WSConn, resp *Response, dataUpdated chan bool, errChan chan error, doneChan chan bool) { - defer endListenWebSocket(dataUpdated, errChan, doneChan) +func listenWebSocket(conn WSConn, respChan chan json.RawMessage, errChan chan error, doneChan chan bool) { + defer endListenWebSocket(respChan, errChan, doneChan) for { _, message, err := conn.ReadMessage() if err != nil { errChan <- err return } - err = forwardWebSocketData(resp, dataUpdated, message) + err = forwardWebSocketData(respChan, message) if err != nil { errChan <- err return @@ -130,8 +130,8 @@ func listenWebSocket(conn WSConn, resp *Response, dataUpdated chan bool, errChan } } -func endListenWebSocket(dataUpdated chan bool, errChan chan error, doneChan chan bool) { - close(dataUpdated) +func endListenWebSocket(respChan chan json.RawMessage, errChan chan error, doneChan chan bool) { + close(respChan) close(errChan) close(doneChan) } @@ -153,7 +153,7 @@ func checkConnectionAckReceived(message []byte) (bool, error) { return wsMessage.Type == webSocketTypeConnAck, nil } -func forwardWebSocketData(resp *Response, dataUpdated chan bool, message []byte) error { +func forwardWebSocketData(respChan chan json.RawMessage, message []byte) error { var wsMsg webSocketReceiveMessage err := json.Unmarshal(message, &wsMsg) if err != nil { @@ -161,11 +161,7 @@ func forwardWebSocketData(resp *Response, dataUpdated chan bool, message []byte) } switch wsMsg.Type { case webSocketTypeNext, webSocketTypeError: - err = json.Unmarshal(wsMsg.Payload, resp) - if err != nil { - return err - } - dataUpdated <- true + respChan <- wsMsg.Payload default: } return nil diff --git a/internal/integration/generated.go b/internal/integration/generated.go index 936f8c61..6604df7d 100644 --- a/internal/integration/generated.go +++ b/internal/integration/generated.go @@ -3099,49 +3099,55 @@ subscription count { func count( ctx_ context.Context, client_ graphql.Client, -) (dataChan_ chan countWsResponse, doneChan_ chan bool, errChan_ chan error, ext_ map[string]interface{}, err error) { +) (dataChan_ chan countWsResponse, doneChan_ chan bool, errChan_ chan error, err error) { req_ := &graphql.Request{ OpName: "count", Query: count_Operation, } var err_ error - data_ := &countResponse{} - resp_ := &graphql.Response{Data: data_} - dataChan_ = make(chan countWsResponse, 1) - dataUpdated_ := make(chan bool, 1) + respChan_ := make(chan json.RawMessage, 1) - doneChan_, errChan_, err_ = client_.DialWebSocket(ctx_, req_, resp_, dataUpdated_) + doneChan_, errChan_, err_ = client_.DialWebSocket(ctx_, req_, respChan_) if err_ != nil { - return nil, nil, nil, nil, err_ + return nil, nil, nil, err_ } - go countForwardData(dataChan_, resp_, dataUpdated_) + go countForwardData(dataChan_, errChan_, respChan_) - return dataChan_, doneChan_, errChan_, resp_.Extensions, err_ + return dataChan_, doneChan_, errChan_, err_ } type countWsResponse struct { - Data *countResponse - Extensions map[string]interface{} - Errors error + Data *countResponse `json:"data"` + Extensions map[string]interface{} `json:"extensions,omitempty"` + Errors error `json:"errors"` } -func countForwardData(dataChan_ chan countWsResponse, resp_ *graphql.Response, dataUpdated_ chan bool) { +func countForwardData(dataChan_ chan countWsResponse, errChan_ chan error, respChan_ chan json.RawMessage) { defer close(dataChan_) + var gqlResp graphql.Response + var wsResp countWsResponse for { - _, more_ := <-dataUpdated_ + jsonRaw, more_ := <-respChan_ if !more_ { return } - data_ := countWsResponse{ - Extensions: resp_.Extensions, - Errors: resp_.Errors, + err := json.Unmarshal(jsonRaw, &gqlResp) + if err != nil { + errChan_ <- err + return } - if resp_.Data != nil { - data_.Data = resp_.Data.(*countResponse) + if len(gqlResp.Errors) == 0 { + err = json.Unmarshal(jsonRaw, &wsResp) + if err != nil { + errChan_ <- err + return + } + } else { + wsResp.Errors = gqlResp.Errors } - dataChan_ <- data_ + dataChan_ <- wsResp } } diff --git a/internal/integration/integration_test.go b/internal/integration/integration_test.go index bf413d1e..4f217973 100644 --- a/internal/integration/integration_test.go +++ b/internal/integration/integration_test.go @@ -72,14 +72,14 @@ func TestSubscription(t *testing.T) { getClient := newRoundtripGetClient(t, server.URL) websocketClient := newRoundtripWebScoketClient(t, server.URL) - _, _, _, _, err := count(ctx, getClient) + _, _, _, err := count(ctx, getClient) require.Errorf(t, err, "client does not support websocket") - _, _, _, _, err = count(ctx, postClient) + _, _, _, err = count(ctx, postClient) require.Errorf(t, err, "client does not support websocket") start := time.Now() - respChan, doneChan, errChan, _, err := count(ctx, websocketClient) + respChan, doneChan, errChan, err := count(ctx, websocketClient) require.NoError(t, err) defer func() { doneChan <- true }() counter := 0 @@ -92,7 +92,7 @@ func TestSubscription(t *testing.T) { } require.NotNil(t, resp.Data) assert.Equal(t, counter, resp.Data.Count) - require.Zero(t, resp.Errors.Error()) + require.Nil(t, resp.Errors) loop = time.Since(start) < time.Second*2 counter++ case err := <-errChan: diff --git a/internal/integration/roundtrip.go b/internal/integration/roundtrip.go index 20fa54a4..8bf34ab9 100644 --- a/internal/integration/roundtrip.go +++ b/internal/integration/roundtrip.go @@ -105,8 +105,8 @@ func (c *roundtripClient) MakeRequest(ctx context.Context, req *graphql.Request, return nil } -func (c *roundtripClient) DialWebSocket(ctx context.Context, req *graphql.Request, resp *graphql.Response, dataUpdated chan bool) (doneChan chan bool, errChan chan error, err error) { - return c.wrapped.DialWebSocket(ctx, req, resp, dataUpdated) +func (c *roundtripClient) DialWebSocket(ctx context.Context, req *graphql.Request, respChan chan json.RawMessage) (doneChan chan bool, errChan chan error, err error) { + return c.wrapped.DialWebSocket(ctx, req, respChan) } func newRoundtripClients(t *testing.T, endpoint string) []graphql.Client { From 31d1f5a3dab4e9dff8fba836c185dcc366941664 Mon Sep 17 00:00:00 2001 From: matthieu4294967296moineau Date: Thu, 31 Aug 2023 12:36:45 +0200 Subject: [PATCH 06/35] using CloseConnection instead of doneChan --- generate/operation.go.tmpl | 14 ++-- ...tion.graphql-SimpleSubscription.graphql.go | 14 ++-- graphql/client.go | 60 +++++++-------- graphql/websocket.go | 75 ++++++++++--------- internal/integration/generated.go | 14 ++-- internal/integration/integration_test.go | 14 ++-- internal/integration/roundtrip.go | 8 +- 7 files changed, 95 insertions(+), 104 deletions(-) diff --git a/generate/operation.go.tmpl b/generate/operation.go.tmpl index 4f564f00..b6510dcb 100644 --- a/generate/operation.go.tmpl +++ b/generate/operation.go.tmpl @@ -7,7 +7,7 @@ const {{.Name}}_Operation = `{{$.Body}}` // {{.Name}} {{end -}} // -// To close the connection, use the doneChan_: `defer doneChan_ <- true` +// To close the connection, use [graphql.WebSocketClient.CloseConnection()] {{end -}} func {{.Name}}( {{if ne .Config.ContextType "-" -}} @@ -22,7 +22,7 @@ func {{.Name}}( {{.GraphQLName}} {{.GoType.Reference}}, {{end -}} {{end -}} -) ({{if eq .Type "subscription"}}dataChan_ chan {{.Name}}WsResponse, doneChan_ chan bool, errChan_ chan error,{{else}}data_ *{{.ResponseName}}, {{if .Config.Extensions -}}ext_ map[string]interface{},{{end}}{{end}} err error) { +) ({{if eq .Type "subscription"}}dataChan_ chan {{.Name}}WsResponse, errChan_ chan error,{{else}}data_ *{{.ResponseName}}, {{if .Config.Extensions -}}ext_ map[string]interface{},{{end}}{{end}} err error) { req_ := &graphql.Request{ OpName: "{{.Name}}", Query: {{.Name}}_Operation, @@ -47,11 +47,11 @@ func {{.Name}}( dataChan_ = make(chan {{.Name}}WsResponse, 1) respChan_ := make(chan json.RawMessage, 1) - doneChan_, errChan_, err_ = client_.DialWebSocket({{if ne .Config.ContextType "-" -}}ctx_{{else}}context.Background(){{end}}, req_, respChan_) + errChan_, err_ = client_.DialWebSocket({{if ne .Config.ContextType "-" -}}ctx_{{else}}context.Background(){{end}}, req_, respChan_) if err_ != nil { - return nil, nil, nil, err_ + return nil, nil, err_ } - go {{.Name}}ForwardData(dataChan_, errChan_, respChan_) + go {{.Name}}ForwardData(dataChan_, respChan_, errChan_) {{else}} data_ = &{{.ResponseName}}{} resp_ := &graphql.Response{Data: data_} @@ -63,7 +63,7 @@ func {{.Name}}( ) {{end}} - return {{if eq .Type "subscription"}}dataChan_, doneChan_, errChan_,{{else}}data_, {{if .Config.Extensions -}}resp_.Extensions,{{end -}}{{end}} err_ + return {{if eq .Type "subscription"}}dataChan_, errChan_,{{else}}data_, {{if .Config.Extensions -}}resp_.Extensions,{{end -}}{{end}} err_ } {{if eq .Type "subscription"}} @@ -73,7 +73,7 @@ type {{.Name}}WsResponse struct { Errors error `json:"errors"` } -func {{.Name}}ForwardData(dataChan_ chan {{.Name}}WsResponse, errChan_ chan error, respChan_ chan json.RawMessage) { +func {{.Name}}ForwardData(dataChan_ chan {{.Name}}WsResponse, respChan_ chan json.RawMessage, errChan_ chan error) { defer close(dataChan_) var gqlResp graphql.Response var wsResp {{.Name}}WsResponse diff --git a/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go index 7904ee83..254b8ff7 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go @@ -26,10 +26,10 @@ subscription SimpleSubscription { // SimpleSubscription // -// To close the connection, use the doneChan_: `defer doneChan_ <- true` +// To close the connection, use [graphql.WebSocketClient.CloseConnection()] func SimpleSubscription( client_ graphql.Client, -) (dataChan_ chan SimpleSubscriptionWsResponse, doneChan_ chan bool, errChan_ chan error, err error) { +) (dataChan_ chan SimpleSubscriptionWsResponse, errChan_ chan error, err error) { req_ := &graphql.Request{ OpName: "SimpleSubscription", Query: SimpleSubscription_Operation, @@ -39,13 +39,13 @@ func SimpleSubscription( dataChan_ = make(chan SimpleSubscriptionWsResponse, 1) respChan_ := make(chan json.RawMessage, 1) - doneChan_, errChan_, err_ = client_.DialWebSocket(context.Background(), req_, respChan_) + errChan_, err_ = client_.DialWebSocket(context.Background(), req_, respChan_) if err_ != nil { - return nil, nil, nil, err_ + return nil, nil, err_ } - go SimpleSubscriptionForwardData(dataChan_, errChan_, respChan_) + go SimpleSubscriptionForwardData(dataChan_, respChan_, errChan_) - return dataChan_, doneChan_, errChan_, err_ + return dataChan_, errChan_, err_ } type SimpleSubscriptionWsResponse struct { @@ -54,7 +54,7 @@ type SimpleSubscriptionWsResponse struct { Errors error `json:"errors"` } -func SimpleSubscriptionForwardData(dataChan_ chan SimpleSubscriptionWsResponse, errChan_ chan error, respChan_ chan json.RawMessage) { +func SimpleSubscriptionForwardData(dataChan_ chan SimpleSubscriptionWsResponse, respChan_ chan json.RawMessage, errChan_ chan error) { defer close(dataChan_) var gqlResp graphql.Response var wsResp SimpleSubscriptionWsResponse diff --git a/graphql/client.go b/graphql/client.go index 9c6ee50a..e222dad4 100644 --- a/graphql/client.go +++ b/graphql/client.go @@ -52,8 +52,6 @@ type Client interface { // respChan is a channel used to send the data that arrives via the // webSocket connection. // - // doneChan is a channel used to end the websocket connection. - // // errChan is a channel on which are sent the errors of webSocket // communication. // @@ -62,17 +60,12 @@ type Client interface { ctx context.Context, req *Request, respChan chan json.RawMessage, - ) (doneChan chan bool, errChan chan error, err error) -} - -type WebSocketClient struct { - Dialer Dialer - Header http.Header + ) (errChan chan error, err error) } type client struct { httpClient Doer - webSocketClient WebSocketClient + webSocketClient *WebSocketClient endpoint string method string } @@ -92,7 +85,7 @@ const constMethodWebSocket = "websocket" // // [example/main.go]: https://github.com/Khan/genqlient/blob/main/example/main.go#L12-L20 func NewClient(endpoint string, httpClient Doer) Client { - return newClient(endpoint, httpClient, http.MethodPost, WebSocketClient{}) + return newClient(endpoint, httpClient, http.MethodPost, nil) } // NewClientUsingGet returns a [Client] which makes GET requests to the given @@ -113,7 +106,7 @@ func NewClient(endpoint string, httpClient Doer) Client { // // [example/main.go]: https://github.com/Khan/genqlient/blob/main/example/main.go#L12-L20 func NewClientUsingGet(endpoint string, httpClient Doer) Client { - return newClient(endpoint, httpClient, http.MethodGet, WebSocketClient{}) + return newClient(endpoint, httpClient, http.MethodGet, nil) } // NewClientUsingWebSocket returns a [Client] which makes subscription requests @@ -121,12 +114,14 @@ func NewClientUsingGet(endpoint string, httpClient Doer) Client { // // The client does not support queries nor mutations, and will return an error // if passed a request that attempts one. -func NewClientUsingWebSocket(endpoint string, webSocketClient WebSocketClient) Client { +func NewClientUsingWebSocket(endpoint string, webSocketClient *WebSocketClient) Client { webSocketClient.Header.Add("Sec-WebSocket-Protocol", "graphql-transport-ws") + webSocketClient.doneChan = make(chan bool, 1) + webSocketClient.errChan = make(chan error, 1) return newClient(endpoint, nil, constMethodWebSocket, webSocketClient) } -func newClient(endpoint string, httpClient Doer, method string, webSocketClient WebSocketClient) Client { +func newClient(endpoint string, httpClient Doer, method string, webSocketClient *WebSocketClient) Client { if httpClient == nil || httpClient == (*http.Client)(nil) { httpClient = http.DefaultClient } @@ -234,62 +229,57 @@ func (c *client) MakeRequest(ctx context.Context, req *Request, resp *Response) return nil } -func (c *client) DialWebSocket(ctx context.Context, req *Request, respChan chan json.RawMessage) (doneChan chan bool, errChan chan error, err error) { +func (c *client) DialWebSocket(ctx context.Context, req *Request, respChan chan json.RawMessage) (errChan chan error, err error) { if c.method != constMethodWebSocket { - return nil, nil, errors.New("client does not support websocket") + return nil, errors.New("client does not support websocket") } if req.Query != "" { if strings.HasPrefix(strings.TrimSpace(req.Query), "query") { - return nil, nil, errors.New("client does not support queries") + return nil, errors.New("client does not support queries") } if strings.HasPrefix(strings.TrimSpace(req.Query), "mutation") { - return nil, nil, errors.New("client does not support mutations") + return nil, errors.New("client does not support mutations") } } - doneChan = make(chan bool, 1) - errChan = make(chan error, 1) - err = c.subscribeAndListen( ctx, req, respChan, - errChan, - doneChan, ) - return doneChan, errChan, err + return c.webSocketClient.errChan, err } -func (c *client) subscribeAndListen(ctx context.Context, req *Request, respChan chan json.RawMessage, errChan chan error, doneChan chan bool) error { - conn, res, err := c.webSocketClient.Dialer.DialContext(ctx, c.endpoint, c.webSocketClient.Header) +func (c *client) subscribeAndListen(ctx context.Context, req *Request, respChan chan json.RawMessage) error { + var res *http.Response + var err error + w := c.webSocketClient + w.conn, res, err = w.Dialer.DialContext(ctx, c.endpoint, w.Header) if err != nil { - close(doneChan) return err } defer res.Body.Close() - err = sendInit(conn) + err = w.sendInit() if err != nil { - conn.Close() + w.conn.Close() return err } - err = waitForConnAck(conn) + err = w.waitForConnAck() if err != nil { - conn.Close() + w.conn.Close() return err } - go listenWebSocket(conn, respChan, errChan, doneChan) + go w.listenWebSocket(respChan) - err = sendSubscribe(conn, req) + err = w.sendSubscribe(req) if err != nil { - conn.Close() + w.conn.Close() return err } - go waitToEndWebSocket(conn, errChan, doneChan) - return nil } diff --git a/graphql/websocket.go b/graphql/websocket.go index f608eb93..915f4691 100644 --- a/graphql/websocket.go +++ b/graphql/websocket.go @@ -4,6 +4,7 @@ import ( "encoding/binary" "encoding/json" "fmt" + "net/http" "time" ) @@ -58,6 +59,14 @@ const ( PongMessage = 10 ) +type WebSocketClient struct { + Dialer Dialer + Header http.Header + conn WSConn + doneChan chan bool + errChan chan error +} + type webSocketSendMessage struct { Payload *Request `json:"payload"` Type string `json:"type"` @@ -68,42 +77,54 @@ type webSocketReceiveMessage struct { Payload json.RawMessage `json:"payload"` } -func sendInit(conn WSConn) error { +func (w *WebSocketClient) CloseConnection() { + defer w.conn.Close() + err := w.sendComplete() + if err != nil { + w.errChan <- err + } + err = w.conn.WriteMessage(CloseMessage, formatCloseMessage(CloseNormalClosure, "")) + if err != nil { + w.errChan <- err + } +} + +func (w *WebSocketClient) sendInit() error { connInit := webSocketSendMessage{ Type: webSocketTypeConnInit, } - return sendStructAsJSON(conn, connInit) + return w.sendStructAsJSON(connInit) } -func sendSubscribe(conn WSConn, req *Request) error { +func (w *WebSocketClient) sendSubscribe(req *Request) error { subscription := webSocketSendMessage{ Type: webSocketTypeSubscribe, Payload: req, } - return sendStructAsJSON(conn, subscription) + return w.sendStructAsJSON(subscription) } -func sendComplete(conn WSConn) error { +func (w *WebSocketClient) sendComplete() error { complete := webSocketSendMessage{ Type: webSocketTypeComplete, } - return sendStructAsJSON(conn, complete) + return w.sendStructAsJSON(complete) } -func sendStructAsJSON(conn WSConn, object any) error { +func (w *WebSocketClient) sendStructAsJSON(object any) error { jsonBytes, err := json.Marshal(object) if err != nil { return err } - return conn.WriteMessage(TextMessage, jsonBytes) + return w.conn.WriteMessage(TextMessage, jsonBytes) } -func waitForConnAck(conn WSConn) error { +func (w *WebSocketClient) waitForConnAck() error { var connAckReceived bool var err error start := time.Now() for !connAckReceived { - connAckReceived, err = receiveWebSocketConnAck(conn) + connAckReceived, err = w.receiveWebSocketConnAck() if err != nil { return err } @@ -114,30 +135,24 @@ func waitForConnAck(conn WSConn) error { return nil } -func listenWebSocket(conn WSConn, respChan chan json.RawMessage, errChan chan error, doneChan chan bool) { - defer endListenWebSocket(respChan, errChan, doneChan) +func (w *WebSocketClient) listenWebSocket(respChan chan json.RawMessage) { + defer close(respChan) for { - _, message, err := conn.ReadMessage() + _, message, err := w.conn.ReadMessage() if err != nil { - errChan <- err + w.errChan <- err return } err = forwardWebSocketData(respChan, message) if err != nil { - errChan <- err + w.errChan <- err return } } } -func endListenWebSocket(respChan chan json.RawMessage, errChan chan error, doneChan chan bool) { - close(respChan) - close(errChan) - close(doneChan) -} - -func receiveWebSocketConnAck(conn WSConn) (bool, error) { - _, message, err := conn.ReadMessage() +func (w *WebSocketClient) receiveWebSocketConnAck() (bool, error) { + _, message, err := w.conn.ReadMessage() if err != nil { return false, err } @@ -167,20 +182,6 @@ func forwardWebSocketData(respChan chan json.RawMessage, message []byte) error { return nil } -func waitToEndWebSocket(conn WSConn, errChan chan error, doneChan chan bool) { - defer conn.Close() - <-doneChan - err := sendComplete(conn) - if err != nil { - errChan <- err - } - err = conn.WriteMessage(CloseMessage, formatCloseMessage(CloseNormalClosure, "")) - if err != nil { - errChan <- err - return - } -} - // formatCloseMessage formats closeCode and text as a WebSocket close message. // An empty message is returned for code CloseNoStatusReceived. func formatCloseMessage(closeCode int, text string) []byte { diff --git a/internal/integration/generated.go b/internal/integration/generated.go index 6604df7d..075b1f68 100644 --- a/internal/integration/generated.go +++ b/internal/integration/generated.go @@ -3095,11 +3095,11 @@ subscription count { // count // -// To close the connection, use the doneChan_: `defer doneChan_ <- true` +// To close the connection, use [graphql.WebSocketClient.CloseConnection()] func count( ctx_ context.Context, client_ graphql.Client, -) (dataChan_ chan countWsResponse, doneChan_ chan bool, errChan_ chan error, err error) { +) (dataChan_ chan countWsResponse, errChan_ chan error, err error) { req_ := &graphql.Request{ OpName: "count", Query: count_Operation, @@ -3109,13 +3109,13 @@ func count( dataChan_ = make(chan countWsResponse, 1) respChan_ := make(chan json.RawMessage, 1) - doneChan_, errChan_, err_ = client_.DialWebSocket(ctx_, req_, respChan_) + errChan_, err_ = client_.DialWebSocket(ctx_, req_, respChan_) if err_ != nil { - return nil, nil, nil, err_ + return nil, nil, err_ } - go countForwardData(dataChan_, errChan_, respChan_) + go countForwardData(dataChan_, respChan_, errChan_) - return dataChan_, doneChan_, errChan_, err_ + return dataChan_, errChan_, err_ } type countWsResponse struct { @@ -3124,7 +3124,7 @@ type countWsResponse struct { Errors error `json:"errors"` } -func countForwardData(dataChan_ chan countWsResponse, errChan_ chan error, respChan_ chan json.RawMessage) { +func countForwardData(dataChan_ chan countWsResponse, respChan_ chan json.RawMessage, errChan_ chan error) { defer close(dataChan_) var gqlResp graphql.Response var wsResp countWsResponse diff --git a/internal/integration/integration_test.go b/internal/integration/integration_test.go index 4f217973..bf7543fa 100644 --- a/internal/integration/integration_test.go +++ b/internal/integration/integration_test.go @@ -47,7 +47,7 @@ func TestMutation(t *testing.T) { defer server.Close() postClient := newRoundtripClient(t, server.URL) getClient := newRoundtripGetClient(t, server.URL) - websocketClient := newRoundtripWebScoketClient(t, server.URL) + subClient, _ := newRoundtripWebScoketClient(t, server.URL) resp, _, err := createUser(ctx, postClient, NewUser{Name: "Jack"}) require.NoError(t, err) @@ -57,7 +57,7 @@ func TestMutation(t *testing.T) { _, _, err = createUser(ctx, getClient, NewUser{Name: "Jill"}) require.Errorf(t, err, "client does not support mutations") - _, _, err = createUser(ctx, websocketClient, NewUser{Name: "Jill"}) + _, _, err = createUser(ctx, subClient, NewUser{Name: "Jill"}) require.Errorf(t, err, "client does not support mutations") } @@ -70,18 +70,18 @@ func TestSubscription(t *testing.T) { defer server.Close() postClient := newRoundtripClient(t, server.URL) getClient := newRoundtripGetClient(t, server.URL) - websocketClient := newRoundtripWebScoketClient(t, server.URL) + subClient, wsClient := newRoundtripWebScoketClient(t, server.URL) - _, _, _, err := count(ctx, getClient) + _, _, err := count(ctx, getClient) require.Errorf(t, err, "client does not support websocket") - _, _, _, err = count(ctx, postClient) + _, _, err = count(ctx, postClient) require.Errorf(t, err, "client does not support websocket") start := time.Now() - respChan, doneChan, errChan, err := count(ctx, websocketClient) + respChan, errChan, err := count(ctx, subClient) require.NoError(t, err) - defer func() { doneChan <- true }() + defer wsClient.CloseConnection() counter := 0 for loop := true; loop; { select { diff --git a/internal/integration/roundtrip.go b/internal/integration/roundtrip.go index 8bf34ab9..61eb17fd 100644 --- a/internal/integration/roundtrip.go +++ b/internal/integration/roundtrip.go @@ -105,7 +105,7 @@ func (c *roundtripClient) MakeRequest(ctx context.Context, req *graphql.Request, return nil } -func (c *roundtripClient) DialWebSocket(ctx context.Context, req *graphql.Request, respChan chan json.RawMessage) (doneChan chan bool, errChan chan error, err error) { +func (c *roundtripClient) DialWebSocket(ctx context.Context, req *graphql.Request, respChan chan json.RawMessage) (errChan chan error, err error) { return c.wrapped.DialWebSocket(ctx, req, respChan) } @@ -142,7 +142,7 @@ func (md *MyDialer) DialContext(ctx context.Context, urlStr string, requestHeade return graphql.WSConn(conn), resp, err } -func newRoundtripWebScoketClient(t *testing.T, endpoint string) graphql.Client { +func newRoundtripWebScoketClient(t *testing.T, endpoint string) (graphql.Client, *graphql.WebSocketClient) { dialer := websocket.DefaultDialer webSocketClient := graphql.WebSocketClient{Dialer: &MyDialer{Dialer: dialer}, Header: http.Header{}} if !strings.HasPrefix(endpoint, "ws") { @@ -150,7 +150,7 @@ func newRoundtripWebScoketClient(t *testing.T, endpoint string) graphql.Client { endpoint = "ws://" + address } return &roundtripClient{ - wrapped: graphql.NewClientUsingWebSocket(endpoint, webSocketClient), + wrapped: graphql.NewClientUsingWebSocket(endpoint, &webSocketClient), t: t, - } + }, &webSocketClient } From 7fa1ac653c034121e3148c661c6fcdfa36447e2d Mon Sep 17 00:00:00 2001 From: matthieu4294967296moineau Date: Fri, 1 Sep 2023 15:28:57 +0200 Subject: [PATCH 07/35] Dont have to create wsClient separately from graphQL client --- generate/operation.go.tmpl | 2 +- ...tion.graphql-SimpleSubscription.graphql.go | 2 +- graphql/client.go | 59 +++++++++++++------ graphql/websocket.go | 38 ++++-------- internal/integration/generated.go | 2 +- internal/integration/integration_test.go | 10 ++-- internal/integration/roundtrip.go | 11 ++-- 7 files changed, 69 insertions(+), 55 deletions(-) diff --git a/generate/operation.go.tmpl b/generate/operation.go.tmpl index b6510dcb..54af5a11 100644 --- a/generate/operation.go.tmpl +++ b/generate/operation.go.tmpl @@ -7,7 +7,7 @@ const {{.Name}}_Operation = `{{$.Body}}` // {{.Name}} {{end -}} // -// To close the connection, use [graphql.WebSocketClient.CloseConnection()] +// To close the connection, use [graphql.Client.CloseWebSocket()] {{end -}} func {{.Name}}( {{if ne .Config.ContextType "-" -}} diff --git a/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go index 254b8ff7..9220e710 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go @@ -26,7 +26,7 @@ subscription SimpleSubscription { // SimpleSubscription // -// To close the connection, use [graphql.WebSocketClient.CloseConnection()] +// To close the connection, use [graphql.Client.CloseWebSocket()] func SimpleSubscription( client_ graphql.Client, ) (dataChan_ chan SimpleSubscriptionWsResponse, errChan_ chan error, err error) { diff --git a/graphql/client.go b/graphql/client.go index e222dad4..289b6dbc 100644 --- a/graphql/client.go +++ b/graphql/client.go @@ -61,17 +61,19 @@ type Client interface { req *Request, respChan chan json.RawMessage, ) (errChan chan error, err error) + + // CloseWebSocket must end the graphql subscription and close the webSocket + // connection. + CloseWebSocket() } type client struct { - httpClient Doer - webSocketClient *WebSocketClient - endpoint string - method string + httpClient Doer + wsClient *webSocketClient + endpoint string + method string } -const constMethodWebSocket = "websocket" - // NewClient returns a [Client] which makes requests to the given endpoint, // suitable for most users. // @@ -79,6 +81,9 @@ const constMethodWebSocket = "websocket" // GraphQL HTTP-over-JSON transport. It will use the given [http.Client], or // [http.DefaultClient] if a nil client is passed. // +// The client does not support subscriptions, and will return an error if passed +// a request that attempts one. +// // The typical method of adding authentication headers is to wrap the client's // [http.Transport] to add those headers. See [example/main.go] for an // example. @@ -97,8 +102,8 @@ func NewClient(endpoint string, httpClient Doer) Client { // parameters. It will use the given [http.Client], or [http.DefaultClient] if // a nil client is passed. // -// The client does not support mutations, and will return an error if passed a -// request that attempts one. +// The client does not support mutations nor subscriptions, and will return an +// error if passed a request that attempts one. // // The typical method of adding authentication headers is to wrap the client's // [http.Transport] to add those headers. See [example/main.go] for an @@ -114,18 +119,24 @@ func NewClientUsingGet(endpoint string, httpClient Doer) Client { // // The client does not support queries nor mutations, and will return an error // if passed a request that attempts one. -func NewClientUsingWebSocket(endpoint string, webSocketClient *WebSocketClient) Client { - webSocketClient.Header.Add("Sec-WebSocket-Protocol", "graphql-transport-ws") - webSocketClient.doneChan = make(chan bool, 1) - webSocketClient.errChan = make(chan error, 1) - return newClient(endpoint, nil, constMethodWebSocket, webSocketClient) +func NewClientUsingWebSocket(endpoint string, wsDialer Dialer, headers http.Header) Client { + if headers == nil { + headers = http.Header{} + } + headers.Add("Sec-WebSocket-Protocol", "graphql-transport-ws") + wsClient := webSocketClient{ + Dialer: wsDialer, + Header: headers, + errChan: make(chan error, 1), + } + return newClient(endpoint, nil, webSocketMethod, &wsClient) } -func newClient(endpoint string, httpClient Doer, method string, webSocketClient *WebSocketClient) Client { +func newClient(endpoint string, httpClient Doer, method string, wsClient *webSocketClient) Client { if httpClient == nil || httpClient == (*http.Client)(nil) { httpClient = http.DefaultClient } - return &client{httpClient, webSocketClient, endpoint, method} + return &client{httpClient, wsClient, endpoint, method} } // Doer encapsulates the methods from [*http.Client] needed by [Client]. @@ -230,7 +241,7 @@ func (c *client) MakeRequest(ctx context.Context, req *Request, resp *Response) } func (c *client) DialWebSocket(ctx context.Context, req *Request, respChan chan json.RawMessage) (errChan chan error, err error) { - if c.method != constMethodWebSocket { + if c.method != webSocketMethod { return nil, errors.New("client does not support websocket") } if req.Query != "" { @@ -248,13 +259,25 @@ func (c *client) DialWebSocket(ctx context.Context, req *Request, respChan chan respChan, ) - return c.webSocketClient.errChan, err + return c.wsClient.errChan, err +} + +func (c *client) CloseWebSocket() { + defer c.wsClient.conn.Close() + err := c.wsClient.sendComplete() + if err != nil { + c.wsClient.errChan <- err + } + err = c.wsClient.conn.WriteMessage(CloseMessage, formatCloseMessage(CloseNormalClosure, "")) + if err != nil { + c.wsClient.errChan <- err + } } func (c *client) subscribeAndListen(ctx context.Context, req *Request, respChan chan json.RawMessage) error { var res *http.Response var err error - w := c.webSocketClient + w := c.wsClient w.conn, res, err = w.Dialer.DialContext(ctx, c.endpoint, w.Header) if err != nil { return err diff --git a/graphql/websocket.go b/graphql/websocket.go index 915f4691..4965c6e6 100644 --- a/graphql/websocket.go +++ b/graphql/websocket.go @@ -9,6 +9,7 @@ import ( ) const ( + webSocketMethod = "websocket" webSocketTypeConnInit = "connection_init" webSocketTypeConnAck = "connection_ack" webSocketTypeSubscribe = "subscribe" @@ -59,12 +60,11 @@ const ( PongMessage = 10 ) -type WebSocketClient struct { - Dialer Dialer - Header http.Header - conn WSConn - doneChan chan bool - errChan chan error +type webSocketClient struct { + Dialer Dialer + Header http.Header + conn WSConn + errChan chan error } type webSocketSendMessage struct { @@ -77,26 +77,14 @@ type webSocketReceiveMessage struct { Payload json.RawMessage `json:"payload"` } -func (w *WebSocketClient) CloseConnection() { - defer w.conn.Close() - err := w.sendComplete() - if err != nil { - w.errChan <- err - } - err = w.conn.WriteMessage(CloseMessage, formatCloseMessage(CloseNormalClosure, "")) - if err != nil { - w.errChan <- err - } -} - -func (w *WebSocketClient) sendInit() error { +func (w *webSocketClient) sendInit() error { connInit := webSocketSendMessage{ Type: webSocketTypeConnInit, } return w.sendStructAsJSON(connInit) } -func (w *WebSocketClient) sendSubscribe(req *Request) error { +func (w *webSocketClient) sendSubscribe(req *Request) error { subscription := webSocketSendMessage{ Type: webSocketTypeSubscribe, Payload: req, @@ -104,14 +92,14 @@ func (w *WebSocketClient) sendSubscribe(req *Request) error { return w.sendStructAsJSON(subscription) } -func (w *WebSocketClient) sendComplete() error { +func (w *webSocketClient) sendComplete() error { complete := webSocketSendMessage{ Type: webSocketTypeComplete, } return w.sendStructAsJSON(complete) } -func (w *WebSocketClient) sendStructAsJSON(object any) error { +func (w *webSocketClient) sendStructAsJSON(object any) error { jsonBytes, err := json.Marshal(object) if err != nil { return err @@ -119,7 +107,7 @@ func (w *WebSocketClient) sendStructAsJSON(object any) error { return w.conn.WriteMessage(TextMessage, jsonBytes) } -func (w *WebSocketClient) waitForConnAck() error { +func (w *webSocketClient) waitForConnAck() error { var connAckReceived bool var err error start := time.Now() @@ -135,7 +123,7 @@ func (w *WebSocketClient) waitForConnAck() error { return nil } -func (w *WebSocketClient) listenWebSocket(respChan chan json.RawMessage) { +func (w *webSocketClient) listenWebSocket(respChan chan json.RawMessage) { defer close(respChan) for { _, message, err := w.conn.ReadMessage() @@ -151,7 +139,7 @@ func (w *WebSocketClient) listenWebSocket(respChan chan json.RawMessage) { } } -func (w *WebSocketClient) receiveWebSocketConnAck() (bool, error) { +func (w *webSocketClient) receiveWebSocketConnAck() (bool, error) { _, message, err := w.conn.ReadMessage() if err != nil { return false, err diff --git a/internal/integration/generated.go b/internal/integration/generated.go index 075b1f68..a55833f0 100644 --- a/internal/integration/generated.go +++ b/internal/integration/generated.go @@ -3095,7 +3095,7 @@ subscription count { // count // -// To close the connection, use [graphql.WebSocketClient.CloseConnection()] +// To close the connection, use [graphql.Client.CloseWebSocket()] func count( ctx_ context.Context, client_ graphql.Client, diff --git a/internal/integration/integration_test.go b/internal/integration/integration_test.go index bf7543fa..df70d39f 100644 --- a/internal/integration/integration_test.go +++ b/internal/integration/integration_test.go @@ -47,7 +47,7 @@ func TestMutation(t *testing.T) { defer server.Close() postClient := newRoundtripClient(t, server.URL) getClient := newRoundtripGetClient(t, server.URL) - subClient, _ := newRoundtripWebScoketClient(t, server.URL) + wsClient := newRoundtripWebScoketClient(t, server.URL) resp, _, err := createUser(ctx, postClient, NewUser{Name: "Jack"}) require.NoError(t, err) @@ -57,7 +57,7 @@ func TestMutation(t *testing.T) { _, _, err = createUser(ctx, getClient, NewUser{Name: "Jill"}) require.Errorf(t, err, "client does not support mutations") - _, _, err = createUser(ctx, subClient, NewUser{Name: "Jill"}) + _, _, err = createUser(ctx, wsClient, NewUser{Name: "Jill"}) require.Errorf(t, err, "client does not support mutations") } @@ -70,7 +70,7 @@ func TestSubscription(t *testing.T) { defer server.Close() postClient := newRoundtripClient(t, server.URL) getClient := newRoundtripGetClient(t, server.URL) - subClient, wsClient := newRoundtripWebScoketClient(t, server.URL) + wsClient := newRoundtripWebScoketClient(t, server.URL) _, _, err := count(ctx, getClient) require.Errorf(t, err, "client does not support websocket") @@ -79,9 +79,9 @@ func TestSubscription(t *testing.T) { require.Errorf(t, err, "client does not support websocket") start := time.Now() - respChan, errChan, err := count(ctx, subClient) + respChan, errChan, err := count(ctx, wsClient) require.NoError(t, err) - defer wsClient.CloseConnection() + defer wsClient.CloseWebSocket() counter := 0 for loop := true; loop; { select { diff --git a/internal/integration/roundtrip.go b/internal/integration/roundtrip.go index 61eb17fd..f14c2590 100644 --- a/internal/integration/roundtrip.go +++ b/internal/integration/roundtrip.go @@ -109,6 +109,10 @@ func (c *roundtripClient) DialWebSocket(ctx context.Context, req *graphql.Reques return c.wrapped.DialWebSocket(ctx, req, respChan) } +func (c *roundtripClient) CloseWebSocket() { + c.wrapped.CloseWebSocket() +} + func newRoundtripClients(t *testing.T, endpoint string) []graphql.Client { return []graphql.Client{newRoundtripClient(t, endpoint), newRoundtripGetClient(t, endpoint)} } @@ -142,15 +146,14 @@ func (md *MyDialer) DialContext(ctx context.Context, urlStr string, requestHeade return graphql.WSConn(conn), resp, err } -func newRoundtripWebScoketClient(t *testing.T, endpoint string) (graphql.Client, *graphql.WebSocketClient) { +func newRoundtripWebScoketClient(t *testing.T, endpoint string) graphql.Client { dialer := websocket.DefaultDialer - webSocketClient := graphql.WebSocketClient{Dialer: &MyDialer{Dialer: dialer}, Header: http.Header{}} if !strings.HasPrefix(endpoint, "ws") { _, address, _ := strings.Cut(endpoint, "://") endpoint = "ws://" + address } return &roundtripClient{ - wrapped: graphql.NewClientUsingWebSocket(endpoint, &webSocketClient), + wrapped: graphql.NewClientUsingWebSocket(endpoint, &MyDialer{Dialer: dialer}, nil), t: t, - }, &webSocketClient + } } From 2be16a40f1f06391e9f74cc3bc0fe1c391a2f923 Mon Sep 17 00:00:00 2001 From: matthieu4294967296moineau Date: Mon, 4 Sep 2023 11:31:28 +0200 Subject: [PATCH 08/35] added exampleWebSocket --- .golangci.yml | 4 +- exampleWebSocket/README.md | 26 + exampleWebSocket/generated.go | 83 + exampleWebSocket/genqlient.graphql | 3 + exampleWebSocket/genqlient.yaml | 17 + exampleWebSocket/main.go | 75 + exampleWebSocket/schema.graphql | 41425 +++++++++++++++++++++++++++ 7 files changed, 41631 insertions(+), 2 deletions(-) create mode 100644 exampleWebSocket/README.md create mode 100644 exampleWebSocket/generated.go create mode 100644 exampleWebSocket/genqlient.graphql create mode 100644 exampleWebSocket/genqlient.yaml create mode 100644 exampleWebSocket/main.go create mode 100644 exampleWebSocket/schema.graphql diff --git a/.golangci.yml b/.golangci.yml index 4446cc4c..8b660f1a 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -92,7 +92,7 @@ issues: # Ok to use fmt.Print in the examples, and in the CLI entrypoint. - linters: - forbidigo - path: ^example/|^generate/main\.go$ + path: ^example/|^exampleWebSocket/|^generate/main\.go$ - linters: - errcheck @@ -109,5 +109,5 @@ issues: - linters: - govet # Only a big deal for runtime code. - path: ^generate/|^example/ + path: ^generate/|^example/|^exampleWebSocket/ text: "^fieldalignment: struct with \\d+ pointer bytes could be \\d+$" diff --git a/exampleWebSocket/README.md b/exampleWebSocket/README.md new file mode 100644 index 00000000..bfe6b405 --- /dev/null +++ b/exampleWebSocket/README.md @@ -0,0 +1,26 @@ +# example of genqlient + +## Invoking the example +Create a [personal access token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) with no scopes. + +To run the example: + +```sh +$ GITHUB_TOKEN= go run . +1 +2 +3 +4 +5 +``` + +## Running genqlient + +It's already checked in to GitHub, but to regenerate `generated.go`: +```sh +go generate ./... +``` + +## Generating the schema file + +The schema file is also checked in, but to update it, download from the [GitHub API documentation](https://docs.github.com/en/graphql/overview/public-schema). diff --git a/exampleWebSocket/generated.go b/exampleWebSocket/generated.go new file mode 100644 index 00000000..6297ed5a --- /dev/null +++ b/exampleWebSocket/generated.go @@ -0,0 +1,83 @@ +// Code generated by github.com/Khan/genqlient, DO NOT EDIT. + +package main + +import ( + "context" + "encoding/json" + + "github.com/Khan/genqlient/graphql" +) + +// countResponse is returned by count on success. +type countResponse struct { + Count int `json:"count"` +} + +// GetCount returns countResponse.Count, and is useful for accessing the field via an interface. +func (v *countResponse) GetCount() int { return v.Count } + +// The query, mutation or subscription executed by count. +const count_Operation = ` +subscription count { + count +} +` + +// count +// +// To close the connection, use [graphql.Client.CloseWebSocket()] +func count( + ctx_ context.Context, + client_ graphql.Client, +) (dataChan_ chan countWsResponse, errChan_ chan error, err error) { + req_ := &graphql.Request{ + OpName: "count", + Query: count_Operation, + } + var err_ error + + dataChan_ = make(chan countWsResponse, 1) + respChan_ := make(chan json.RawMessage, 1) + + errChan_, err_ = client_.DialWebSocket(ctx_, req_, respChan_) + if err_ != nil { + return nil, nil, err_ + } + go countForwardData(dataChan_, respChan_, errChan_) + + return dataChan_, errChan_, err_ +} + +type countWsResponse struct { + Data *countResponse `json:"data"` + Extensions map[string]interface{} `json:"extensions,omitempty"` + Errors error `json:"errors"` +} + +func countForwardData(dataChan_ chan countWsResponse, respChan_ chan json.RawMessage, errChan_ chan error) { + defer close(dataChan_) + var gqlResp graphql.Response + var wsResp countWsResponse + for { + jsonRaw, more_ := <-respChan_ + if !more_ { + return + } + err := json.Unmarshal(jsonRaw, &gqlResp) + if err != nil { + errChan_ <- err + return + } + if len(gqlResp.Errors) == 0 { + err = json.Unmarshal(jsonRaw, &wsResp) + if err != nil { + errChan_ <- err + return + } + } else { + wsResp.Errors = gqlResp.Errors + } + dataChan_ <- wsResp + } +} diff --git a/exampleWebSocket/genqlient.graphql b/exampleWebSocket/genqlient.graphql new file mode 100644 index 00000000..10d8a42e --- /dev/null +++ b/exampleWebSocket/genqlient.graphql @@ -0,0 +1,3 @@ +subscription count { + count +} diff --git a/exampleWebSocket/genqlient.yaml b/exampleWebSocket/genqlient.yaml new file mode 100644 index 00000000..7f0f5c31 --- /dev/null +++ b/exampleWebSocket/genqlient.yaml @@ -0,0 +1,17 @@ +schema: schema.graphql +operations: +- genqlient.graphql +generated: generated.go +allow_broken_features: true +# needed since it doesn't match the directory name: +package: main + +# We bind github's DateTime scalar type to Go's time.Time (which conveniently +# already defines MarshalJSON and UnmarshalJSON). This means genqlient will +# use time.Time when a query requests a DateTime, and is required for custom +# scalars. +bindings: + DateTime: + type: time.Time + Time: + type: time.Time diff --git a/exampleWebSocket/main.go b/exampleWebSocket/main.go new file mode 100644 index 00000000..7b035098 --- /dev/null +++ b/exampleWebSocket/main.go @@ -0,0 +1,75 @@ +package main + +import ( + "context" + "fmt" + "net/http" + "os" + "time" + + "github.com/Khan/genqlient/graphql" + "github.com/gorilla/websocket" +) + +type MyDialer struct { + *websocket.Dialer +} + +func (md *MyDialer) DialContext(ctx context.Context, urlStr string, requestHeader http.Header) (graphql.WSConn, *http.Response, error) { + conn, resp, err := md.Dialer.DialContext(ctx, urlStr, requestHeader) + return graphql.WSConn(conn), resp, err +} + +func main() { + var err error + defer func() { + if err != nil { + fmt.Println(err) + os.Exit(1) + } + }() + + key := os.Getenv("GITHUB_TOKEN") + if key == "" { + err = fmt.Errorf("must set GITHUB_TOKEN=") + return + } + + dialer := websocket.DefaultDialer + headers := http.Header{} + headers.Add("Authorization", "bearer "+key) + + graphqlClient := graphql.NewClientUsingWebSocket( + "wss://api.github.com/graphql", + &MyDialer{Dialer: dialer}, + headers, + ) + + respChan, errChan, err := count(context.Background(), graphqlClient) + if err != nil { + return + } + for loop := true; loop; { + select { + case msg, more := <-respChan: + if !more { + loop = false + break + } + if msg.Data != nil { + fmt.Println(msg.Data) + } + if msg.Errors != nil { + fmt.Println("error:", msg.Errors) + loop = false + } + case err = <-errChan: + return + case <-time.After(time.Second * 5): + loop = false + } + } + graphqlClient.CloseWebSocket() +} + +//go:generate go run github.com/Khan/genqlient genqlient.yaml diff --git a/exampleWebSocket/schema.graphql b/exampleWebSocket/schema.graphql new file mode 100644 index 00000000..78334d61 --- /dev/null +++ b/exampleWebSocket/schema.graphql @@ -0,0 +1,41425 @@ +""" +Defines what type of global IDs are accepted for a mutation argument of type ID. +""" +directive @possibleTypes( + """ + Abstract type of accepted global ID + """ + abstractType: String + + """ + Accepted types of global IDs. + """ + concreteTypes: [String!]! +) on INPUT_FIELD_DEFINITION + +""" +Marks an element of a GraphQL schema as only available via a preview header +""" +directive @preview( + """ + The identifier of the API preview that toggles this field. + """ + toggledBy: String! +) on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +""" +Autogenerated input type of AcceptEnterpriseAdministratorInvitation +""" +input AcceptEnterpriseAdministratorInvitationInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The id of the invitation being accepted + """ + invitationId: ID! @possibleTypes(concreteTypes: ["EnterpriseAdministratorInvitation"]) +} + +""" +Autogenerated return type of AcceptEnterpriseAdministratorInvitation +""" +type AcceptEnterpriseAdministratorInvitationPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The invitation that was accepted. + """ + invitation: EnterpriseAdministratorInvitation + + """ + A message confirming the result of accepting an administrator invitation. + """ + message: String +} + +""" +Autogenerated input type of AcceptTopicSuggestion +""" +input AcceptTopicSuggestionInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The name of the suggested topic. + """ + name: String! + + """ + The Node ID of the repository. + """ + repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) +} + +""" +Autogenerated return type of AcceptTopicSuggestion +""" +type AcceptTopicSuggestionPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The accepted topic. + """ + topic: Topic +} + +""" +Represents an object which can take actions on GitHub. Typically a User or Bot. +""" +interface Actor { + """ + A URL pointing to the actor's public avatar. + """ + avatarUrl( + """ + The size of the resulting square image. + """ + size: Int + ): URI! + + """ + The username of the actor. + """ + login: String! + + """ + The HTTP path for this actor. + """ + resourcePath: URI! + + """ + The HTTP URL for this actor. + """ + url: URI! +} + +""" +Location information for an actor +""" +type ActorLocation { + """ + City + """ + city: String + + """ + Country name + """ + country: String + + """ + Country code + """ + countryCode: String + + """ + Region name + """ + region: String + + """ + Region or state code + """ + regionCode: String +} + +""" +Autogenerated input type of AddAssigneesToAssignable +""" +input AddAssigneesToAssignableInput { + """ + The id of the assignable object to add assignees to. + """ + assignableId: ID! @possibleTypes(concreteTypes: ["Issue", "PullRequest"], abstractType: "Assignable") + + """ + The id of users to add as assignees. + """ + assigneeIds: [ID!]! @possibleTypes(concreteTypes: ["User"]) + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String +} + +""" +Autogenerated return type of AddAssigneesToAssignable +""" +type AddAssigneesToAssignablePayload { + """ + The item that was assigned. + """ + assignable: Assignable + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String +} + +""" +Autogenerated input type of AddComment +""" +input AddCommentInput { + """ + The contents of the comment. + """ + body: String! + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The Node ID of the subject to modify. + """ + subjectId: ID! @possibleTypes(concreteTypes: ["Issue", "PullRequest"], abstractType: "IssueOrPullRequest") +} + +""" +Autogenerated return type of AddComment +""" +type AddCommentPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The edge from the subject's comment connection. + """ + commentEdge: IssueCommentEdge + + """ + The subject + """ + subject: Node + + """ + The edge from the subject's timeline connection. + """ + timelineEdge: IssueTimelineItemEdge +} + +""" +Autogenerated input type of AddEnterpriseSupportEntitlement +""" +input AddEnterpriseSupportEntitlementInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the Enterprise which the admin belongs to. + """ + enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) + + """ + The login of a member who will receive the support entitlement. + """ + login: String! +} + +""" +Autogenerated return type of AddEnterpriseSupportEntitlement +""" +type AddEnterpriseSupportEntitlementPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + A message confirming the result of adding the support entitlement. + """ + message: String +} + +""" +Autogenerated input type of AddLabelsToLabelable +""" +input AddLabelsToLabelableInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ids of the labels to add. + """ + labelIds: [ID!]! @possibleTypes(concreteTypes: ["Label"]) + + """ + The id of the labelable object to add labels to. + """ + labelableId: ID! @possibleTypes(concreteTypes: ["Issue", "PullRequest"], abstractType: "Labelable") +} + +""" +Autogenerated return type of AddLabelsToLabelable +""" +type AddLabelsToLabelablePayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The item that was labeled. + """ + labelable: Labelable +} + +""" +Autogenerated input type of AddProjectCard +""" +input AddProjectCardInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The content of the card. Must be a member of the ProjectCardItem union + """ + contentId: ID @possibleTypes(concreteTypes: ["Issue", "PullRequest"], abstractType: "ProjectCardItem") + + """ + The note on the card. + """ + note: String + + """ + The Node ID of the ProjectColumn. + """ + projectColumnId: ID! @possibleTypes(concreteTypes: ["ProjectColumn"]) +} + +""" +Autogenerated return type of AddProjectCard +""" +type AddProjectCardPayload { + """ + The edge from the ProjectColumn's card connection. + """ + cardEdge: ProjectCardEdge + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ProjectColumn + """ + projectColumn: ProjectColumn +} + +""" +Autogenerated input type of AddProjectColumn +""" +input AddProjectColumnInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The name of the column. + """ + name: String! + + """ + The Node ID of the project. + """ + projectId: ID! @possibleTypes(concreteTypes: ["Project"]) +} + +""" +Autogenerated return type of AddProjectColumn +""" +type AddProjectColumnPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The edge from the project's column connection. + """ + columnEdge: ProjectColumnEdge + + """ + The project + """ + project: Project +} + +""" +Autogenerated input type of AddPullRequestReviewComment +""" +input AddPullRequestReviewCommentInput { + """ + The text of the comment. + """ + body: String! + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The SHA of the commit to comment on. + """ + commitOID: GitObjectID + + """ + The comment id to reply to. + """ + inReplyTo: ID @possibleTypes(concreteTypes: ["PullRequestReviewComment"]) + + """ + The relative path of the file to comment on. + """ + path: String + + """ + The line index in the diff to comment on. + """ + position: Int + + """ + The node ID of the pull request reviewing + """ + pullRequestId: ID @possibleTypes(concreteTypes: ["PullRequest"]) + + """ + The Node ID of the review to modify. + """ + pullRequestReviewId: ID @possibleTypes(concreteTypes: ["PullRequestReview"]) +} + +""" +Autogenerated return type of AddPullRequestReviewComment +""" +type AddPullRequestReviewCommentPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The newly created comment. + """ + comment: PullRequestReviewComment + + """ + The edge from the review's comment connection. + """ + commentEdge: PullRequestReviewCommentEdge +} + +""" +Autogenerated input type of AddPullRequestReview +""" +input AddPullRequestReviewInput { + """ + The contents of the review body comment. + """ + body: String + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The review line comments. + """ + comments: [DraftPullRequestReviewComment] + + """ + The commit OID the review pertains to. + """ + commitOID: GitObjectID + + """ + The event to perform on the pull request review. + """ + event: PullRequestReviewEvent + + """ + The Node ID of the pull request to modify. + """ + pullRequestId: ID! @possibleTypes(concreteTypes: ["PullRequest"]) + + """ + The review line comment threads. + """ + threads: [DraftPullRequestReviewThread] +} + +""" +Autogenerated return type of AddPullRequestReview +""" +type AddPullRequestReviewPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The newly created pull request review. + """ + pullRequestReview: PullRequestReview + + """ + The edge from the pull request's review connection. + """ + reviewEdge: PullRequestReviewEdge +} + +""" +Autogenerated input type of AddPullRequestReviewThread +""" +input AddPullRequestReviewThreadInput { + """ + Body of the thread's first comment. + """ + body: String! + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The line of the blob to which the thread refers. The end of the line range for multi-line comments. + """ + line: Int! + + """ + Path to the file being commented on. + """ + path: String! + + """ + The node ID of the pull request reviewing + """ + pullRequestId: ID @possibleTypes(concreteTypes: ["PullRequest"]) + + """ + The Node ID of the review to modify. + """ + pullRequestReviewId: ID @possibleTypes(concreteTypes: ["PullRequestReview"]) + + """ + The side of the diff on which the line resides. For multi-line comments, this is the side for the end of the line range. + """ + side: DiffSide = RIGHT + + """ + The first line of the range to which the comment refers. + """ + startLine: Int + + """ + The side of the diff on which the start line resides. + """ + startSide: DiffSide = RIGHT +} + +""" +Autogenerated return type of AddPullRequestReviewThread +""" +type AddPullRequestReviewThreadPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The newly created thread. + """ + thread: PullRequestReviewThread +} + +""" +Autogenerated input type of AddReaction +""" +input AddReactionInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The name of the emoji to react with. + """ + content: ReactionContent! + + """ + The Node ID of the subject to modify. + """ + subjectId: ID! @possibleTypes(concreteTypes: ["CommitComment", "Issue", "IssueComment", "PullRequest", "PullRequestReview", "PullRequestReviewComment", "TeamDiscussion", "TeamDiscussionComment"], abstractType: "Reactable") +} + +""" +Autogenerated return type of AddReaction +""" +type AddReactionPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The reaction object. + """ + reaction: Reaction + + """ + The reactable subject. + """ + subject: Reactable +} + +""" +Autogenerated input type of AddStar +""" +input AddStarInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The Starrable ID to star. + """ + starrableId: ID! @possibleTypes(concreteTypes: ["Gist", "Repository", "Topic"], abstractType: "Starrable") +} + +""" +Autogenerated return type of AddStar +""" +type AddStarPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The starrable. + """ + starrable: Starrable +} + +""" +Autogenerated input type of AddVerifiableDomain +""" +input AddVerifiableDomainInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The URL of the domain + """ + domain: URI! + + """ + The ID of the owner to add the domain to + """ + ownerId: ID! @possibleTypes(concreteTypes: ["Enterprise", "Organization"], abstractType: "VerifiableDomainOwner") +} + +""" +Autogenerated return type of AddVerifiableDomain +""" +type AddVerifiableDomainPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The verifiable domain that was added. + """ + domain: VerifiableDomain +} + +""" +Represents a 'added_to_project' event on a given issue or pull request. +""" +type AddedToProjectEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + id: ID! + + """ + Project referenced by event. + """ + project: Project @preview(toggledBy: "starfox-preview") + + """ + Project card referenced by this project event. + """ + projectCard: ProjectCard @preview(toggledBy: "starfox-preview") + + """ + Column name referenced by this project event. + """ + projectColumnName: String! @preview(toggledBy: "starfox-preview") +} + +""" +A GitHub App. +""" +type App implements Node { + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + + """ + The description of the app. + """ + description: String + id: ID! + + """ + The hex color code, without the leading '#', for the logo background. + """ + logoBackgroundColor: String! + + """ + A URL pointing to the app's logo. + """ + logoUrl( + """ + The size of the resulting image. + """ + size: Int + ): URI! + + """ + The name of the app. + """ + name: String! + + """ + A slug based on the name of the app for use in URLs. + """ + slug: String! + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! + + """ + The URL to the app's homepage. + """ + url: URI! +} + +""" +Autogenerated input type of ApproveVerifiableDomain +""" +input ApproveVerifiableDomainInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the verifiable domain to approve. + """ + id: ID! @possibleTypes(concreteTypes: ["VerifiableDomain"]) +} + +""" +Autogenerated return type of ApproveVerifiableDomain +""" +type ApproveVerifiableDomainPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The verifiable domain that was approved. + """ + domain: VerifiableDomain +} + +""" +Autogenerated input type of ArchiveRepository +""" +input ArchiveRepositoryInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the repository to mark as archived. + """ + repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) +} + +""" +Autogenerated return type of ArchiveRepository +""" +type ArchiveRepositoryPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The repository that was marked as archived. + """ + repository: Repository +} + +""" +An object that can have users assigned to it. +""" +interface Assignable { + """ + A list of Users assigned to this object. + """ + assignees( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): UserConnection! +} + +""" +Represents an 'assigned' event on any assignable object. +""" +type AssignedEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the assignable associated with the event. + """ + assignable: Assignable! + + """ + Identifies the user or mannequin that was assigned. + """ + assignee: Assignee + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! + + """ + Identifies the user who was assigned. + """ + user: User @deprecated(reason: "Assignees can now be mannequins. Use the `assignee` field instead. Removal on 2020-01-01 UTC.") +} + +""" +Types that can be assigned to issues. +""" +union Assignee = Bot | Mannequin | Organization | User + +""" +An entry in the audit log. +""" +interface AuditEntry { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Types that can initiate an audit log event. +""" +union AuditEntryActor = Bot | Organization | User + +""" +Ordering options for Audit Log connections. +""" +input AuditLogOrder { + """ + The ordering direction. + """ + direction: OrderDirection + + """ + The field to order Audit Logs by. + """ + field: AuditLogOrderField +} + +""" +Properties by which Audit Log connections can be ordered. +""" +enum AuditLogOrderField { + """ + Order audit log entries by timestamp + """ + CREATED_AT +} + +""" +Represents a 'auto_merge_disabled' event on a given pull request. +""" +type AutoMergeDisabledEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + The user who disabled auto-merge for this Pull Request + """ + disabler: User + id: ID! + + """ + PullRequest referenced by event + """ + pullRequest: PullRequest + + """ + The reason auto-merge was disabled + """ + reason: String + + """ + The reason_code relating to why auto-merge was disabled + """ + reasonCode: String +} + +""" +Represents a 'auto_merge_enabled' event on a given pull request. +""" +type AutoMergeEnabledEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + The user who enabled auto-merge for this Pull Request + """ + enabler: User + id: ID! + + """ + PullRequest referenced by event. + """ + pullRequest: PullRequest +} + +""" +Represents an auto-merge request for a pull request +""" +type AutoMergeRequest { + """ + The email address of the author of this auto-merge request. + """ + authorEmail: String + + """ + The commit message of the auto-merge request. + """ + commitBody: String + + """ + The commit title of the auto-merge request. + """ + commitHeadline: String + + """ + When was this auto-merge request was enabled. + """ + enabledAt: DateTime + + """ + The actor who created the auto-merge request. + """ + enabledBy: Actor + + """ + The merge method of the auto-merge request. + """ + mergeMethod: PullRequestMergeMethod! + + """ + The pull request that this auto-merge request is set against. + """ + pullRequest: PullRequest! +} + +""" +Represents a 'auto_rebase_enabled' event on a given pull request. +""" +type AutoRebaseEnabledEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + The user who enabled auto-merge (rebase) for this Pull Request + """ + enabler: User + id: ID! + + """ + PullRequest referenced by event. + """ + pullRequest: PullRequest +} + +""" +Represents a 'auto_squash_enabled' event on a given pull request. +""" +type AutoSquashEnabledEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + The user who enabled auto-merge (squash) for this Pull Request + """ + enabler: User + id: ID! + + """ + PullRequest referenced by event. + """ + pullRequest: PullRequest +} + +""" +Represents a 'automatic_base_change_failed' event on a given pull request. +""" +type AutomaticBaseChangeFailedEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! + + """ + The new base for this PR + """ + newBase: String! + + """ + The old base for this PR + """ + oldBase: String! + + """ + PullRequest referenced by event. + """ + pullRequest: PullRequest! +} + +""" +Represents a 'automatic_base_change_succeeded' event on a given pull request. +""" +type AutomaticBaseChangeSucceededEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! + + """ + The new base for this PR + """ + newBase: String! + + """ + The old base for this PR + """ + oldBase: String! + + """ + PullRequest referenced by event. + """ + pullRequest: PullRequest! +} + +""" +Represents a 'base_ref_changed' event on a given issue or pull request. +""" +type BaseRefChangedEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Identifies the name of the base ref for the pull request after it was changed. + """ + currentRefName: String! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + id: ID! + + """ + Identifies the name of the base ref for the pull request before it was changed. + """ + previousRefName: String! + + """ + PullRequest referenced by event. + """ + pullRequest: PullRequest! +} + +""" +Represents a 'base_ref_deleted' event on a given pull request. +""" +type BaseRefDeletedEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the name of the Ref associated with the `base_ref_deleted` event. + """ + baseRefName: String + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! + + """ + PullRequest referenced by event. + """ + pullRequest: PullRequest +} + +""" +Represents a 'base_ref_force_pushed' event on a given pull request. +""" +type BaseRefForcePushedEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the after commit SHA for the 'base_ref_force_pushed' event. + """ + afterCommit: Commit + + """ + Identifies the before commit SHA for the 'base_ref_force_pushed' event. + """ + beforeCommit: Commit + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! + + """ + PullRequest referenced by event. + """ + pullRequest: PullRequest! + + """ + Identifies the fully qualified ref name for the 'base_ref_force_pushed' event. + """ + ref: Ref +} + +""" +Represents a Git blame. +""" +type Blame { + """ + The list of ranges from a Git blame. + """ + ranges: [BlameRange!]! +} + +""" +Represents a range of information from a Git blame. +""" +type BlameRange { + """ + Identifies the recency of the change, from 1 (new) to 10 (old). This is + calculated as a 2-quantile and determines the length of distance between the + median age of all the changes in the file and the recency of the current + range's change. + """ + age: Int! + + """ + Identifies the line author + """ + commit: Commit! + + """ + The ending line for the range + """ + endingLine: Int! + + """ + The starting line for the range + """ + startingLine: Int! +} + +""" +Represents a Git blob. +""" +type Blob implements GitObject & Node { + """ + An abbreviated version of the Git object ID + """ + abbreviatedOid: String! + + """ + Byte size of Blob object + """ + byteSize: Int! + + """ + The HTTP path for this Git object + """ + commitResourcePath: URI! + + """ + The HTTP URL for this Git object + """ + commitUrl: URI! + id: ID! + + """ + Indicates whether the Blob is binary or text. Returns null if unable to determine the encoding. + """ + isBinary: Boolean + + """ + Indicates whether the contents is truncated + """ + isTruncated: Boolean! + + """ + The Git object ID + """ + oid: GitObjectID! + + """ + The Repository the Git object belongs to + """ + repository: Repository! + + """ + UTF8 text data or null if the Blob is binary + """ + text: String +} + +""" +A special type of user which takes actions on behalf of GitHub Apps. +""" +type Bot implements Actor & Node & UniformResourceLocatable { + """ + A URL pointing to the GitHub App's public avatar. + """ + avatarUrl( + """ + The size of the resulting square image. + """ + size: Int + ): URI! + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + id: ID! + + """ + The username of the actor. + """ + login: String! + + """ + The HTTP path for this bot + """ + resourcePath: URI! + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! + + """ + The HTTP URL for this bot + """ + url: URI! +} + +""" +A branch protection rule. +""" +type BranchProtectionRule implements Node { + """ + Can this branch be deleted. + """ + allowsDeletions: Boolean! + + """ + Are force pushes allowed on this branch. + """ + allowsForcePushes: Boolean! + + """ + A list of conflicts matching branches protection rule and other branch protection rules + """ + branchProtectionRuleConflicts( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): BranchProtectionRuleConflictConnection! + + """ + The actor who created this branch protection rule. + """ + creator: Actor + + """ + Identifies the primary key from the database. + """ + databaseId: Int + + """ + Will new commits pushed to matching branches dismiss pull request review approvals. + """ + dismissesStaleReviews: Boolean! + id: ID! + + """ + Can admins overwrite branch protection. + """ + isAdminEnforced: Boolean! + + """ + Repository refs that are protected by this rule + """ + matchingRefs( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Filters refs with query on name + """ + query: String + ): RefConnection! + + """ + Identifies the protection rule pattern. + """ + pattern: String! + + """ + A list push allowances for this branch protection rule. + """ + pushAllowances( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): PushAllowanceConnection! + + """ + The repository associated with this branch protection rule. + """ + repository: Repository + + """ + Number of approving reviews required to update matching branches. + """ + requiredApprovingReviewCount: Int + + """ + List of required status check contexts that must pass for commits to be accepted to matching branches. + """ + requiredStatusCheckContexts: [String] + + """ + Are approving reviews required to update matching branches. + """ + requiresApprovingReviews: Boolean! + + """ + Are reviews from code owners required to update matching branches. + """ + requiresCodeOwnerReviews: Boolean! + + """ + Are commits required to be signed. + """ + requiresCommitSignatures: Boolean! + + """ + Are merge commits prohibited from being pushed to this branch. + """ + requiresLinearHistory: Boolean! + + """ + Are status checks required to update matching branches. + """ + requiresStatusChecks: Boolean! + + """ + Are branches required to be up to date before merging. + """ + requiresStrictStatusChecks: Boolean! + + """ + Is pushing to matching branches restricted. + """ + restrictsPushes: Boolean! + + """ + Is dismissal of pull request reviews restricted. + """ + restrictsReviewDismissals: Boolean! + + """ + A list review dismissal allowances for this branch protection rule. + """ + reviewDismissalAllowances( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): ReviewDismissalAllowanceConnection! +} + +""" +A conflict between two branch protection rules. +""" +type BranchProtectionRuleConflict { + """ + Identifies the branch protection rule. + """ + branchProtectionRule: BranchProtectionRule + + """ + Identifies the conflicting branch protection rule. + """ + conflictingBranchProtectionRule: BranchProtectionRule + + """ + Identifies the branch ref that has conflicting rules + """ + ref: Ref +} + +""" +The connection type for BranchProtectionRuleConflict. +""" +type BranchProtectionRuleConflictConnection { + """ + A list of edges. + """ + edges: [BranchProtectionRuleConflictEdge] + + """ + A list of nodes. + """ + nodes: [BranchProtectionRuleConflict] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type BranchProtectionRuleConflictEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: BranchProtectionRuleConflict +} + +""" +The connection type for BranchProtectionRule. +""" +type BranchProtectionRuleConnection { + """ + A list of edges. + """ + edges: [BranchProtectionRuleEdge] + + """ + A list of nodes. + """ + nodes: [BranchProtectionRule] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type BranchProtectionRuleEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: BranchProtectionRule +} + +""" +The Common Vulnerability Scoring System +""" +type CVSS { + """ + The CVSS score associated with this advisory + """ + score: Float! + + """ + The CVSS vector string associated with this advisory + """ + vectorString: String +} + +""" +A common weakness enumeration +""" +type CWE implements Node { + """ + The id of the CWE + """ + cweId: String! + + """ + A detailed description of this CWE + """ + description: String! + + """ + ID of the object. + """ + id: ID! + + """ + The name of this CWE + """ + name: String! +} + +""" +The connection type for CWE. +""" +type CWEConnection { + """ + A list of edges. + """ + edges: [CWEEdge] + + """ + A list of nodes. + """ + nodes: [CWE] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type CWEEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: CWE +} + +""" +Autogenerated input type of CancelEnterpriseAdminInvitation +""" +input CancelEnterpriseAdminInvitationInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The Node ID of the pending enterprise administrator invitation. + """ + invitationId: ID! @possibleTypes(concreteTypes: ["EnterpriseAdministratorInvitation"]) +} + +""" +Autogenerated return type of CancelEnterpriseAdminInvitation +""" +type CancelEnterpriseAdminInvitationPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The invitation that was canceled. + """ + invitation: EnterpriseAdministratorInvitation + + """ + A message confirming the result of canceling an administrator invitation. + """ + message: String +} + +""" +Autogenerated input type of ChangeUserStatus +""" +input ChangeUserStatusInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The emoji to represent your status. Can either be a native Unicode emoji or an emoji name with colons, e.g., :grinning:. + """ + emoji: String + + """ + If set, the user status will not be shown after this date. + """ + expiresAt: DateTime + + """ + Whether this status should indicate you are not fully available on GitHub, e.g., you are away. + """ + limitedAvailability: Boolean = false + + """ + A short description of your current status. + """ + message: String + + """ + The ID of the organization whose members will be allowed to see the status. If + omitted, the status will be publicly visible. + """ + organizationId: ID @possibleTypes(concreteTypes: ["Organization"]) +} + +""" +Autogenerated return type of ChangeUserStatus +""" +type ChangeUserStatusPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + Your updated status. + """ + status: UserStatus +} + +""" +A single check annotation. +""" +type CheckAnnotation { + """ + The annotation's severity level. + """ + annotationLevel: CheckAnnotationLevel + + """ + The path to the file that this annotation was made on. + """ + blobUrl: URI! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + + """ + The position of this annotation. + """ + location: CheckAnnotationSpan! + + """ + The annotation's message. + """ + message: String! + + """ + The path that this annotation was made on. + """ + path: String! + + """ + Additional information about the annotation. + """ + rawDetails: String + + """ + The annotation's title + """ + title: String +} + +""" +The connection type for CheckAnnotation. +""" +type CheckAnnotationConnection { + """ + A list of edges. + """ + edges: [CheckAnnotationEdge] + + """ + A list of nodes. + """ + nodes: [CheckAnnotation] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +Information from a check run analysis to specific lines of code. +""" +input CheckAnnotationData { + """ + Represents an annotation's information level + """ + annotationLevel: CheckAnnotationLevel! + + """ + The location of the annotation + """ + location: CheckAnnotationRange! + + """ + A short description of the feedback for these lines of code. + """ + message: String! + + """ + The path of the file to add an annotation to. + """ + path: String! + + """ + Details about this annotation. + """ + rawDetails: String + + """ + The title that represents the annotation. + """ + title: String +} + +""" +An edge in a connection. +""" +type CheckAnnotationEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: CheckAnnotation +} + +""" +Represents an annotation's information level. +""" +enum CheckAnnotationLevel { + """ + An annotation indicating an inescapable error. + """ + FAILURE + + """ + An annotation indicating some information. + """ + NOTICE + + """ + An annotation indicating an ignorable error. + """ + WARNING +} + +""" +A character position in a check annotation. +""" +type CheckAnnotationPosition { + """ + Column number (1 indexed). + """ + column: Int + + """ + Line number (1 indexed). + """ + line: Int! +} + +""" +Information from a check run analysis to specific lines of code. +""" +input CheckAnnotationRange { + """ + The ending column of the range. + """ + endColumn: Int + + """ + The ending line of the range. + """ + endLine: Int! + + """ + The starting column of the range. + """ + startColumn: Int + + """ + The starting line of the range. + """ + startLine: Int! +} + +""" +An inclusive pair of positions for a check annotation. +""" +type CheckAnnotationSpan { + """ + End position (inclusive). + """ + end: CheckAnnotationPosition! + + """ + Start position (inclusive). + """ + start: CheckAnnotationPosition! +} + +""" +The possible states for a check suite or run conclusion. +""" +enum CheckConclusionState { + """ + The check suite or run requires action. + """ + ACTION_REQUIRED + + """ + The check suite or run has been cancelled. + """ + CANCELLED + + """ + The check suite or run has failed. + """ + FAILURE + + """ + The check suite or run was neutral. + """ + NEUTRAL + + """ + The check suite or run was skipped. + """ + SKIPPED + + """ + The check suite or run was marked stale by GitHub. Only GitHub can use this conclusion. + """ + STALE + + """ + The check suite or run has failed at startup. + """ + STARTUP_FAILURE + + """ + The check suite or run has succeeded. + """ + SUCCESS + + """ + The check suite or run has timed out. + """ + TIMED_OUT +} + +""" +A check run. +""" +type CheckRun implements Node & RequirableByPullRequest & UniformResourceLocatable { + """ + The check run's annotations + """ + annotations( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): CheckAnnotationConnection + + """ + The check suite that this run is a part of. + """ + checkSuite: CheckSuite! + + """ + Identifies the date and time when the check run was completed. + """ + completedAt: DateTime + + """ + The conclusion of the check run. + """ + conclusion: CheckConclusionState + + """ + Identifies the primary key from the database. + """ + databaseId: Int + + """ + The URL from which to find full details of the check run on the integrator's site. + """ + detailsUrl: URI + + """ + A reference for the check run on the integrator's system. + """ + externalId: String + id: ID! + + """ + Whether this is required to pass before merging for a specific pull request. + """ + isRequired( + """ + The id of the pull request this is required for + """ + pullRequestId: ID + + """ + The number of the pull request this is required for + """ + pullRequestNumber: Int + ): Boolean! + + """ + The name of the check for this check run. + """ + name: String! + + """ + The permalink to the check run summary. + """ + permalink: URI! + + """ + The repository associated with this check run. + """ + repository: Repository! + + """ + The HTTP path for this check run. + """ + resourcePath: URI! + + """ + Identifies the date and time when the check run was started. + """ + startedAt: DateTime + + """ + The current status of the check run. + """ + status: CheckStatusState! + + """ + A string representing the check run's summary + """ + summary: String + + """ + A string representing the check run's text + """ + text: String + + """ + A string representing the check run + """ + title: String + + """ + The HTTP URL for this check run. + """ + url: URI! +} + +""" +Possible further actions the integrator can perform. +""" +input CheckRunAction { + """ + A short explanation of what this action would do. + """ + description: String! + + """ + A reference for the action on the integrator's system. + """ + identifier: String! + + """ + The text to be displayed on a button in the web UI. + """ + label: String! +} + +""" +The connection type for CheckRun. +""" +type CheckRunConnection { + """ + A list of edges. + """ + edges: [CheckRunEdge] + + """ + A list of nodes. + """ + nodes: [CheckRun] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type CheckRunEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: CheckRun +} + +""" +The filters that are available when fetching check runs. +""" +input CheckRunFilter { + """ + Filters the check runs created by this application ID. + """ + appId: Int + + """ + Filters the check runs by this name. + """ + checkName: String + + """ + Filters the check runs by this type. + """ + checkType: CheckRunType + + """ + Filters the check runs by this status. + """ + status: CheckStatusState +} + +""" +Descriptive details about the check run. +""" +input CheckRunOutput { + """ + The annotations that are made as part of the check run. + """ + annotations: [CheckAnnotationData!] + + """ + Images attached to the check run output displayed in the GitHub pull request UI. + """ + images: [CheckRunOutputImage!] + + """ + The summary of the check run (supports Commonmark). + """ + summary: String! + + """ + The details of the check run (supports Commonmark). + """ + text: String + + """ + A title to provide for this check run. + """ + title: String! +} + +""" +Images attached to the check run output displayed in the GitHub pull request UI. +""" +input CheckRunOutputImage { + """ + The alternative text for the image. + """ + alt: String! + + """ + A short image description. + """ + caption: String + + """ + The full URL of the image. + """ + imageUrl: URI! +} + +""" +The possible types of check runs. +""" +enum CheckRunType { + """ + Every check run available. + """ + ALL + + """ + The latest check run. + """ + LATEST +} + +""" +The possible states for a check suite or run status. +""" +enum CheckStatusState { + """ + The check suite or run has been completed. + """ + COMPLETED + + """ + The check suite or run is in progress. + """ + IN_PROGRESS + + """ + The check suite or run has been queued. + """ + QUEUED + + """ + The check suite or run has been requested. + """ + REQUESTED + + """ + The check suite or run is in waiting state. + """ + WAITING +} + +""" +A check suite. +""" +type CheckSuite implements Node { + """ + The GitHub App which created this check suite. + """ + app: App + + """ + The name of the branch for this check suite. + """ + branch: Ref + + """ + The check runs associated with a check suite. + """ + checkRuns( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Filters the check runs by this type. + """ + filterBy: CheckRunFilter + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): CheckRunConnection + + """ + The commit for this check suite + """ + commit: Commit! + + """ + The conclusion of this check suite. + """ + conclusion: CheckConclusionState + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + id: ID! + + """ + A list of open pull requests matching the check suite. + """ + matchingPullRequests( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + The base ref name to filter the pull requests by. + """ + baseRefName: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + The head ref name to filter the pull requests by. + """ + headRefName: String + + """ + A list of label names to filter the pull requests by. + """ + labels: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for pull requests returned from the connection. + """ + orderBy: IssueOrder + + """ + A list of states to filter the pull requests by. + """ + states: [PullRequestState!] + ): PullRequestConnection + + """ + The push that triggered this check suite. + """ + push: Push + + """ + The repository associated with this check suite. + """ + repository: Repository! + + """ + The HTTP path for this check suite + """ + resourcePath: URI! + + """ + The status of this check suite. + """ + status: CheckStatusState! + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! + + """ + The HTTP URL for this check suite + """ + url: URI! +} + +""" +The auto-trigger preferences that are available for check suites. +""" +input CheckSuiteAutoTriggerPreference { + """ + The node ID of the application that owns the check suite. + """ + appId: ID! + + """ + Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository. + """ + setting: Boolean! +} + +""" +The connection type for CheckSuite. +""" +type CheckSuiteConnection { + """ + A list of edges. + """ + edges: [CheckSuiteEdge] + + """ + A list of nodes. + """ + nodes: [CheckSuite] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type CheckSuiteEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: CheckSuite +} + +""" +The filters that are available when fetching check suites. +""" +input CheckSuiteFilter { + """ + Filters the check suites created by this application ID. + """ + appId: Int + + """ + Filters the check suites by this name. + """ + checkName: String +} + +""" +Autogenerated input type of ClearLabelsFromLabelable +""" +input ClearLabelsFromLabelableInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The id of the labelable object to clear the labels from. + """ + labelableId: ID! @possibleTypes(concreteTypes: ["Issue", "PullRequest"], abstractType: "Labelable") +} + +""" +Autogenerated return type of ClearLabelsFromLabelable +""" +type ClearLabelsFromLabelablePayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The item that was unlabeled. + """ + labelable: Labelable +} + +""" +Autogenerated input type of CloneProject +""" +input CloneProjectInput { + """ + The description of the project. + """ + body: String + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + Whether or not to clone the source project's workflows. + """ + includeWorkflows: Boolean! + + """ + The name of the project. + """ + name: String! + + """ + The visibility of the project, defaults to false (private). + """ + public: Boolean + + """ + The source project to clone. + """ + sourceId: ID! @possibleTypes(concreteTypes: ["Project"]) + + """ + The owner ID to create the project under. + """ + targetOwnerId: ID! @possibleTypes(concreteTypes: ["Organization", "Repository", "User"], abstractType: "ProjectOwner") +} + +""" +Autogenerated return type of CloneProject +""" +type CloneProjectPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The id of the JobStatus for populating cloned fields. + """ + jobStatusId: String + + """ + The new cloned project. + """ + project: Project +} + +""" +Autogenerated input type of CloneTemplateRepository +""" +input CloneTemplateRepositoryInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + A short description of the new repository. + """ + description: String + + """ + Whether to copy all branches from the template to the new repository. Defaults + to copying only the default branch of the template. + """ + includeAllBranches: Boolean = false + + """ + The name of the new repository. + """ + name: String! + + """ + The ID of the owner for the new repository. + """ + ownerId: ID! @possibleTypes(concreteTypes: ["Organization", "User"], abstractType: "RepositoryOwner") + + """ + The Node ID of the template repository. + """ + repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) + + """ + Indicates the repository's visibility level. + """ + visibility: RepositoryVisibility! +} + +""" +Autogenerated return type of CloneTemplateRepository +""" +type CloneTemplateRepositoryPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The new repository. + """ + repository: Repository +} + +""" +An object that can be closed +""" +interface Closable { + """ + `true` if the object is closed (definition of closed may depend on type) + """ + closed: Boolean! + + """ + Identifies the date and time when the object was closed. + """ + closedAt: DateTime +} + +""" +Autogenerated input type of CloseIssue +""" +input CloseIssueInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + ID of the issue to be closed. + """ + issueId: ID! @possibleTypes(concreteTypes: ["Issue"]) +} + +""" +Autogenerated return type of CloseIssue +""" +type CloseIssuePayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The issue that was closed. + """ + issue: Issue +} + +""" +Autogenerated input type of ClosePullRequest +""" +input ClosePullRequestInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + ID of the pull request to be closed. + """ + pullRequestId: ID! @possibleTypes(concreteTypes: ["PullRequest"]) +} + +""" +Autogenerated return type of ClosePullRequest +""" +type ClosePullRequestPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The pull request that was closed. + """ + pullRequest: PullRequest +} + +""" +Represents a 'closed' event on any `Closable`. +""" +type ClosedEvent implements Node & UniformResourceLocatable { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Object that was closed. + """ + closable: Closable! + + """ + Object which triggered the creation of this event. + """ + closer: Closer + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! + + """ + The HTTP path for this closed event. + """ + resourcePath: URI! + + """ + The HTTP URL for this closed event. + """ + url: URI! +} + +""" +The object which triggered a `ClosedEvent`. +""" +union Closer = Commit | PullRequest + +""" +The Code of Conduct for a repository +""" +type CodeOfConduct implements Node { + """ + The body of the Code of Conduct + """ + body: String + id: ID! + + """ + The key for the Code of Conduct + """ + key: String! + + """ + The formal name of the Code of Conduct + """ + name: String! + + """ + The HTTP path for this Code of Conduct + """ + resourcePath: URI + + """ + The HTTP URL for this Code of Conduct + """ + url: URI +} + +""" +Collaborators affiliation level with a subject. +""" +enum CollaboratorAffiliation { + """ + All collaborators the authenticated user can see. + """ + ALL + + """ + All collaborators with permissions to an organization-owned subject, regardless of organization membership status. + """ + DIRECT + + """ + All outside collaborators of an organization-owned subject. + """ + OUTSIDE +} + +""" +Represents a comment. +""" +interface Comment { + """ + The actor who authored the comment. + """ + author: Actor + + """ + Author's association with the subject of the comment. + """ + authorAssociation: CommentAuthorAssociation! + + """ + The body as Markdown. + """ + body: String! + + """ + The body rendered to HTML. + """ + bodyHTML: HTML! + + """ + The body rendered to text. + """ + bodyText: String! + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Check if this comment was created via an email reply. + """ + createdViaEmail: Boolean! + + """ + The actor who edited the comment. + """ + editor: Actor + id: ID! + + """ + Check if this comment was edited and includes an edit with the creation data + """ + includesCreatedEdit: Boolean! + + """ + The moment the editor made the last edit + """ + lastEditedAt: DateTime + + """ + Identifies when the comment was published at. + """ + publishedAt: DateTime + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! + + """ + A list of edits to this content. + """ + userContentEdits( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): UserContentEditConnection + + """ + Did the viewer author this comment. + """ + viewerDidAuthor: Boolean! +} + +""" +A comment author association with repository. +""" +enum CommentAuthorAssociation { + """ + Author has been invited to collaborate on the repository. + """ + COLLABORATOR + + """ + Author has previously committed to the repository. + """ + CONTRIBUTOR + + """ + Author has not previously committed to GitHub. + """ + FIRST_TIMER + + """ + Author has not previously committed to the repository. + """ + FIRST_TIME_CONTRIBUTOR + + """ + Author is a placeholder for an unclaimed user. + """ + MANNEQUIN + + """ + Author is a member of the organization that owns the repository. + """ + MEMBER + + """ + Author has no association with the repository. + """ + NONE + + """ + Author is the owner of the repository. + """ + OWNER +} + +""" +The possible errors that will prevent a user from updating a comment. +""" +enum CommentCannotUpdateReason { + """ + Unable to create comment because repository is archived. + """ + ARCHIVED + + """ + You cannot update this comment + """ + DENIED + + """ + You must be the author or have write access to this repository to update this comment. + """ + INSUFFICIENT_ACCESS + + """ + Unable to create comment because issue is locked. + """ + LOCKED + + """ + You must be logged in to update this comment. + """ + LOGIN_REQUIRED + + """ + Repository is under maintenance. + """ + MAINTENANCE + + """ + At least one email address must be verified to update this comment. + """ + VERIFIED_EMAIL_REQUIRED +} + +""" +Represents a 'comment_deleted' event on a given issue or pull request. +""" +type CommentDeletedEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + + """ + The user who authored the deleted comment. + """ + deletedCommentAuthor: Actor + id: ID! +} + +""" +Represents a Git commit. +""" +type Commit implements GitObject & Node & Subscribable & UniformResourceLocatable { + """ + An abbreviated version of the Git object ID + """ + abbreviatedOid: String! + + """ + The number of additions in this commit. + """ + additions: Int! + + """ + The merged Pull Request that introduced the commit to the repository. If the + commit is not present in the default branch, additionally returns open Pull + Requests associated with the commit + """ + associatedPullRequests( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for pull requests. + """ + orderBy: PullRequestOrder = {field: CREATED_AT, direction: ASC} + ): PullRequestConnection + + """ + Authorship details of the commit. + """ + author: GitActor + + """ + Check if the committer and the author match. + """ + authoredByCommitter: Boolean! + + """ + The datetime when this commit was authored. + """ + authoredDate: DateTime! + + """ + The list of authors for this commit based on the git author and the Co-authored-by + message trailer. The git author will always be first. + """ + authors( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): GitActorConnection! + + """ + Fetches `git blame` information. + """ + blame( + """ + The file whose Git blame information you want. + """ + path: String! + ): Blame! + + """ + The number of changed files in this commit. + """ + changedFiles: Int! + + """ + The check suites associated with a commit. + """ + checkSuites( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Filters the check suites by this type. + """ + filterBy: CheckSuiteFilter + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): CheckSuiteConnection + + """ + Comments made on the commit. + """ + comments( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): CommitCommentConnection! + + """ + The HTTP path for this Git object + """ + commitResourcePath: URI! + + """ + The HTTP URL for this Git object + """ + commitUrl: URI! + + """ + The datetime when this commit was committed. + """ + committedDate: DateTime! + + """ + Check if committed via GitHub web UI. + """ + committedViaWeb: Boolean! + + """ + Committer details of the commit. + """ + committer: GitActor + + """ + The number of deletions in this commit. + """ + deletions: Int! + + """ + The deployments associated with a commit. + """ + deployments( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Environments to list deployments for + """ + environments: [String!] + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for deployments returned from the connection. + """ + orderBy: DeploymentOrder = {field: CREATED_AT, direction: ASC} + ): DeploymentConnection + + """ + The tree entry representing the file located at the given path. + """ + file( + """ + The path for the file + """ + path: String! + ): TreeEntry + + """ + The linear commit history starting from (and including) this commit, in the same order as `git log`. + """ + history( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + If non-null, filters history to only show commits with matching authorship. + """ + author: CommitAuthor + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + If non-null, filters history to only show commits touching files under this path. + """ + path: String + + """ + Allows specifying a beginning time or date for fetching commits. + """ + since: GitTimestamp + + """ + Allows specifying an ending time or date for fetching commits. + """ + until: GitTimestamp + ): CommitHistoryConnection! + id: ID! + + """ + The Git commit message + """ + message: String! + + """ + The Git commit message body + """ + messageBody: String! + + """ + The commit message body rendered to HTML. + """ + messageBodyHTML: HTML! + + """ + The Git commit message headline + """ + messageHeadline: String! + + """ + The commit message headline rendered to HTML. + """ + messageHeadlineHTML: HTML! + + """ + The Git object ID + """ + oid: GitObjectID! + + """ + The organization this commit was made on behalf of. + """ + onBehalfOf: Organization + + """ + The parents of a commit. + """ + parents( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): CommitConnection! + + """ + The datetime when this commit was pushed. + """ + pushedDate: DateTime + + """ + The Repository this commit belongs to + """ + repository: Repository! + + """ + The HTTP path for this commit + """ + resourcePath: URI! + + """ + Commit signing information, if present. + """ + signature: GitSignature + + """ + Status information for this commit + """ + status: Status + + """ + Check and Status rollup information for this commit. + """ + statusCheckRollup: StatusCheckRollup + + """ + Returns a list of all submodules in this repository as of this Commit parsed from the .gitmodules file. + """ + submodules( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): SubmoduleConnection! + + """ + Returns a URL to download a tarball archive for a repository. + Note: For private repositories, these links are temporary and expire after five minutes. + """ + tarballUrl: URI! + + """ + Commit's root Tree + """ + tree: Tree! + + """ + The HTTP path for the tree of this commit + """ + treeResourcePath: URI! + + """ + The HTTP URL for the tree of this commit + """ + treeUrl: URI! + + """ + The HTTP URL for this commit + """ + url: URI! + + """ + Check if the viewer is able to change their subscription status for the repository. + """ + viewerCanSubscribe: Boolean! + + """ + Identifies if the viewer is watching, not watching, or ignoring the subscribable entity. + """ + viewerSubscription: SubscriptionState + + """ + Returns a URL to download a zipball archive for a repository. + Note: For private repositories, these links are temporary and expire after five minutes. + """ + zipballUrl: URI! +} + +""" +Specifies an author for filtering Git commits. +""" +input CommitAuthor { + """ + Email addresses to filter by. Commits authored by any of the specified email addresses will be returned. + """ + emails: [String!] + + """ + ID of a User to filter by. If non-null, only commits authored by this user + will be returned. This field takes precedence over emails. + """ + id: ID +} + +""" +Represents a comment on a given Commit. +""" +type CommitComment implements Comment & Deletable & Minimizable & Node & Reactable & RepositoryNode & Updatable & UpdatableComment { + """ + The actor who authored the comment. + """ + author: Actor + + """ + Author's association with the subject of the comment. + """ + authorAssociation: CommentAuthorAssociation! + + """ + Identifies the comment body. + """ + body: String! + + """ + The body rendered to HTML. + """ + bodyHTML: HTML! + + """ + The body rendered to text. + """ + bodyText: String! + + """ + Identifies the commit associated with the comment, if the commit exists. + """ + commit: Commit + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Check if this comment was created via an email reply. + """ + createdViaEmail: Boolean! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + + """ + The actor who edited the comment. + """ + editor: Actor + id: ID! + + """ + Check if this comment was edited and includes an edit with the creation data + """ + includesCreatedEdit: Boolean! + + """ + Returns whether or not a comment has been minimized. + """ + isMinimized: Boolean! + + """ + The moment the editor made the last edit + """ + lastEditedAt: DateTime + + """ + Returns why the comment was minimized. + """ + minimizedReason: String + + """ + Identifies the file path associated with the comment. + """ + path: String + + """ + Identifies the line position associated with the comment. + """ + position: Int + + """ + Identifies when the comment was published at. + """ + publishedAt: DateTime + + """ + A list of reactions grouped by content left on the subject. + """ + reactionGroups: [ReactionGroup!] + + """ + A list of Reactions left on the Issue. + """ + reactions( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Allows filtering Reactions by emoji. + """ + content: ReactionContent + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Allows specifying the order in which reactions are returned. + """ + orderBy: ReactionOrder + ): ReactionConnection! + + """ + The repository associated with this node. + """ + repository: Repository! + + """ + The HTTP path permalink for this commit comment. + """ + resourcePath: URI! + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! + + """ + The HTTP URL permalink for this commit comment. + """ + url: URI! + + """ + A list of edits to this content. + """ + userContentEdits( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): UserContentEditConnection + + """ + Check if the current viewer can delete this object. + """ + viewerCanDelete: Boolean! + + """ + Check if the current viewer can minimize this object. + """ + viewerCanMinimize: Boolean! + + """ + Can user react to this subject + """ + viewerCanReact: Boolean! + + """ + Check if the current viewer can update this object. + """ + viewerCanUpdate: Boolean! + + """ + Reasons why the current viewer can not update this comment. + """ + viewerCannotUpdateReasons: [CommentCannotUpdateReason!]! + + """ + Did the viewer author this comment. + """ + viewerDidAuthor: Boolean! +} + +""" +The connection type for CommitComment. +""" +type CommitCommentConnection { + """ + A list of edges. + """ + edges: [CommitCommentEdge] + + """ + A list of nodes. + """ + nodes: [CommitComment] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type CommitCommentEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: CommitComment +} + +""" +A thread of comments on a commit. +""" +type CommitCommentThread implements Node & RepositoryNode { + """ + The comments that exist in this thread. + """ + comments( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): CommitCommentConnection! + + """ + The commit the comments were made on. + """ + commit: Commit + id: ID! + + """ + The file the comments were made on. + """ + path: String + + """ + The position in the diff for the commit that the comment was made on. + """ + position: Int + + """ + The repository associated with this node. + """ + repository: Repository! +} + +""" +The connection type for Commit. +""" +type CommitConnection { + """ + A list of edges. + """ + edges: [CommitEdge] + + """ + A list of nodes. + """ + nodes: [Commit] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +Ordering options for commit contribution connections. +""" +input CommitContributionOrder { + """ + The ordering direction. + """ + direction: OrderDirection! + + """ + The field by which to order commit contributions. + """ + field: CommitContributionOrderField! +} + +""" +Properties by which commit contribution connections can be ordered. +""" +enum CommitContributionOrderField { + """ + Order commit contributions by how many commits they represent. + """ + COMMIT_COUNT + + """ + Order commit contributions by when they were made. + """ + OCCURRED_AT +} + +""" +This aggregates commits made by a user within one repository. +""" +type CommitContributionsByRepository { + """ + The commit contributions, each representing a day. + """ + contributions( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for commit contributions returned from the connection. + """ + orderBy: CommitContributionOrder = {field: OCCURRED_AT, direction: DESC} + ): CreatedCommitContributionConnection! + + """ + The repository in which the commits were made. + """ + repository: Repository! + + """ + The HTTP path for the user's commits to the repository in this time range. + """ + resourcePath: URI! + + """ + The HTTP URL for the user's commits to the repository in this time range. + """ + url: URI! +} + +""" +An edge in a connection. +""" +type CommitEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Commit +} + +""" +The connection type for Commit. +""" +type CommitHistoryConnection { + """ + A list of edges. + """ + edges: [CommitEdge] + + """ + A list of nodes. + """ + nodes: [Commit] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +Represents a 'connected' event on a given issue or pull request. +""" +type ConnectedEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! + + """ + Reference originated in a different repository. + """ + isCrossRepository: Boolean! + + """ + Issue or pull request that made the reference. + """ + source: ReferencedSubject! + + """ + Issue or pull request which was connected. + """ + subject: ReferencedSubject! +} + +""" +A content attachment +""" +type ContentAttachment { + """ + The body text of the content attachment. This parameter supports markdown. + """ + body: String! + + """ + The content reference that the content attachment is attached to. + """ + contentReference: ContentReference! + + """ + Identifies the primary key from the database. + """ + databaseId: Int! + id: ID! + + """ + The title of the content attachment. + """ + title: String! +} + +""" +A content reference +""" +type ContentReference { + """ + Identifies the primary key from the database. + """ + databaseId: Int! + id: ID! + + """ + The reference of the content reference. + """ + reference: String! +} + +""" +Represents a contribution a user made on GitHub, such as opening an issue. +""" +interface Contribution { + """ + Whether this contribution is associated with a record you do not have access to. For + example, your own 'first issue' contribution may have been made on a repository you can no + longer access. + """ + isRestricted: Boolean! + + """ + When this contribution was made. + """ + occurredAt: DateTime! + + """ + The HTTP path for this contribution. + """ + resourcePath: URI! + + """ + The HTTP URL for this contribution. + """ + url: URI! + + """ + The user who made this contribution. + """ + user: User! +} + +""" +A calendar of contributions made on GitHub by a user. +""" +type ContributionCalendar { + """ + A list of hex color codes used in this calendar. The darker the color, the more contributions it represents. + """ + colors: [String!]! + + """ + Determine if the color set was chosen because it's currently Halloween. + """ + isHalloween: Boolean! + + """ + A list of the months of contributions in this calendar. + """ + months: [ContributionCalendarMonth!]! + + """ + The count of total contributions in the calendar. + """ + totalContributions: Int! + + """ + A list of the weeks of contributions in this calendar. + """ + weeks: [ContributionCalendarWeek!]! +} + +""" +Represents a single day of contributions on GitHub by a user. +""" +type ContributionCalendarDay { + """ + The hex color code that represents how many contributions were made on this day compared to others in the calendar. + """ + color: String! + + """ + How many contributions were made by the user on this day. + """ + contributionCount: Int! + + """ + Indication of contributions, relative to other days. Can be used to indicate + which color to represent this day on a calendar. + """ + contributionLevel: ContributionLevel! + + """ + The day this square represents. + """ + date: Date! + + """ + A number representing which day of the week this square represents, e.g., 1 is Monday. + """ + weekday: Int! +} + +""" +A month of contributions in a user's contribution graph. +""" +type ContributionCalendarMonth { + """ + The date of the first day of this month. + """ + firstDay: Date! + + """ + The name of the month. + """ + name: String! + + """ + How many weeks started in this month. + """ + totalWeeks: Int! + + """ + The year the month occurred in. + """ + year: Int! +} + +""" +A week of contributions in a user's contribution graph. +""" +type ContributionCalendarWeek { + """ + The days of contributions in this week. + """ + contributionDays: [ContributionCalendarDay!]! + + """ + The date of the earliest square in this week. + """ + firstDay: Date! +} + +""" +Varying levels of contributions from none to many. +""" +enum ContributionLevel { + """ + Lowest 25% of days of contributions. + """ + FIRST_QUARTILE + + """ + Highest 25% of days of contributions. More contributions than the third quartile. + """ + FOURTH_QUARTILE + + """ + No contributions occurred. + """ + NONE + + """ + Second lowest 25% of days of contributions. More contributions than the first quartile. + """ + SECOND_QUARTILE + + """ + Second highest 25% of days of contributions. More contributions than second quartile, less than the fourth quartile. + """ + THIRD_QUARTILE +} + +""" +Ordering options for contribution connections. +""" +input ContributionOrder { + """ + The ordering direction. + """ + direction: OrderDirection! +} + +""" +A contributions collection aggregates contributions such as opened issues and commits created by a user. +""" +type ContributionsCollection { + """ + Commit contributions made by the user, grouped by repository. + """ + commitContributionsByRepository( + """ + How many repositories should be included. + """ + maxRepositories: Int = 25 + ): [CommitContributionsByRepository!]! + + """ + A calendar of this user's contributions on GitHub. + """ + contributionCalendar: ContributionCalendar! + + """ + The years the user has been making contributions with the most recent year first. + """ + contributionYears: [Int!]! + + """ + Determine if this collection's time span ends in the current month. + """ + doesEndInCurrentMonth: Boolean! + + """ + The date of the first restricted contribution the user made in this time + period. Can only be non-null when the user has enabled private contribution counts. + """ + earliestRestrictedContributionDate: Date + + """ + The ending date and time of this collection. + """ + endedAt: DateTime! + + """ + The first issue the user opened on GitHub. This will be null if that issue was + opened outside the collection's time range and ignoreTimeRange is false. If + the issue is not visible but the user has opted to show private contributions, + a RestrictedContribution will be returned. + """ + firstIssueContribution: CreatedIssueOrRestrictedContribution + + """ + The first pull request the user opened on GitHub. This will be null if that + pull request was opened outside the collection's time range and + ignoreTimeRange is not true. If the pull request is not visible but the user + has opted to show private contributions, a RestrictedContribution will be returned. + """ + firstPullRequestContribution: CreatedPullRequestOrRestrictedContribution + + """ + The first repository the user created on GitHub. This will be null if that + first repository was created outside the collection's time range and + ignoreTimeRange is false. If the repository is not visible, then a + RestrictedContribution is returned. + """ + firstRepositoryContribution: CreatedRepositoryOrRestrictedContribution + + """ + Does the user have any more activity in the timeline that occurred prior to the collection's time range? + """ + hasActivityInThePast: Boolean! + + """ + Determine if there are any contributions in this collection. + """ + hasAnyContributions: Boolean! + + """ + Determine if the user made any contributions in this time frame whose details + are not visible because they were made in a private repository. Can only be + true if the user enabled private contribution counts. + """ + hasAnyRestrictedContributions: Boolean! + + """ + Whether or not the collector's time span is all within the same day. + """ + isSingleDay: Boolean! + + """ + A list of issues the user opened. + """ + issueContributions( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Should the user's first issue ever be excluded from the result. + """ + excludeFirst: Boolean = false + + """ + Should the user's most commented issue be excluded from the result. + """ + excludePopular: Boolean = false + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for contributions returned from the connection. + """ + orderBy: ContributionOrder = {direction: DESC} + ): CreatedIssueContributionConnection! + + """ + Issue contributions made by the user, grouped by repository. + """ + issueContributionsByRepository( + """ + Should the user's first issue ever be excluded from the result. + """ + excludeFirst: Boolean = false + + """ + Should the user's most commented issue be excluded from the result. + """ + excludePopular: Boolean = false + + """ + How many repositories should be included. + """ + maxRepositories: Int = 25 + ): [IssueContributionsByRepository!]! + + """ + When the user signed up for GitHub. This will be null if that sign up date + falls outside the collection's time range and ignoreTimeRange is false. + """ + joinedGitHubContribution: JoinedGitHubContribution + + """ + The date of the most recent restricted contribution the user made in this time + period. Can only be non-null when the user has enabled private contribution counts. + """ + latestRestrictedContributionDate: Date + + """ + When this collection's time range does not include any activity from the user, use this + to get a different collection from an earlier time range that does have activity. + """ + mostRecentCollectionWithActivity: ContributionsCollection + + """ + Returns a different contributions collection from an earlier time range than this one + that does not have any contributions. + """ + mostRecentCollectionWithoutActivity: ContributionsCollection + + """ + The issue the user opened on GitHub that received the most comments in the specified + time frame. + """ + popularIssueContribution: CreatedIssueContribution + + """ + The pull request the user opened on GitHub that received the most comments in the + specified time frame. + """ + popularPullRequestContribution: CreatedPullRequestContribution + + """ + Pull request contributions made by the user. + """ + pullRequestContributions( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Should the user's first pull request ever be excluded from the result. + """ + excludeFirst: Boolean = false + + """ + Should the user's most commented pull request be excluded from the result. + """ + excludePopular: Boolean = false + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for contributions returned from the connection. + """ + orderBy: ContributionOrder = {direction: DESC} + ): CreatedPullRequestContributionConnection! + + """ + Pull request contributions made by the user, grouped by repository. + """ + pullRequestContributionsByRepository( + """ + Should the user's first pull request ever be excluded from the result. + """ + excludeFirst: Boolean = false + + """ + Should the user's most commented pull request be excluded from the result. + """ + excludePopular: Boolean = false + + """ + How many repositories should be included. + """ + maxRepositories: Int = 25 + ): [PullRequestContributionsByRepository!]! + + """ + Pull request review contributions made by the user. + """ + pullRequestReviewContributions( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for contributions returned from the connection. + """ + orderBy: ContributionOrder = {direction: DESC} + ): CreatedPullRequestReviewContributionConnection! + + """ + Pull request review contributions made by the user, grouped by repository. + """ + pullRequestReviewContributionsByRepository( + """ + How many repositories should be included. + """ + maxRepositories: Int = 25 + ): [PullRequestReviewContributionsByRepository!]! + + """ + A list of repositories owned by the user that the user created in this time range. + """ + repositoryContributions( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Should the user's first repository ever be excluded from the result. + """ + excludeFirst: Boolean = false + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for contributions returned from the connection. + """ + orderBy: ContributionOrder = {direction: DESC} + ): CreatedRepositoryContributionConnection! + + """ + A count of contributions made by the user that the viewer cannot access. Only + non-zero when the user has chosen to share their private contribution counts. + """ + restrictedContributionsCount: Int! + + """ + The beginning date and time of this collection. + """ + startedAt: DateTime! + + """ + How many commits were made by the user in this time span. + """ + totalCommitContributions: Int! + + """ + How many issues the user opened. + """ + totalIssueContributions( + """ + Should the user's first issue ever be excluded from this count. + """ + excludeFirst: Boolean = false + + """ + Should the user's most commented issue be excluded from this count. + """ + excludePopular: Boolean = false + ): Int! + + """ + How many pull requests the user opened. + """ + totalPullRequestContributions( + """ + Should the user's first pull request ever be excluded from this count. + """ + excludeFirst: Boolean = false + + """ + Should the user's most commented pull request be excluded from this count. + """ + excludePopular: Boolean = false + ): Int! + + """ + How many pull request reviews the user left. + """ + totalPullRequestReviewContributions: Int! + + """ + How many different repositories the user committed to. + """ + totalRepositoriesWithContributedCommits: Int! + + """ + How many different repositories the user opened issues in. + """ + totalRepositoriesWithContributedIssues( + """ + Should the user's first issue ever be excluded from this count. + """ + excludeFirst: Boolean = false + + """ + Should the user's most commented issue be excluded from this count. + """ + excludePopular: Boolean = false + ): Int! + + """ + How many different repositories the user left pull request reviews in. + """ + totalRepositoriesWithContributedPullRequestReviews: Int! + + """ + How many different repositories the user opened pull requests in. + """ + totalRepositoriesWithContributedPullRequests( + """ + Should the user's first pull request ever be excluded from this count. + """ + excludeFirst: Boolean = false + + """ + Should the user's most commented pull request be excluded from this count. + """ + excludePopular: Boolean = false + ): Int! + + """ + How many repositories the user created. + """ + totalRepositoryContributions( + """ + Should the user's first repository ever be excluded from this count. + """ + excludeFirst: Boolean = false + ): Int! + + """ + The user who made the contributions in this collection. + """ + user: User! +} + +""" +Autogenerated input type of ConvertProjectCardNoteToIssue +""" +input ConvertProjectCardNoteToIssueInput { + """ + The body of the newly created issue. + """ + body: String + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ProjectCard ID to convert. + """ + projectCardId: ID! @possibleTypes(concreteTypes: ["ProjectCard"]) + + """ + The ID of the repository to create the issue in. + """ + repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) + + """ + The title of the newly created issue. Defaults to the card's note text. + """ + title: String +} + +""" +Autogenerated return type of ConvertProjectCardNoteToIssue +""" +type ConvertProjectCardNoteToIssuePayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The updated ProjectCard. + """ + projectCard: ProjectCard +} + +""" +Represents a 'convert_to_draft' event on a given pull request. +""" +type ConvertToDraftEvent implements Node & UniformResourceLocatable { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! + + """ + PullRequest referenced by event. + """ + pullRequest: PullRequest! + + """ + The HTTP path for this convert to draft event. + """ + resourcePath: URI! + + """ + The HTTP URL for this convert to draft event. + """ + url: URI! +} + +""" +Represents a 'converted_note_to_issue' event on a given issue or pull request. +""" +type ConvertedNoteToIssueEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + id: ID! + + """ + Project referenced by event. + """ + project: Project @preview(toggledBy: "starfox-preview") + + """ + Project card referenced by this project event. + """ + projectCard: ProjectCard @preview(toggledBy: "starfox-preview") + + """ + Column name referenced by this project event. + """ + projectColumnName: String! @preview(toggledBy: "starfox-preview") +} + +""" +Autogenerated input type of CreateBranchProtectionRule +""" +input CreateBranchProtectionRuleInput { + """ + Can this branch be deleted. + """ + allowsDeletions: Boolean + + """ + Are force pushes allowed on this branch. + """ + allowsForcePushes: Boolean + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + Will new commits pushed to matching branches dismiss pull request review approvals. + """ + dismissesStaleReviews: Boolean + + """ + Can admins overwrite branch protection. + """ + isAdminEnforced: Boolean + + """ + The glob-like pattern used to determine matching branches. + """ + pattern: String! + + """ + A list of User, Team or App IDs allowed to push to matching branches. + """ + pushActorIds: [ID!] + + """ + The global relay id of the repository in which a new branch protection rule should be created in. + """ + repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) + + """ + Number of approving reviews required to update matching branches. + """ + requiredApprovingReviewCount: Int + + """ + List of required status check contexts that must pass for commits to be accepted to matching branches. + """ + requiredStatusCheckContexts: [String!] + + """ + Are approving reviews required to update matching branches. + """ + requiresApprovingReviews: Boolean + + """ + Are reviews from code owners required to update matching branches. + """ + requiresCodeOwnerReviews: Boolean + + """ + Are commits required to be signed. + """ + requiresCommitSignatures: Boolean + + """ + Are merge commits prohibited from being pushed to this branch. + """ + requiresLinearHistory: Boolean + + """ + Are status checks required to update matching branches. + """ + requiresStatusChecks: Boolean + + """ + Are branches required to be up to date before merging. + """ + requiresStrictStatusChecks: Boolean + + """ + Is pushing to matching branches restricted. + """ + restrictsPushes: Boolean + + """ + Is dismissal of pull request reviews restricted. + """ + restrictsReviewDismissals: Boolean + + """ + A list of User or Team IDs allowed to dismiss reviews on pull requests targeting matching branches. + """ + reviewDismissalActorIds: [ID!] +} + +""" +Autogenerated return type of CreateBranchProtectionRule +""" +type CreateBranchProtectionRulePayload { + """ + The newly created BranchProtectionRule. + """ + branchProtectionRule: BranchProtectionRule + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String +} + +""" +Autogenerated input type of CreateCheckRun +""" +input CreateCheckRunInput { + """ + Possible further actions the integrator can perform, which a user may trigger. + """ + actions: [CheckRunAction!] + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The time that the check run finished. + """ + completedAt: DateTime + + """ + The final conclusion of the check. + """ + conclusion: CheckConclusionState + + """ + The URL of the integrator's site that has the full details of the check. + """ + detailsUrl: URI + + """ + A reference for the run on the integrator's system. + """ + externalId: String + + """ + The SHA of the head commit. + """ + headSha: GitObjectID! + + """ + The name of the check. + """ + name: String! + + """ + Descriptive details about the run. + """ + output: CheckRunOutput + + """ + The node ID of the repository. + """ + repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) + + """ + The time that the check run began. + """ + startedAt: DateTime + + """ + The current status. + """ + status: RequestableCheckStatusState +} + +""" +Autogenerated return type of CreateCheckRun +""" +type CreateCheckRunPayload { + """ + The newly created check run. + """ + checkRun: CheckRun + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String +} + +""" +Autogenerated input type of CreateCheckSuite +""" +input CreateCheckSuiteInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The SHA of the head commit. + """ + headSha: GitObjectID! + + """ + The Node ID of the repository. + """ + repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) +} + +""" +Autogenerated return type of CreateCheckSuite +""" +type CreateCheckSuitePayload { + """ + The newly created check suite. + """ + checkSuite: CheckSuite + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String +} + +""" +Autogenerated input type of CreateContentAttachment +""" +input CreateContentAttachmentInput { + """ + The body of the content attachment, which may contain markdown. + """ + body: String! + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The node ID of the content_reference. + """ + contentReferenceId: ID! @possibleTypes(concreteTypes: ["ContentReference"]) + + """ + The title of the content attachment. + """ + title: String! +} + +""" +Autogenerated return type of CreateContentAttachment +""" +type CreateContentAttachmentPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The newly created content attachment. + """ + contentAttachment: ContentAttachment +} + +""" +Autogenerated input type of CreateDeployment +""" +input CreateDeploymentInput @preview(toggledBy: "flash-preview") { + """ + Attempt to automatically merge the default branch into the requested ref, defaults to true. + """ + autoMerge: Boolean = true + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + Short description of the deployment. + """ + description: String = "" + + """ + Name for the target deployment environment. + """ + environment: String = "production" + + """ + JSON payload with extra information about the deployment. + """ + payload: String = "{}" + + """ + The node ID of the ref to be deployed. + """ + refId: ID! @possibleTypes(concreteTypes: ["Ref"]) + + """ + The node ID of the repository. + """ + repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) + + """ + The status contexts to verify against commit status checks. To bypass required + contexts, pass an empty array. Defaults to all unique contexts. + """ + requiredContexts: [String!] + + """ + Specifies a task to execute. + """ + task: String = "deploy" +} + +""" +Autogenerated return type of CreateDeployment +""" +type CreateDeploymentPayload @preview(toggledBy: "flash-preview") { + """ + True if the default branch has been auto-merged into the deployment ref. + """ + autoMerged: Boolean + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The new deployment. + """ + deployment: Deployment +} + +""" +Autogenerated input type of CreateDeploymentStatus +""" +input CreateDeploymentStatusInput @preview(toggledBy: "flash-preview") { + """ + Adds a new inactive status to all non-transient, non-production environment + deployments with the same repository and environment name as the created + status's deployment. + """ + autoInactive: Boolean = true + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The node ID of the deployment. + """ + deploymentId: ID! @possibleTypes(concreteTypes: ["Deployment"]) + + """ + A short description of the status. Maximum length of 140 characters. + """ + description: String = "" + + """ + If provided, updates the environment of the deploy. Otherwise, does not modify the environment. + """ + environment: String + + """ + Sets the URL for accessing your environment. + """ + environmentUrl: String = "" + + """ + The log URL to associate with this status. This URL should contain + output to keep the user updated while the task is running or serve as + historical information for what happened in the deployment. + """ + logUrl: String = "" + + """ + The state of the deployment. + """ + state: DeploymentStatusState! +} + +""" +Autogenerated return type of CreateDeploymentStatus +""" +type CreateDeploymentStatusPayload @preview(toggledBy: "flash-preview") { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The new deployment status. + """ + deploymentStatus: DeploymentStatus +} + +""" +Autogenerated input type of CreateEnterpriseOrganization +""" +input CreateEnterpriseOrganizationInput { + """ + The logins for the administrators of the new organization. + """ + adminLogins: [String!]! + + """ + The email used for sending billing receipts. + """ + billingEmail: String! + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the enterprise owning the new organization. + """ + enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) + + """ + The login of the new organization. + """ + login: String! + + """ + The profile name of the new organization. + """ + profileName: String! +} + +""" +Autogenerated return type of CreateEnterpriseOrganization +""" +type CreateEnterpriseOrganizationPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The enterprise that owns the created organization. + """ + enterprise: Enterprise + + """ + The organization that was created. + """ + organization: Organization +} + +""" +Autogenerated input type of CreateIpAllowListEntry +""" +input CreateIpAllowListEntryInput { + """ + An IP address or range of addresses in CIDR notation. + """ + allowListValue: String! + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + Whether the IP allow list entry is active when an IP allow list is enabled. + """ + isActive: Boolean! + + """ + An optional name for the IP allow list entry. + """ + name: String + + """ + The ID of the owner for which to create the new IP allow list entry. + """ + ownerId: ID! @possibleTypes(concreteTypes: ["Enterprise", "Organization"], abstractType: "IpAllowListOwner") +} + +""" +Autogenerated return type of CreateIpAllowListEntry +""" +type CreateIpAllowListEntryPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The IP allow list entry that was created. + """ + ipAllowListEntry: IpAllowListEntry +} + +""" +Autogenerated input type of CreateIssue +""" +input CreateIssueInput { + """ + The Node ID for the user assignee for this issue. + """ + assigneeIds: [ID!] @possibleTypes(concreteTypes: ["User"]) + + """ + The body for the issue description. + """ + body: String + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The name of an issue template in the repository, assigns labels and assignees from the template to the issue + """ + issueTemplate: String + + """ + An array of Node IDs of labels for this issue. + """ + labelIds: [ID!] @possibleTypes(concreteTypes: ["Label"]) + + """ + The Node ID of the milestone for this issue. + """ + milestoneId: ID @possibleTypes(concreteTypes: ["Milestone"]) + + """ + An array of Node IDs for projects associated with this issue. + """ + projectIds: [ID!] @possibleTypes(concreteTypes: ["Project"]) + + """ + The Node ID of the repository. + """ + repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) + + """ + The title for the issue. + """ + title: String! +} + +""" +Autogenerated return type of CreateIssue +""" +type CreateIssuePayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The new issue. + """ + issue: Issue +} + +""" +Autogenerated input type of CreateLabel +""" +input CreateLabelInput @preview(toggledBy: "bane-preview") { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + A 6 character hex code, without the leading #, identifying the color of the label. + """ + color: String! + + """ + A brief description of the label, such as its purpose. + """ + description: String + + """ + The name of the label. + """ + name: String! + + """ + The Node ID of the repository. + """ + repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) +} + +""" +Autogenerated return type of CreateLabel +""" +type CreateLabelPayload @preview(toggledBy: "bane-preview") { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The new label. + """ + label: Label +} + +""" +Autogenerated input type of CreateProject +""" +input CreateProjectInput { + """ + The description of project. + """ + body: String + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The name of project. + """ + name: String! + + """ + The owner ID to create the project under. + """ + ownerId: ID! @possibleTypes(concreteTypes: ["Organization", "Repository", "User"], abstractType: "ProjectOwner") + + """ + A list of repository IDs to create as linked repositories for the project + """ + repositoryIds: [ID!] @possibleTypes(concreteTypes: ["Repository"]) + + """ + The name of the GitHub-provided template. + """ + template: ProjectTemplate +} + +""" +Autogenerated return type of CreateProject +""" +type CreateProjectPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The new project. + """ + project: Project +} + +""" +Autogenerated input type of CreatePullRequest +""" +input CreatePullRequestInput { + """ + The name of the branch you want your changes pulled into. This should be an existing branch + on the current repository. You cannot update the base branch on a pull request to point + to another repository. + """ + baseRefName: String! + + """ + The contents of the pull request. + """ + body: String + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + Indicates whether this pull request should be a draft. + """ + draft: Boolean = false + + """ + The name of the branch where your changes are implemented. For cross-repository pull requests + in the same network, namespace `head_ref_name` with a user like this: `username:branch`. + """ + headRefName: String! + + """ + Indicates whether maintainers can modify the pull request. + """ + maintainerCanModify: Boolean = true + + """ + The Node ID of the repository. + """ + repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) + + """ + The title of the pull request. + """ + title: String! +} + +""" +Autogenerated return type of CreatePullRequest +""" +type CreatePullRequestPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The new pull request. + """ + pullRequest: PullRequest +} + +""" +Autogenerated input type of CreateRef +""" +input CreateRefInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The fully qualified name of the new Ref (ie: `refs/heads/my_new_branch`). + """ + name: String! + + """ + The GitObjectID that the new Ref shall target. Must point to a commit. + """ + oid: GitObjectID! + + """ + The Node ID of the Repository to create the Ref in. + """ + repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) +} + +""" +Autogenerated return type of CreateRef +""" +type CreateRefPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The newly created ref. + """ + ref: Ref +} + +""" +Autogenerated input type of CreateRepository +""" +input CreateRepositoryInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + A short description of the new repository. + """ + description: String + + """ + Indicates if the repository should have the issues feature enabled. + """ + hasIssuesEnabled: Boolean = true + + """ + Indicates if the repository should have the wiki feature enabled. + """ + hasWikiEnabled: Boolean = false + + """ + The URL for a web page about this repository. + """ + homepageUrl: URI + + """ + The name of the new repository. + """ + name: String! + + """ + The ID of the owner for the new repository. + """ + ownerId: ID @possibleTypes(concreteTypes: ["Organization", "User"], abstractType: "RepositoryOwner") + + """ + When an organization is specified as the owner, this ID identifies the team + that should be granted access to the new repository. + """ + teamId: ID @possibleTypes(concreteTypes: ["Team"]) + + """ + Whether this repository should be marked as a template such that anyone who + can access it can create new repositories with the same files and directory structure. + """ + template: Boolean = false + + """ + Indicates the repository's visibility level. + """ + visibility: RepositoryVisibility! +} + +""" +Autogenerated return type of CreateRepository +""" +type CreateRepositoryPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The new repository. + """ + repository: Repository +} + +""" +Autogenerated input type of CreateTeamDiscussionComment +""" +input CreateTeamDiscussionCommentInput { + """ + The content of the comment. + """ + body: String! + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the discussion to which the comment belongs. + """ + discussionId: ID! @possibleTypes(concreteTypes: ["TeamDiscussion"]) +} + +""" +Autogenerated return type of CreateTeamDiscussionComment +""" +type CreateTeamDiscussionCommentPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The new comment. + """ + teamDiscussionComment: TeamDiscussionComment +} + +""" +Autogenerated input type of CreateTeamDiscussion +""" +input CreateTeamDiscussionInput { + """ + The content of the discussion. + """ + body: String! + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + If true, restricts the visibility of this discussion to team members and + organization admins. If false or not specified, allows any organization member + to view this discussion. + """ + private: Boolean + + """ + The ID of the team to which the discussion belongs. + """ + teamId: ID! @possibleTypes(concreteTypes: ["Team"]) + + """ + The title of the discussion. + """ + title: String! +} + +""" +Autogenerated return type of CreateTeamDiscussion +""" +type CreateTeamDiscussionPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The new discussion. + """ + teamDiscussion: TeamDiscussion +} + +""" +Represents the contribution a user made by committing to a repository. +""" +type CreatedCommitContribution implements Contribution { + """ + How many commits were made on this day to this repository by the user. + """ + commitCount: Int! + + """ + Whether this contribution is associated with a record you do not have access to. For + example, your own 'first issue' contribution may have been made on a repository you can no + longer access. + """ + isRestricted: Boolean! + + """ + When this contribution was made. + """ + occurredAt: DateTime! + + """ + The repository the user made a commit in. + """ + repository: Repository! + + """ + The HTTP path for this contribution. + """ + resourcePath: URI! + + """ + The HTTP URL for this contribution. + """ + url: URI! + + """ + The user who made this contribution. + """ + user: User! +} + +""" +The connection type for CreatedCommitContribution. +""" +type CreatedCommitContributionConnection { + """ + A list of edges. + """ + edges: [CreatedCommitContributionEdge] + + """ + A list of nodes. + """ + nodes: [CreatedCommitContribution] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of commits across days and repositories in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type CreatedCommitContributionEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: CreatedCommitContribution +} + +""" +Represents the contribution a user made on GitHub by opening an issue. +""" +type CreatedIssueContribution implements Contribution { + """ + Whether this contribution is associated with a record you do not have access to. For + example, your own 'first issue' contribution may have been made on a repository you can no + longer access. + """ + isRestricted: Boolean! + + """ + The issue that was opened. + """ + issue: Issue! + + """ + When this contribution was made. + """ + occurredAt: DateTime! + + """ + The HTTP path for this contribution. + """ + resourcePath: URI! + + """ + The HTTP URL for this contribution. + """ + url: URI! + + """ + The user who made this contribution. + """ + user: User! +} + +""" +The connection type for CreatedIssueContribution. +""" +type CreatedIssueContributionConnection { + """ + A list of edges. + """ + edges: [CreatedIssueContributionEdge] + + """ + A list of nodes. + """ + nodes: [CreatedIssueContribution] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type CreatedIssueContributionEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: CreatedIssueContribution +} + +""" +Represents either a issue the viewer can access or a restricted contribution. +""" +union CreatedIssueOrRestrictedContribution = CreatedIssueContribution | RestrictedContribution + +""" +Represents the contribution a user made on GitHub by opening a pull request. +""" +type CreatedPullRequestContribution implements Contribution { + """ + Whether this contribution is associated with a record you do not have access to. For + example, your own 'first issue' contribution may have been made on a repository you can no + longer access. + """ + isRestricted: Boolean! + + """ + When this contribution was made. + """ + occurredAt: DateTime! + + """ + The pull request that was opened. + """ + pullRequest: PullRequest! + + """ + The HTTP path for this contribution. + """ + resourcePath: URI! + + """ + The HTTP URL for this contribution. + """ + url: URI! + + """ + The user who made this contribution. + """ + user: User! +} + +""" +The connection type for CreatedPullRequestContribution. +""" +type CreatedPullRequestContributionConnection { + """ + A list of edges. + """ + edges: [CreatedPullRequestContributionEdge] + + """ + A list of nodes. + """ + nodes: [CreatedPullRequestContribution] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type CreatedPullRequestContributionEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: CreatedPullRequestContribution +} + +""" +Represents either a pull request the viewer can access or a restricted contribution. +""" +union CreatedPullRequestOrRestrictedContribution = CreatedPullRequestContribution | RestrictedContribution + +""" +Represents the contribution a user made by leaving a review on a pull request. +""" +type CreatedPullRequestReviewContribution implements Contribution { + """ + Whether this contribution is associated with a record you do not have access to. For + example, your own 'first issue' contribution may have been made on a repository you can no + longer access. + """ + isRestricted: Boolean! + + """ + When this contribution was made. + """ + occurredAt: DateTime! + + """ + The pull request the user reviewed. + """ + pullRequest: PullRequest! + + """ + The review the user left on the pull request. + """ + pullRequestReview: PullRequestReview! + + """ + The repository containing the pull request that the user reviewed. + """ + repository: Repository! + + """ + The HTTP path for this contribution. + """ + resourcePath: URI! + + """ + The HTTP URL for this contribution. + """ + url: URI! + + """ + The user who made this contribution. + """ + user: User! +} + +""" +The connection type for CreatedPullRequestReviewContribution. +""" +type CreatedPullRequestReviewContributionConnection { + """ + A list of edges. + """ + edges: [CreatedPullRequestReviewContributionEdge] + + """ + A list of nodes. + """ + nodes: [CreatedPullRequestReviewContribution] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type CreatedPullRequestReviewContributionEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: CreatedPullRequestReviewContribution +} + +""" +Represents the contribution a user made on GitHub by creating a repository. +""" +type CreatedRepositoryContribution implements Contribution { + """ + Whether this contribution is associated with a record you do not have access to. For + example, your own 'first issue' contribution may have been made on a repository you can no + longer access. + """ + isRestricted: Boolean! + + """ + When this contribution was made. + """ + occurredAt: DateTime! + + """ + The repository that was created. + """ + repository: Repository! + + """ + The HTTP path for this contribution. + """ + resourcePath: URI! + + """ + The HTTP URL for this contribution. + """ + url: URI! + + """ + The user who made this contribution. + """ + user: User! +} + +""" +The connection type for CreatedRepositoryContribution. +""" +type CreatedRepositoryContributionConnection { + """ + A list of edges. + """ + edges: [CreatedRepositoryContributionEdge] + + """ + A list of nodes. + """ + nodes: [CreatedRepositoryContribution] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type CreatedRepositoryContributionEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: CreatedRepositoryContribution +} + +""" +Represents either a repository the viewer can access or a restricted contribution. +""" +union CreatedRepositoryOrRestrictedContribution = CreatedRepositoryContribution | RestrictedContribution + +""" +Represents a mention made by one issue or pull request to another. +""" +type CrossReferencedEvent implements Node & UniformResourceLocatable { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! + + """ + Reference originated in a different repository. + """ + isCrossRepository: Boolean! + + """ + Identifies when the reference was made. + """ + referencedAt: DateTime! + + """ + The HTTP path for this pull request. + """ + resourcePath: URI! + + """ + Issue or pull request that made the reference. + """ + source: ReferencedSubject! + + """ + Issue or pull request to which the reference was made. + """ + target: ReferencedSubject! + + """ + The HTTP URL for this pull request. + """ + url: URI! + + """ + Checks if the target will be closed when the source is merged. + """ + willCloseTarget: Boolean! +} + +""" +An ISO-8601 encoded date string. +""" +scalar Date + +""" +An ISO-8601 encoded UTC date string. +""" +scalar DateTime + +""" +Autogenerated input type of DeclineTopicSuggestion +""" +input DeclineTopicSuggestionInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The name of the suggested topic. + """ + name: String! + + """ + The reason why the suggested topic is declined. + """ + reason: TopicSuggestionDeclineReason! + + """ + The Node ID of the repository. + """ + repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) +} + +""" +Autogenerated return type of DeclineTopicSuggestion +""" +type DeclineTopicSuggestionPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The declined topic. + """ + topic: Topic +} + +""" +The possible default permissions for repositories. +""" +enum DefaultRepositoryPermissionField { + """ + Can read, write, and administrate repos by default + """ + ADMIN + + """ + No access + """ + NONE + + """ + Can read repos by default + """ + READ + + """ + Can read and write repos by default + """ + WRITE +} + +""" +Entities that can be deleted. +""" +interface Deletable { + """ + Check if the current viewer can delete this object. + """ + viewerCanDelete: Boolean! +} + +""" +Autogenerated input type of DeleteBranchProtectionRule +""" +input DeleteBranchProtectionRuleInput { + """ + The global relay id of the branch protection rule to be deleted. + """ + branchProtectionRuleId: ID! @possibleTypes(concreteTypes: ["BranchProtectionRule"]) + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String +} + +""" +Autogenerated return type of DeleteBranchProtectionRule +""" +type DeleteBranchProtectionRulePayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String +} + +""" +Autogenerated input type of DeleteDeployment +""" +input DeleteDeploymentInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The Node ID of the deployment to be deleted. + """ + id: ID! @possibleTypes(concreteTypes: ["Deployment"]) +} + +""" +Autogenerated return type of DeleteDeployment +""" +type DeleteDeploymentPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String +} + +""" +Autogenerated input type of DeleteIpAllowListEntry +""" +input DeleteIpAllowListEntryInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the IP allow list entry to delete. + """ + ipAllowListEntryId: ID! @possibleTypes(concreteTypes: ["IpAllowListEntry"]) +} + +""" +Autogenerated return type of DeleteIpAllowListEntry +""" +type DeleteIpAllowListEntryPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The IP allow list entry that was deleted. + """ + ipAllowListEntry: IpAllowListEntry +} + +""" +Autogenerated input type of DeleteIssueComment +""" +input DeleteIssueCommentInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the comment to delete. + """ + id: ID! @possibleTypes(concreteTypes: ["IssueComment"]) +} + +""" +Autogenerated return type of DeleteIssueComment +""" +type DeleteIssueCommentPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String +} + +""" +Autogenerated input type of DeleteIssue +""" +input DeleteIssueInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the issue to delete. + """ + issueId: ID! @possibleTypes(concreteTypes: ["Issue"]) +} + +""" +Autogenerated return type of DeleteIssue +""" +type DeleteIssuePayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The repository the issue belonged to + """ + repository: Repository +} + +""" +Autogenerated input type of DeleteLabel +""" +input DeleteLabelInput @preview(toggledBy: "bane-preview") { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The Node ID of the label to be deleted. + """ + id: ID! @possibleTypes(concreteTypes: ["Label"]) +} + +""" +Autogenerated return type of DeleteLabel +""" +type DeleteLabelPayload @preview(toggledBy: "bane-preview") { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String +} + +""" +Autogenerated input type of DeletePackageVersion +""" +input DeletePackageVersionInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the package version to be deleted. + """ + packageVersionId: ID! @possibleTypes(concreteTypes: ["PackageVersion"]) +} + +""" +Autogenerated return type of DeletePackageVersion +""" +type DeletePackageVersionPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + Whether or not the operation succeeded. + """ + success: Boolean +} + +""" +Autogenerated input type of DeleteProjectCard +""" +input DeleteProjectCardInput { + """ + The id of the card to delete. + """ + cardId: ID! @possibleTypes(concreteTypes: ["ProjectCard"]) + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String +} + +""" +Autogenerated return type of DeleteProjectCard +""" +type DeleteProjectCardPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The column the deleted card was in. + """ + column: ProjectColumn + + """ + The deleted card ID. + """ + deletedCardId: ID +} + +""" +Autogenerated input type of DeleteProjectColumn +""" +input DeleteProjectColumnInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The id of the column to delete. + """ + columnId: ID! @possibleTypes(concreteTypes: ["ProjectColumn"]) +} + +""" +Autogenerated return type of DeleteProjectColumn +""" +type DeleteProjectColumnPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The deleted column ID. + """ + deletedColumnId: ID + + """ + The project the deleted column was in. + """ + project: Project +} + +""" +Autogenerated input type of DeleteProject +""" +input DeleteProjectInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The Project ID to update. + """ + projectId: ID! @possibleTypes(concreteTypes: ["Project"]) +} + +""" +Autogenerated return type of DeleteProject +""" +type DeleteProjectPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The repository or organization the project was removed from. + """ + owner: ProjectOwner +} + +""" +Autogenerated input type of DeletePullRequestReviewComment +""" +input DeletePullRequestReviewCommentInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the comment to delete. + """ + id: ID! @possibleTypes(concreteTypes: ["PullRequestReviewComment"]) +} + +""" +Autogenerated return type of DeletePullRequestReviewComment +""" +type DeletePullRequestReviewCommentPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The pull request review the deleted comment belonged to. + """ + pullRequestReview: PullRequestReview +} + +""" +Autogenerated input type of DeletePullRequestReview +""" +input DeletePullRequestReviewInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The Node ID of the pull request review to delete. + """ + pullRequestReviewId: ID! @possibleTypes(concreteTypes: ["PullRequestReview"]) +} + +""" +Autogenerated return type of DeletePullRequestReview +""" +type DeletePullRequestReviewPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The deleted pull request review. + """ + pullRequestReview: PullRequestReview +} + +""" +Autogenerated input type of DeleteRef +""" +input DeleteRefInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The Node ID of the Ref to be deleted. + """ + refId: ID! @possibleTypes(concreteTypes: ["Ref"]) +} + +""" +Autogenerated return type of DeleteRef +""" +type DeleteRefPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String +} + +""" +Autogenerated input type of DeleteTeamDiscussionComment +""" +input DeleteTeamDiscussionCommentInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the comment to delete. + """ + id: ID! @possibleTypes(concreteTypes: ["TeamDiscussionComment"]) +} + +""" +Autogenerated return type of DeleteTeamDiscussionComment +""" +type DeleteTeamDiscussionCommentPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String +} + +""" +Autogenerated input type of DeleteTeamDiscussion +""" +input DeleteTeamDiscussionInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The discussion ID to delete. + """ + id: ID! @possibleTypes(concreteTypes: ["TeamDiscussion"]) +} + +""" +Autogenerated return type of DeleteTeamDiscussion +""" +type DeleteTeamDiscussionPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String +} + +""" +Autogenerated input type of DeleteVerifiableDomain +""" +input DeleteVerifiableDomainInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the verifiable domain to delete. + """ + id: ID! @possibleTypes(concreteTypes: ["VerifiableDomain"]) +} + +""" +Autogenerated return type of DeleteVerifiableDomain +""" +type DeleteVerifiableDomainPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The owning account from which the domain was deleted. + """ + owner: VerifiableDomainOwner +} + +""" +Represents a 'demilestoned' event on a given issue or pull request. +""" +type DemilestonedEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! + + """ + Identifies the milestone title associated with the 'demilestoned' event. + """ + milestoneTitle: String! + + """ + Object referenced by event. + """ + subject: MilestoneItem! +} + +""" +A dependency manifest entry +""" +type DependencyGraphDependency @preview(toggledBy: "hawkgirl-preview") { + """ + Does the dependency itself have dependencies? + """ + hasDependencies: Boolean! + + """ + The dependency package manager + """ + packageManager: String + + """ + The required package name + """ + packageName: String! + + """ + The repository containing the package + """ + repository: Repository + + """ + The dependency version requirements + """ + requirements: String! +} + +""" +The connection type for DependencyGraphDependency. +""" +type DependencyGraphDependencyConnection @preview(toggledBy: "hawkgirl-preview") { + """ + A list of edges. + """ + edges: [DependencyGraphDependencyEdge] + + """ + A list of nodes. + """ + nodes: [DependencyGraphDependency] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type DependencyGraphDependencyEdge @preview(toggledBy: "hawkgirl-preview") { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: DependencyGraphDependency +} + +""" +Dependency manifest for a repository +""" +type DependencyGraphManifest implements Node @preview(toggledBy: "hawkgirl-preview") { + """ + Path to view the manifest file blob + """ + blobPath: String! + + """ + A list of manifest dependencies + """ + dependencies( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): DependencyGraphDependencyConnection + + """ + The number of dependencies listed in the manifest + """ + dependenciesCount: Int + + """ + Is the manifest too big to parse? + """ + exceedsMaxSize: Boolean! + + """ + Fully qualified manifest filename + """ + filename: String! + id: ID! + + """ + Were we able to parse the manifest? + """ + parseable: Boolean! + + """ + The repository containing the manifest + """ + repository: Repository! +} + +""" +The connection type for DependencyGraphManifest. +""" +type DependencyGraphManifestConnection @preview(toggledBy: "hawkgirl-preview") { + """ + A list of edges. + """ + edges: [DependencyGraphManifestEdge] + + """ + A list of nodes. + """ + nodes: [DependencyGraphManifest] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type DependencyGraphManifestEdge @preview(toggledBy: "hawkgirl-preview") { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: DependencyGraphManifest +} + +""" +A repository deploy key. +""" +type DeployKey implements Node { + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! + + """ + The deploy key. + """ + key: String! + + """ + Whether or not the deploy key is read only. + """ + readOnly: Boolean! + + """ + The deploy key title. + """ + title: String! + + """ + Whether or not the deploy key has been verified. + """ + verified: Boolean! +} + +""" +The connection type for DeployKey. +""" +type DeployKeyConnection { + """ + A list of edges. + """ + edges: [DeployKeyEdge] + + """ + A list of nodes. + """ + nodes: [DeployKey] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type DeployKeyEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: DeployKey +} + +""" +Represents a 'deployed' event on a given pull request. +""" +type DeployedEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + + """ + The deployment associated with the 'deployed' event. + """ + deployment: Deployment! + id: ID! + + """ + PullRequest referenced by event. + """ + pullRequest: PullRequest! + + """ + The ref associated with the 'deployed' event. + """ + ref: Ref +} + +""" +Represents triggered deployment instance. +""" +type Deployment implements Node { + """ + Identifies the commit sha of the deployment. + """ + commit: Commit + + """ + Identifies the oid of the deployment commit, even if the commit has been deleted. + """ + commitOid: String! + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Identifies the actor who triggered the deployment. + """ + creator: Actor! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + + """ + The deployment description. + """ + description: String + + """ + The latest environment to which this deployment was made. + """ + environment: String + id: ID! + + """ + The latest environment to which this deployment was made. + """ + latestEnvironment: String + + """ + The latest status of this deployment. + """ + latestStatus: DeploymentStatus + + """ + The original environment to which this deployment was made. + """ + originalEnvironment: String + + """ + Extra information that a deployment system might need. + """ + payload: String + + """ + Identifies the Ref of the deployment, if the deployment was created by ref. + """ + ref: Ref + + """ + Identifies the repository associated with the deployment. + """ + repository: Repository! + + """ + The current state of the deployment. + """ + state: DeploymentState + + """ + A list of statuses associated with the deployment. + """ + statuses( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): DeploymentStatusConnection + + """ + The deployment task. + """ + task: String + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! +} + +""" +The connection type for Deployment. +""" +type DeploymentConnection { + """ + A list of edges. + """ + edges: [DeploymentEdge] + + """ + A list of nodes. + """ + nodes: [Deployment] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type DeploymentEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Deployment +} + +""" +Represents a 'deployment_environment_changed' event on a given pull request. +""" +type DeploymentEnvironmentChangedEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + The deployment status that updated the deployment environment. + """ + deploymentStatus: DeploymentStatus! + id: ID! + + """ + PullRequest referenced by event. + """ + pullRequest: PullRequest! +} + +""" +Ordering options for deployment connections +""" +input DeploymentOrder { + """ + The ordering direction. + """ + direction: OrderDirection! + + """ + The field to order deployments by. + """ + field: DeploymentOrderField! +} + +""" +Properties by which deployment connections can be ordered. +""" +enum DeploymentOrderField { + """ + Order collection by creation time + """ + CREATED_AT +} + +""" +The possible states in which a deployment can be. +""" +enum DeploymentState { + """ + The pending deployment was not updated after 30 minutes. + """ + ABANDONED + + """ + The deployment is currently active. + """ + ACTIVE + + """ + An inactive transient deployment. + """ + DESTROYED + + """ + The deployment experienced an error. + """ + ERROR + + """ + The deployment has failed. + """ + FAILURE + + """ + The deployment is inactive. + """ + INACTIVE + + """ + The deployment is in progress. + """ + IN_PROGRESS + + """ + The deployment is pending. + """ + PENDING + + """ + The deployment has queued + """ + QUEUED + + """ + The deployment is waiting. + """ + WAITING +} + +""" +Describes the status of a given deployment attempt. +""" +type DeploymentStatus implements Node { + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Identifies the actor who triggered the deployment. + """ + creator: Actor! + + """ + Identifies the deployment associated with status. + """ + deployment: Deployment! + + """ + Identifies the description of the deployment. + """ + description: String + + """ + Identifies the environment of the deployment at the time of this deployment status + """ + environment: String @preview(toggledBy: "flash-preview") + + """ + Identifies the environment URL of the deployment. + """ + environmentUrl: URI + id: ID! + + """ + Identifies the log URL of the deployment. + """ + logUrl: URI + + """ + Identifies the current state of the deployment. + """ + state: DeploymentStatusState! + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! +} + +""" +The connection type for DeploymentStatus. +""" +type DeploymentStatusConnection { + """ + A list of edges. + """ + edges: [DeploymentStatusEdge] + + """ + A list of nodes. + """ + nodes: [DeploymentStatus] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type DeploymentStatusEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: DeploymentStatus +} + +""" +The possible states for a deployment status. +""" +enum DeploymentStatusState { + """ + The deployment experienced an error. + """ + ERROR + + """ + The deployment has failed. + """ + FAILURE + + """ + The deployment is inactive. + """ + INACTIVE + + """ + The deployment is in progress. + """ + IN_PROGRESS + + """ + The deployment is pending. + """ + PENDING + + """ + The deployment is queued + """ + QUEUED + + """ + The deployment was successful. + """ + SUCCESS + + """ + The deployment is waiting. + """ + WAITING +} + +""" +The possible sides of a diff. +""" +enum DiffSide { + """ + The left side of the diff. + """ + LEFT + + """ + The right side of the diff. + """ + RIGHT +} + +""" +Autogenerated input type of DisablePullRequestAutoMerge +""" +input DisablePullRequestAutoMergeInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + ID of the pull request to disable auto merge on. + """ + pullRequestId: ID! @possibleTypes(concreteTypes: ["PullRequest"]) +} + +""" +Autogenerated return type of DisablePullRequestAutoMerge +""" +type DisablePullRequestAutoMergePayload { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The pull request auto merge was disabled on. + """ + pullRequest: PullRequest +} + +""" +Represents a 'disconnected' event on a given issue or pull request. +""" +type DisconnectedEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! + + """ + Reference originated in a different repository. + """ + isCrossRepository: Boolean! + + """ + Issue or pull request from which the issue was disconnected. + """ + source: ReferencedSubject! + + """ + Issue or pull request which was disconnected. + """ + subject: ReferencedSubject! +} + +""" +Autogenerated input type of DismissPullRequestReview +""" +input DismissPullRequestReviewInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The contents of the pull request review dismissal message. + """ + message: String! + + """ + The Node ID of the pull request review to modify. + """ + pullRequestReviewId: ID! @possibleTypes(concreteTypes: ["PullRequestReview"]) +} + +""" +Autogenerated return type of DismissPullRequestReview +""" +type DismissPullRequestReviewPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The dismissed pull request review. + """ + pullRequestReview: PullRequestReview +} + +""" +Specifies a review comment to be left with a Pull Request Review. +""" +input DraftPullRequestReviewComment { + """ + Body of the comment to leave. + """ + body: String! + + """ + Path to the file being commented on. + """ + path: String! + + """ + Position in the file to leave a comment on. + """ + position: Int! +} + +""" +Specifies a review comment thread to be left with a Pull Request Review. +""" +input DraftPullRequestReviewThread { + """ + Body of the comment to leave. + """ + body: String! + + """ + The line of the blob to which the thread refers. The end of the line range for multi-line comments. + """ + line: Int! + + """ + Path to the file being commented on. + """ + path: String! + + """ + The side of the diff on which the line resides. For multi-line comments, this is the side for the end of the line range. + """ + side: DiffSide = RIGHT + + """ + The first line of the range to which the comment refers. + """ + startLine: Int + + """ + The side of the diff on which the start line resides. + """ + startSide: DiffSide = RIGHT +} + +""" +Autogenerated input type of EnablePullRequestAutoMerge +""" +input EnablePullRequestAutoMergeInput { + """ + The email address to associate with this merge. + """ + authorEmail: String + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + Commit body to use for the commit when the PR is mergable; if omitted, a default message will be used. + """ + commitBody: String + + """ + Commit headline to use for the commit when the PR is mergable; if omitted, a default message will be used. + """ + commitHeadline: String + + """ + The merge method to use. If omitted, defaults to 'MERGE' + """ + mergeMethod: PullRequestMergeMethod = MERGE + + """ + ID of the pull request to enable auto-merge on. + """ + pullRequestId: ID! @possibleTypes(concreteTypes: ["PullRequest"]) +} + +""" +Autogenerated return type of EnablePullRequestAutoMerge +""" +type EnablePullRequestAutoMergePayload { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The pull request auto-merge was enabled on. + """ + pullRequest: PullRequest +} + +""" +An account to manage multiple organizations with consolidated policy and billing. +""" +type Enterprise implements Node { + """ + A URL pointing to the enterprise's public avatar. + """ + avatarUrl( + """ + The size of the resulting square image. + """ + size: Int + ): URI! + + """ + Enterprise billing information visible to enterprise billing managers. + """ + billingInfo: EnterpriseBillingInfo + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + + """ + The description of the enterprise. + """ + description: String + + """ + The description of the enterprise as HTML. + """ + descriptionHTML: HTML! + id: ID! + + """ + The location of the enterprise. + """ + location: String + + """ + A list of users who are members of this enterprise. + """ + members( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Only return members within the selected GitHub Enterprise deployment + """ + deployment: EnterpriseUserDeployment + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for members returned from the connection. + """ + orderBy: EnterpriseMemberOrder = {field: LOGIN, direction: ASC} + + """ + Only return members within the organizations with these logins + """ + organizationLogins: [String!] + + """ + The search string to look for. + """ + query: String + + """ + The role of the user in the enterprise organization or server. + """ + role: EnterpriseUserAccountMembershipRole + ): EnterpriseMemberConnection! + + """ + The name of the enterprise. + """ + name: String! + + """ + A list of organizations that belong to this enterprise. + """ + organizations( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for organizations returned from the connection. + """ + orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} + + """ + The search string to look for. + """ + query: String + ): OrganizationConnection! + + """ + Enterprise information only visible to enterprise owners. + """ + ownerInfo: EnterpriseOwnerInfo + + """ + The HTTP path for this enterprise. + """ + resourcePath: URI! + + """ + The URL-friendly identifier for the enterprise. + """ + slug: String! + + """ + The HTTP URL for this enterprise. + """ + url: URI! + + """ + A list of user accounts on this enterprise. + """ + userAccounts( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): EnterpriseUserAccountConnection! + + """ + Is the current viewer an admin of this enterprise? + """ + viewerIsAdmin: Boolean! + + """ + The URL of the enterprise website. + """ + websiteUrl: URI +} + +""" +The connection type for User. +""" +type EnterpriseAdministratorConnection { + """ + A list of edges. + """ + edges: [EnterpriseAdministratorEdge] + + """ + A list of nodes. + """ + nodes: [User] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +A User who is an administrator of an enterprise. +""" +type EnterpriseAdministratorEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: User + + """ + The role of the administrator. + """ + role: EnterpriseAdministratorRole! +} + +""" +An invitation for a user to become an owner or billing manager of an enterprise. +""" +type EnterpriseAdministratorInvitation implements Node { + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + The email of the person who was invited to the enterprise. + """ + email: String + + """ + The enterprise the invitation is for. + """ + enterprise: Enterprise! + id: ID! + + """ + The user who was invited to the enterprise. + """ + invitee: User + + """ + The user who created the invitation. + """ + inviter: User + + """ + The invitee's pending role in the enterprise (owner or billing_manager). + """ + role: EnterpriseAdministratorRole! +} + +""" +The connection type for EnterpriseAdministratorInvitation. +""" +type EnterpriseAdministratorInvitationConnection { + """ + A list of edges. + """ + edges: [EnterpriseAdministratorInvitationEdge] + + """ + A list of nodes. + """ + nodes: [EnterpriseAdministratorInvitation] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type EnterpriseAdministratorInvitationEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: EnterpriseAdministratorInvitation +} + +""" +Ordering options for enterprise administrator invitation connections +""" +input EnterpriseAdministratorInvitationOrder { + """ + The ordering direction. + """ + direction: OrderDirection! + + """ + The field to order enterprise administrator invitations by. + """ + field: EnterpriseAdministratorInvitationOrderField! +} + +""" +Properties by which enterprise administrator invitation connections can be ordered. +""" +enum EnterpriseAdministratorInvitationOrderField { + """ + Order enterprise administrator member invitations by creation time + """ + CREATED_AT +} + +""" +The possible administrator roles in an enterprise account. +""" +enum EnterpriseAdministratorRole { + """ + Represents a billing manager of the enterprise account. + """ + BILLING_MANAGER + + """ + Represents an owner of the enterprise account. + """ + OWNER +} + +""" +Metadata for an audit entry containing enterprise account information. +""" +interface EnterpriseAuditEntryData { + """ + The HTTP path for this enterprise. + """ + enterpriseResourcePath: URI + + """ + The slug of the enterprise. + """ + enterpriseSlug: String + + """ + The HTTP URL for this enterprise. + """ + enterpriseUrl: URI +} + +""" +Enterprise billing information visible to enterprise billing managers and owners. +""" +type EnterpriseBillingInfo { + """ + The number of licenseable users/emails across the enterprise. + """ + allLicensableUsersCount: Int! + + """ + The number of data packs used by all organizations owned by the enterprise. + """ + assetPacks: Int! + + """ + The number of available seats across all owned organizations based on the unique number of billable users. + """ + availableSeats: Int! @deprecated(reason: "`availableSeats` will be replaced with `totalAvailableLicenses` to provide more clarity on the value being returned Use EnterpriseBillingInfo.totalAvailableLicenses instead. Removal on 2020-01-01 UTC.") + + """ + The bandwidth quota in GB for all organizations owned by the enterprise. + """ + bandwidthQuota: Float! + + """ + The bandwidth usage in GB for all organizations owned by the enterprise. + """ + bandwidthUsage: Float! + + """ + The bandwidth usage as a percentage of the bandwidth quota. + """ + bandwidthUsagePercentage: Int! + + """ + The total seats across all organizations owned by the enterprise. + """ + seats: Int! @deprecated(reason: "`seats` will be replaced with `totalLicenses` to provide more clarity on the value being returned Use EnterpriseBillingInfo.totalLicenses instead. Removal on 2020-01-01 UTC.") + + """ + The storage quota in GB for all organizations owned by the enterprise. + """ + storageQuota: Float! + + """ + The storage usage in GB for all organizations owned by the enterprise. + """ + storageUsage: Float! + + """ + The storage usage as a percentage of the storage quota. + """ + storageUsagePercentage: Int! + + """ + The number of available licenses across all owned organizations based on the unique number of billable users. + """ + totalAvailableLicenses: Int! + + """ + The total number of licenses allocated. + """ + totalLicenses: Int! +} + +""" +The possible values for the enterprise default repository permission setting. +""" +enum EnterpriseDefaultRepositoryPermissionSettingValue { + """ + Organization members will be able to clone, pull, push, and add new collaborators to all organization repositories. + """ + ADMIN + + """ + Organization members will only be able to clone and pull public repositories. + """ + NONE + + """ + Organizations in the enterprise choose default repository permissions for their members. + """ + NO_POLICY + + """ + Organization members will be able to clone and pull all organization repositories. + """ + READ + + """ + Organization members will be able to clone, pull, and push all organization repositories. + """ + WRITE +} + +""" +The possible values for an enabled/disabled enterprise setting. +""" +enum EnterpriseEnabledDisabledSettingValue { + """ + The setting is disabled for organizations in the enterprise. + """ + DISABLED + + """ + The setting is enabled for organizations in the enterprise. + """ + ENABLED + + """ + There is no policy set for organizations in the enterprise. + """ + NO_POLICY +} + +""" +The possible values for an enabled/no policy enterprise setting. +""" +enum EnterpriseEnabledSettingValue { + """ + The setting is enabled for organizations in the enterprise. + """ + ENABLED + + """ + There is no policy set for organizations in the enterprise. + """ + NO_POLICY +} + +""" +An identity provider configured to provision identities for an enterprise. +""" +type EnterpriseIdentityProvider implements Node { + """ + The digest algorithm used to sign SAML requests for the identity provider. + """ + digestMethod: SamlDigestAlgorithm + + """ + The enterprise this identity provider belongs to. + """ + enterprise: Enterprise + + """ + ExternalIdentities provisioned by this identity provider. + """ + externalIdentities( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): ExternalIdentityConnection! + id: ID! + + """ + The x509 certificate used by the identity provider to sign assertions and responses. + """ + idpCertificate: X509Certificate + + """ + The Issuer Entity ID for the SAML identity provider. + """ + issuer: String + + """ + Recovery codes that can be used by admins to access the enterprise if the identity provider is unavailable. + """ + recoveryCodes: [String!] + + """ + The signature algorithm used to sign SAML requests for the identity provider. + """ + signatureMethod: SamlSignatureAlgorithm + + """ + The URL endpoint for the identity provider's SAML SSO. + """ + ssoUrl: URI +} + +""" +An object that is a member of an enterprise. +""" +union EnterpriseMember = EnterpriseUserAccount | User + +""" +The connection type for EnterpriseMember. +""" +type EnterpriseMemberConnection { + """ + A list of edges. + """ + edges: [EnterpriseMemberEdge] + + """ + A list of nodes. + """ + nodes: [EnterpriseMember] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +A User who is a member of an enterprise through one or more organizations. +""" +type EnterpriseMemberEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + Whether the user does not have a license for the enterprise. + """ + isUnlicensed: Boolean! @deprecated(reason: "All members consume a license Removal on 2021-01-01 UTC.") + + """ + The item at the end of the edge. + """ + node: EnterpriseMember +} + +""" +Ordering options for enterprise member connections. +""" +input EnterpriseMemberOrder { + """ + The ordering direction. + """ + direction: OrderDirection! + + """ + The field to order enterprise members by. + """ + field: EnterpriseMemberOrderField! +} + +""" +Properties by which enterprise member connections can be ordered. +""" +enum EnterpriseMemberOrderField { + """ + Order enterprise members by creation time + """ + CREATED_AT + + """ + Order enterprise members by login + """ + LOGIN +} + +""" +The possible values for the enterprise members can create repositories setting. +""" +enum EnterpriseMembersCanCreateRepositoriesSettingValue { + """ + Members will be able to create public and private repositories. + """ + ALL + + """ + Members will not be able to create public or private repositories. + """ + DISABLED + + """ + Organization administrators choose whether to allow members to create repositories. + """ + NO_POLICY + + """ + Members will be able to create only private repositories. + """ + PRIVATE + + """ + Members will be able to create only public repositories. + """ + PUBLIC +} + +""" +The possible values for the members can make purchases setting. +""" +enum EnterpriseMembersCanMakePurchasesSettingValue { + """ + The setting is disabled for organizations in the enterprise. + """ + DISABLED + + """ + The setting is enabled for organizations in the enterprise. + """ + ENABLED +} + +""" +The connection type for Organization. +""" +type EnterpriseOrganizationMembershipConnection { + """ + A list of edges. + """ + edges: [EnterpriseOrganizationMembershipEdge] + + """ + A list of nodes. + """ + nodes: [Organization] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An enterprise organization that a user is a member of. +""" +type EnterpriseOrganizationMembershipEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Organization + + """ + The role of the user in the enterprise membership. + """ + role: EnterpriseUserAccountMembershipRole! +} + +""" +The connection type for User. +""" +type EnterpriseOutsideCollaboratorConnection { + """ + A list of edges. + """ + edges: [EnterpriseOutsideCollaboratorEdge] + + """ + A list of nodes. + """ + nodes: [User] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +A User who is an outside collaborator of an enterprise through one or more organizations. +""" +type EnterpriseOutsideCollaboratorEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + Whether the outside collaborator does not have a license for the enterprise. + """ + isUnlicensed: Boolean! @deprecated(reason: "All outside collaborators consume a license Removal on 2021-01-01 UTC.") + + """ + The item at the end of the edge. + """ + node: User + + """ + The enterprise organization repositories this user is a member of. + """ + repositories( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for repositories. + """ + orderBy: RepositoryOrder = {field: NAME, direction: ASC} + ): EnterpriseRepositoryInfoConnection! +} + +""" +Enterprise information only visible to enterprise owners. +""" +type EnterpriseOwnerInfo { + """ + A list of all of the administrators for this enterprise. + """ + admins( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for administrators returned from the connection. + """ + orderBy: EnterpriseMemberOrder = {field: LOGIN, direction: ASC} + + """ + The search string to look for. + """ + query: String + + """ + The role to filter by. + """ + role: EnterpriseAdministratorRole + ): EnterpriseAdministratorConnection! + + """ + A list of users in the enterprise who currently have two-factor authentication disabled. + """ + affiliatedUsersWithTwoFactorDisabled( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): UserConnection! + + """ + Whether or not affiliated users with two-factor authentication disabled exist in the enterprise. + """ + affiliatedUsersWithTwoFactorDisabledExist: Boolean! + + """ + The setting value for whether private repository forking is enabled for repositories in organizations in this enterprise. + """ + allowPrivateRepositoryForkingSetting: EnterpriseEnabledDisabledSettingValue! + + """ + A list of enterprise organizations configured with the provided private repository forking setting value. + """ + allowPrivateRepositoryForkingSettingOrganizations( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for organizations with this setting. + """ + orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} + + """ + The setting value to find organizations for. + """ + value: Boolean! + ): OrganizationConnection! + + """ + The setting value for base repository permissions for organizations in this enterprise. + """ + defaultRepositoryPermissionSetting: EnterpriseDefaultRepositoryPermissionSettingValue! + + """ + A list of enterprise organizations configured with the provided default repository permission. + """ + defaultRepositoryPermissionSettingOrganizations( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for organizations with this setting. + """ + orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} + + """ + The permission to find organizations for. + """ + value: DefaultRepositoryPermissionField! + ): OrganizationConnection! + + """ + A list of domains owned by the enterprise. + """ + domains( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Filter whether or not the domain is verified. + """ + isVerified: Boolean = null + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for verifiable domains returned. + """ + orderBy: VerifiableDomainOrder = {field: DOMAIN, direction: ASC} + ): VerifiableDomainConnection! + + """ + Enterprise Server installations owned by the enterprise. + """ + enterpriseServerInstallations( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Whether or not to only return installations discovered via GitHub Connect. + """ + connectedOnly: Boolean = false + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for Enterprise Server installations returned. + """ + orderBy: EnterpriseServerInstallationOrder = {field: HOST_NAME, direction: ASC} + ): EnterpriseServerInstallationConnection! + + """ + The setting value for whether the enterprise has an IP allow list enabled. + """ + ipAllowListEnabledSetting: IpAllowListEnabledSettingValue! + + """ + The IP addresses that are allowed to access resources owned by the enterprise. + """ + ipAllowListEntries( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for IP allow list entries returned. + """ + orderBy: IpAllowListEntryOrder = {field: ALLOW_LIST_VALUE, direction: ASC} + ): IpAllowListEntryConnection! + + """ + Whether or not the default repository permission is currently being updated. + """ + isUpdatingDefaultRepositoryPermission: Boolean! + + """ + Whether the two-factor authentication requirement is currently being enforced. + """ + isUpdatingTwoFactorRequirement: Boolean! + + """ + The setting value for whether organization members with admin permissions on a + repository can change repository visibility. + """ + membersCanChangeRepositoryVisibilitySetting: EnterpriseEnabledDisabledSettingValue! + + """ + A list of enterprise organizations configured with the provided can change repository visibility setting value. + """ + membersCanChangeRepositoryVisibilitySettingOrganizations( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for organizations with this setting. + """ + orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} + + """ + The setting value to find organizations for. + """ + value: Boolean! + ): OrganizationConnection! + + """ + The setting value for whether members of organizations in the enterprise can create internal repositories. + """ + membersCanCreateInternalRepositoriesSetting: Boolean + + """ + The setting value for whether members of organizations in the enterprise can create private repositories. + """ + membersCanCreatePrivateRepositoriesSetting: Boolean + + """ + The setting value for whether members of organizations in the enterprise can create public repositories. + """ + membersCanCreatePublicRepositoriesSetting: Boolean + + """ + The setting value for whether members of organizations in the enterprise can create repositories. + """ + membersCanCreateRepositoriesSetting: EnterpriseMembersCanCreateRepositoriesSettingValue + + """ + A list of enterprise organizations configured with the provided repository creation setting value. + """ + membersCanCreateRepositoriesSettingOrganizations( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for organizations with this setting. + """ + orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} + + """ + The setting to find organizations for. + """ + value: OrganizationMembersCanCreateRepositoriesSettingValue! + ): OrganizationConnection! + + """ + The setting value for whether members with admin permissions for repositories can delete issues. + """ + membersCanDeleteIssuesSetting: EnterpriseEnabledDisabledSettingValue! + + """ + A list of enterprise organizations configured with the provided members can delete issues setting value. + """ + membersCanDeleteIssuesSettingOrganizations( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for organizations with this setting. + """ + orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} + + """ + The setting value to find organizations for. + """ + value: Boolean! + ): OrganizationConnection! + + """ + The setting value for whether members with admin permissions for repositories can delete or transfer repositories. + """ + membersCanDeleteRepositoriesSetting: EnterpriseEnabledDisabledSettingValue! + + """ + A list of enterprise organizations configured with the provided members can delete repositories setting value. + """ + membersCanDeleteRepositoriesSettingOrganizations( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for organizations with this setting. + """ + orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} + + """ + The setting value to find organizations for. + """ + value: Boolean! + ): OrganizationConnection! + + """ + The setting value for whether members of organizations in the enterprise can invite outside collaborators. + """ + membersCanInviteCollaboratorsSetting: EnterpriseEnabledDisabledSettingValue! + + """ + A list of enterprise organizations configured with the provided members can invite collaborators setting value. + """ + membersCanInviteCollaboratorsSettingOrganizations( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for organizations with this setting. + """ + orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} + + """ + The setting value to find organizations for. + """ + value: Boolean! + ): OrganizationConnection! + + """ + Indicates whether members of this enterprise's organizations can purchase additional services for those organizations. + """ + membersCanMakePurchasesSetting: EnterpriseMembersCanMakePurchasesSettingValue! + + """ + The setting value for whether members with admin permissions for repositories can update protected branches. + """ + membersCanUpdateProtectedBranchesSetting: EnterpriseEnabledDisabledSettingValue! + + """ + A list of enterprise organizations configured with the provided members can update protected branches setting value. + """ + membersCanUpdateProtectedBranchesSettingOrganizations( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for organizations with this setting. + """ + orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} + + """ + The setting value to find organizations for. + """ + value: Boolean! + ): OrganizationConnection! + + """ + The setting value for whether members can view dependency insights. + """ + membersCanViewDependencyInsightsSetting: EnterpriseEnabledDisabledSettingValue! + + """ + A list of enterprise organizations configured with the provided members can view dependency insights setting value. + """ + membersCanViewDependencyInsightsSettingOrganizations( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for organizations with this setting. + """ + orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} + + """ + The setting value to find organizations for. + """ + value: Boolean! + ): OrganizationConnection! + + """ + Indicates if email notification delivery for this enterprise is restricted to verified domains. + """ + notificationDeliveryRestrictionEnabledSetting: NotificationRestrictionSettingValue! + + """ + The setting value for whether organization projects are enabled for organizations in this enterprise. + """ + organizationProjectsSetting: EnterpriseEnabledDisabledSettingValue! + + """ + A list of enterprise organizations configured with the provided organization projects setting value. + """ + organizationProjectsSettingOrganizations( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for organizations with this setting. + """ + orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} + + """ + The setting value to find organizations for. + """ + value: Boolean! + ): OrganizationConnection! + + """ + A list of outside collaborators across the repositories in the enterprise. + """ + outsideCollaborators( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + The login of one specific outside collaborator. + """ + login: String + + """ + Ordering options for outside collaborators returned from the connection. + """ + orderBy: EnterpriseMemberOrder = {field: LOGIN, direction: ASC} + + """ + The search string to look for. + """ + query: String + + """ + Only return outside collaborators on repositories with this visibility. + """ + visibility: RepositoryVisibility + ): EnterpriseOutsideCollaboratorConnection! + + """ + A list of pending administrator invitations for the enterprise. + """ + pendingAdminInvitations( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for pending enterprise administrator invitations returned from the connection. + """ + orderBy: EnterpriseAdministratorInvitationOrder = {field: CREATED_AT, direction: DESC} + + """ + The search string to look for. + """ + query: String + + """ + The role to filter by. + """ + role: EnterpriseAdministratorRole + ): EnterpriseAdministratorInvitationConnection! + + """ + A list of pending collaborator invitations across the repositories in the enterprise. + """ + pendingCollaboratorInvitations( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for pending repository collaborator invitations returned from the connection. + """ + orderBy: RepositoryInvitationOrder = {field: CREATED_AT, direction: DESC} + + """ + The search string to look for. + """ + query: String + ): RepositoryInvitationConnection! + + """ + A list of pending collaborators across the repositories in the enterprise. + """ + pendingCollaborators( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for pending repository collaborator invitations returned from the connection. + """ + orderBy: RepositoryInvitationOrder = {field: CREATED_AT, direction: DESC} + + """ + The search string to look for. + """ + query: String + ): EnterprisePendingCollaboratorConnection! @deprecated(reason: "Repository invitations can now be associated with an email, not only an invitee. Use the `pendingCollaboratorInvitations` field instead. Removal on 2020-10-01 UTC.") + + """ + A list of pending member invitations for organizations in the enterprise. + """ + pendingMemberInvitations( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + The search string to look for. + """ + query: String + ): EnterprisePendingMemberInvitationConnection! + + """ + The setting value for whether repository projects are enabled in this enterprise. + """ + repositoryProjectsSetting: EnterpriseEnabledDisabledSettingValue! + + """ + A list of enterprise organizations configured with the provided repository projects setting value. + """ + repositoryProjectsSettingOrganizations( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for organizations with this setting. + """ + orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} + + """ + The setting value to find organizations for. + """ + value: Boolean! + ): OrganizationConnection! + + """ + The SAML Identity Provider for the enterprise. + """ + samlIdentityProvider: EnterpriseIdentityProvider + + """ + A list of enterprise organizations configured with the SAML single sign-on setting value. + """ + samlIdentityProviderSettingOrganizations( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for organizations with this setting. + """ + orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} + + """ + The setting value to find organizations for. + """ + value: IdentityProviderConfigurationState! + ): OrganizationConnection! + + """ + A list of members with a support entitlement. + """ + supportEntitlements( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for support entitlement users returned from the connection. + """ + orderBy: EnterpriseMemberOrder = {field: LOGIN, direction: ASC} + ): EnterpriseMemberConnection! + + """ + The setting value for whether team discussions are enabled for organizations in this enterprise. + """ + teamDiscussionsSetting: EnterpriseEnabledDisabledSettingValue! + + """ + A list of enterprise organizations configured with the provided team discussions setting value. + """ + teamDiscussionsSettingOrganizations( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for organizations with this setting. + """ + orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} + + """ + The setting value to find organizations for. + """ + value: Boolean! + ): OrganizationConnection! + + """ + The setting value for whether the enterprise requires two-factor authentication for its organizations and users. + """ + twoFactorRequiredSetting: EnterpriseEnabledSettingValue! + + """ + A list of enterprise organizations configured with the two-factor authentication setting value. + """ + twoFactorRequiredSettingOrganizations( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for organizations with this setting. + """ + orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} + + """ + The setting value to find organizations for. + """ + value: Boolean! + ): OrganizationConnection! +} + +""" +The connection type for User. +""" +type EnterprisePendingCollaboratorConnection { + """ + A list of edges. + """ + edges: [EnterprisePendingCollaboratorEdge] + + """ + A list of nodes. + """ + nodes: [User] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +A user with an invitation to be a collaborator on a repository owned by an organization in an enterprise. +""" +type EnterprisePendingCollaboratorEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + Whether the invited collaborator does not have a license for the enterprise. + """ + isUnlicensed: Boolean! @deprecated(reason: "All pending collaborators consume a license Removal on 2021-01-01 UTC.") + + """ + The item at the end of the edge. + """ + node: User + + """ + The enterprise organization repositories this user is a member of. + """ + repositories( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for repositories. + """ + orderBy: RepositoryOrder = {field: NAME, direction: ASC} + ): EnterpriseRepositoryInfoConnection! +} + +""" +The connection type for OrganizationInvitation. +""" +type EnterprisePendingMemberInvitationConnection { + """ + A list of edges. + """ + edges: [EnterprisePendingMemberInvitationEdge] + + """ + A list of nodes. + """ + nodes: [OrganizationInvitation] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! + + """ + Identifies the total count of unique users in the connection. + """ + totalUniqueUserCount: Int! +} + +""" +An invitation to be a member in an enterprise organization. +""" +type EnterprisePendingMemberInvitationEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + Whether the invitation has a license for the enterprise. + """ + isUnlicensed: Boolean! @deprecated(reason: "All pending members consume a license Removal on 2020-07-01 UTC.") + + """ + The item at the end of the edge. + """ + node: OrganizationInvitation +} + +""" +A subset of repository information queryable from an enterprise. +""" +type EnterpriseRepositoryInfo implements Node { + id: ID! + + """ + Identifies if the repository is private or internal. + """ + isPrivate: Boolean! + + """ + The repository's name. + """ + name: String! + + """ + The repository's name with owner. + """ + nameWithOwner: String! +} + +""" +The connection type for EnterpriseRepositoryInfo. +""" +type EnterpriseRepositoryInfoConnection { + """ + A list of edges. + """ + edges: [EnterpriseRepositoryInfoEdge] + + """ + A list of nodes. + """ + nodes: [EnterpriseRepositoryInfo] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type EnterpriseRepositoryInfoEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: EnterpriseRepositoryInfo +} + +""" +An Enterprise Server installation. +""" +type EnterpriseServerInstallation implements Node { + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + The customer name to which the Enterprise Server installation belongs. + """ + customerName: String! + + """ + The host name of the Enterprise Server installation. + """ + hostName: String! + id: ID! + + """ + Whether or not the installation is connected to an Enterprise Server installation via GitHub Connect. + """ + isConnected: Boolean! + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! + + """ + User accounts on this Enterprise Server installation. + """ + userAccounts( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for Enterprise Server user accounts returned from the connection. + """ + orderBy: EnterpriseServerUserAccountOrder = {field: LOGIN, direction: ASC} + ): EnterpriseServerUserAccountConnection! + + """ + User accounts uploads for the Enterprise Server installation. + """ + userAccountsUploads( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for Enterprise Server user accounts uploads returned from the connection. + """ + orderBy: EnterpriseServerUserAccountsUploadOrder = {field: CREATED_AT, direction: DESC} + ): EnterpriseServerUserAccountsUploadConnection! +} + +""" +The connection type for EnterpriseServerInstallation. +""" +type EnterpriseServerInstallationConnection { + """ + A list of edges. + """ + edges: [EnterpriseServerInstallationEdge] + + """ + A list of nodes. + """ + nodes: [EnterpriseServerInstallation] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type EnterpriseServerInstallationEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: EnterpriseServerInstallation +} + +""" +Ordering options for Enterprise Server installation connections. +""" +input EnterpriseServerInstallationOrder { + """ + The ordering direction. + """ + direction: OrderDirection! + + """ + The field to order Enterprise Server installations by. + """ + field: EnterpriseServerInstallationOrderField! +} + +""" +Properties by which Enterprise Server installation connections can be ordered. +""" +enum EnterpriseServerInstallationOrderField { + """ + Order Enterprise Server installations by creation time + """ + CREATED_AT + + """ + Order Enterprise Server installations by customer name + """ + CUSTOMER_NAME + + """ + Order Enterprise Server installations by host name + """ + HOST_NAME +} + +""" +A user account on an Enterprise Server installation. +""" +type EnterpriseServerUserAccount implements Node { + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + User emails belonging to this user account. + """ + emails( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for Enterprise Server user account emails returned from the connection. + """ + orderBy: EnterpriseServerUserAccountEmailOrder = {field: EMAIL, direction: ASC} + ): EnterpriseServerUserAccountEmailConnection! + + """ + The Enterprise Server installation on which this user account exists. + """ + enterpriseServerInstallation: EnterpriseServerInstallation! + id: ID! + + """ + Whether the user account is a site administrator on the Enterprise Server installation. + """ + isSiteAdmin: Boolean! + + """ + The login of the user account on the Enterprise Server installation. + """ + login: String! + + """ + The profile name of the user account on the Enterprise Server installation. + """ + profileName: String + + """ + The date and time when the user account was created on the Enterprise Server installation. + """ + remoteCreatedAt: DateTime! + + """ + The ID of the user account on the Enterprise Server installation. + """ + remoteUserId: Int! + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! +} + +""" +The connection type for EnterpriseServerUserAccount. +""" +type EnterpriseServerUserAccountConnection { + """ + A list of edges. + """ + edges: [EnterpriseServerUserAccountEdge] + + """ + A list of nodes. + """ + nodes: [EnterpriseServerUserAccount] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type EnterpriseServerUserAccountEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: EnterpriseServerUserAccount +} + +""" +An email belonging to a user account on an Enterprise Server installation. +""" +type EnterpriseServerUserAccountEmail implements Node { + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + The email address. + """ + email: String! + id: ID! + + """ + Indicates whether this is the primary email of the associated user account. + """ + isPrimary: Boolean! + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! + + """ + The user account to which the email belongs. + """ + userAccount: EnterpriseServerUserAccount! +} + +""" +The connection type for EnterpriseServerUserAccountEmail. +""" +type EnterpriseServerUserAccountEmailConnection { + """ + A list of edges. + """ + edges: [EnterpriseServerUserAccountEmailEdge] + + """ + A list of nodes. + """ + nodes: [EnterpriseServerUserAccountEmail] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type EnterpriseServerUserAccountEmailEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: EnterpriseServerUserAccountEmail +} + +""" +Ordering options for Enterprise Server user account email connections. +""" +input EnterpriseServerUserAccountEmailOrder { + """ + The ordering direction. + """ + direction: OrderDirection! + + """ + The field to order emails by. + """ + field: EnterpriseServerUserAccountEmailOrderField! +} + +""" +Properties by which Enterprise Server user account email connections can be ordered. +""" +enum EnterpriseServerUserAccountEmailOrderField { + """ + Order emails by email + """ + EMAIL +} + +""" +Ordering options for Enterprise Server user account connections. +""" +input EnterpriseServerUserAccountOrder { + """ + The ordering direction. + """ + direction: OrderDirection! + + """ + The field to order user accounts by. + """ + field: EnterpriseServerUserAccountOrderField! +} + +""" +Properties by which Enterprise Server user account connections can be ordered. +""" +enum EnterpriseServerUserAccountOrderField { + """ + Order user accounts by login + """ + LOGIN + + """ + Order user accounts by creation time on the Enterprise Server installation + """ + REMOTE_CREATED_AT +} + +""" +A user accounts upload from an Enterprise Server installation. +""" +type EnterpriseServerUserAccountsUpload implements Node { + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + The enterprise to which this upload belongs. + """ + enterprise: Enterprise! + + """ + The Enterprise Server installation for which this upload was generated. + """ + enterpriseServerInstallation: EnterpriseServerInstallation! + id: ID! + + """ + The name of the file uploaded. + """ + name: String! + + """ + The synchronization state of the upload + """ + syncState: EnterpriseServerUserAccountsUploadSyncState! + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! +} + +""" +The connection type for EnterpriseServerUserAccountsUpload. +""" +type EnterpriseServerUserAccountsUploadConnection { + """ + A list of edges. + """ + edges: [EnterpriseServerUserAccountsUploadEdge] + + """ + A list of nodes. + """ + nodes: [EnterpriseServerUserAccountsUpload] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type EnterpriseServerUserAccountsUploadEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: EnterpriseServerUserAccountsUpload +} + +""" +Ordering options for Enterprise Server user accounts upload connections. +""" +input EnterpriseServerUserAccountsUploadOrder { + """ + The ordering direction. + """ + direction: OrderDirection! + + """ + The field to order user accounts uploads by. + """ + field: EnterpriseServerUserAccountsUploadOrderField! +} + +""" +Properties by which Enterprise Server user accounts upload connections can be ordered. +""" +enum EnterpriseServerUserAccountsUploadOrderField { + """ + Order user accounts uploads by creation time + """ + CREATED_AT +} + +""" +Synchronization state of the Enterprise Server user accounts upload +""" +enum EnterpriseServerUserAccountsUploadSyncState { + """ + The synchronization of the upload failed. + """ + FAILURE + + """ + The synchronization of the upload is pending. + """ + PENDING + + """ + The synchronization of the upload succeeded. + """ + SUCCESS +} + +""" +An account for a user who is an admin of an enterprise or a member of an enterprise through one or more organizations. +""" +type EnterpriseUserAccount implements Actor & Node { + """ + A URL pointing to the enterprise user account's public avatar. + """ + avatarUrl( + """ + The size of the resulting square image. + """ + size: Int + ): URI! + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + The enterprise in which this user account exists. + """ + enterprise: Enterprise! + id: ID! + + """ + An identifier for the enterprise user account, a login or email address + """ + login: String! + + """ + The name of the enterprise user account + """ + name: String + + """ + A list of enterprise organizations this user is a member of. + """ + organizations( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for organizations returned from the connection. + """ + orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} + + """ + The search string to look for. + """ + query: String + + """ + The role of the user in the enterprise organization. + """ + role: EnterpriseUserAccountMembershipRole + ): EnterpriseOrganizationMembershipConnection! + + """ + The HTTP path for this user. + """ + resourcePath: URI! + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! + + """ + The HTTP URL for this user. + """ + url: URI! + + """ + The user within the enterprise. + """ + user: User +} + +""" +The connection type for EnterpriseUserAccount. +""" +type EnterpriseUserAccountConnection { + """ + A list of edges. + """ + edges: [EnterpriseUserAccountEdge] + + """ + A list of nodes. + """ + nodes: [EnterpriseUserAccount] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type EnterpriseUserAccountEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: EnterpriseUserAccount +} + +""" +The possible roles for enterprise membership. +""" +enum EnterpriseUserAccountMembershipRole { + """ + The user is a member of the enterprise membership. + """ + MEMBER + + """ + The user is an owner of the enterprise membership. + """ + OWNER +} + +""" +The possible GitHub Enterprise deployments where this user can exist. +""" +enum EnterpriseUserDeployment { + """ + The user is part of a GitHub Enterprise Cloud deployment. + """ + CLOUD + + """ + The user is part of a GitHub Enterprise Server deployment. + """ + SERVER +} + +""" +An external identity provisioned by SAML SSO or SCIM. +""" +type ExternalIdentity implements Node { + """ + The GUID for this identity + """ + guid: String! + id: ID! + + """ + Organization invitation for this SCIM-provisioned external identity + """ + organizationInvitation: OrganizationInvitation + + """ + SAML Identity attributes + """ + samlIdentity: ExternalIdentitySamlAttributes + + """ + SCIM Identity attributes + """ + scimIdentity: ExternalIdentityScimAttributes + + """ + User linked to this external identity. Will be NULL if this identity has not been claimed by an organization member. + """ + user: User +} + +""" +The connection type for ExternalIdentity. +""" +type ExternalIdentityConnection { + """ + A list of edges. + """ + edges: [ExternalIdentityEdge] + + """ + A list of nodes. + """ + nodes: [ExternalIdentity] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type ExternalIdentityEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: ExternalIdentity +} + +""" +SAML attributes for the External Identity +""" +type ExternalIdentitySamlAttributes { + """ + The emails associated with the SAML identity + """ + emails: [UserEmailMetadata!] + + """ + Family name of the SAML identity + """ + familyName: String + + """ + Given name of the SAML identity + """ + givenName: String + + """ + The groups linked to this identity in IDP + """ + groups: [String!] + + """ + The NameID of the SAML identity + """ + nameId: String + + """ + The userName of the SAML identity + """ + username: String +} + +""" +SCIM attributes for the External Identity +""" +type ExternalIdentityScimAttributes { + """ + The emails associated with the SCIM identity + """ + emails: [UserEmailMetadata!] + + """ + Family name of the SCIM identity + """ + familyName: String + + """ + Given name of the SCIM identity + """ + givenName: String + + """ + The groups linked to this identity in IDP + """ + groups: [String!] + + """ + The userName of the SCIM identity + """ + username: String +} + +""" +The possible viewed states of a file . +""" +enum FileViewedState { + """ + The file has new changes since last viewed. + """ + DISMISSED + + """ + The file has not been marked as viewed. + """ + UNVIEWED + + """ + The file has been marked as viewed. + """ + VIEWED +} + +""" +Autogenerated input type of FollowUser +""" +input FollowUserInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + ID of the user to follow. + """ + userId: ID! @possibleTypes(concreteTypes: ["User"]) +} + +""" +Autogenerated return type of FollowUser +""" +type FollowUserPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The user that was followed. + """ + user: User +} + +""" +The connection type for User. +""" +type FollowerConnection { + """ + A list of edges. + """ + edges: [UserEdge] + + """ + A list of nodes. + """ + nodes: [User] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +The connection type for User. +""" +type FollowingConnection { + """ + A list of edges. + """ + edges: [UserEdge] + + """ + A list of nodes. + """ + nodes: [User] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +A funding platform link for a repository. +""" +type FundingLink { + """ + The funding platform this link is for. + """ + platform: FundingPlatform! + + """ + The configured URL for this funding link. + """ + url: URI! +} + +""" +The possible funding platforms for repository funding links. +""" +enum FundingPlatform { + """ + Community Bridge funding platform. + """ + COMMUNITY_BRIDGE + + """ + Custom funding platform. + """ + CUSTOM + + """ + GitHub funding platform. + """ + GITHUB + + """ + IssueHunt funding platform. + """ + ISSUEHUNT + + """ + Ko-fi funding platform. + """ + KO_FI + + """ + Liberapay funding platform. + """ + LIBERAPAY + + """ + Open Collective funding platform. + """ + OPEN_COLLECTIVE + + """ + Otechie funding platform. + """ + OTECHIE + + """ + Patreon funding platform. + """ + PATREON + + """ + Tidelift funding platform. + """ + TIDELIFT +} + +""" +A generic hovercard context with a message and icon +""" +type GenericHovercardContext implements HovercardContext { + """ + A string describing this context + """ + message: String! + + """ + An octicon to accompany this context + """ + octicon: String! +} + +""" +A Gist. +""" +type Gist implements Node & Starrable & UniformResourceLocatable { + """ + A list of comments associated with the gist + """ + comments( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): GistCommentConnection! + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + The gist description. + """ + description: String + + """ + The files in this gist. + """ + files( + """ + The maximum number of files to return. + """ + limit: Int = 10 + + """ + The oid of the files to return + """ + oid: GitObjectID + ): [GistFile] + + """ + A list of forks associated with the gist + """ + forks( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for gists returned from the connection + """ + orderBy: GistOrder + ): GistConnection! + id: ID! + + """ + Identifies if the gist is a fork. + """ + isFork: Boolean! + + """ + Whether the gist is public or not. + """ + isPublic: Boolean! + + """ + The gist name. + """ + name: String! + + """ + The gist owner. + """ + owner: RepositoryOwner + + """ + Identifies when the gist was last pushed to. + """ + pushedAt: DateTime + + """ + The HTML path to this resource. + """ + resourcePath: URI! + + """ + Returns a count of how many stargazers there are on this object + """ + stargazerCount: Int! + + """ + A list of users who have starred this starrable. + """ + stargazers( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Order for connection + """ + orderBy: StarOrder + ): StargazerConnection! + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! + + """ + The HTTP URL for this Gist. + """ + url: URI! + + """ + Returns a boolean indicating whether the viewing user has starred this starrable. + """ + viewerHasStarred: Boolean! +} + +""" +Represents a comment on an Gist. +""" +type GistComment implements Comment & Deletable & Minimizable & Node & Updatable & UpdatableComment { + """ + The actor who authored the comment. + """ + author: Actor + + """ + Author's association with the gist. + """ + authorAssociation: CommentAuthorAssociation! + + """ + Identifies the comment body. + """ + body: String! + + """ + The body rendered to HTML. + """ + bodyHTML: HTML! + + """ + The body rendered to text. + """ + bodyText: String! + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Check if this comment was created via an email reply. + """ + createdViaEmail: Boolean! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + + """ + The actor who edited the comment. + """ + editor: Actor + + """ + The associated gist. + """ + gist: Gist! + id: ID! + + """ + Check if this comment was edited and includes an edit with the creation data + """ + includesCreatedEdit: Boolean! + + """ + Returns whether or not a comment has been minimized. + """ + isMinimized: Boolean! + + """ + The moment the editor made the last edit + """ + lastEditedAt: DateTime + + """ + Returns why the comment was minimized. + """ + minimizedReason: String + + """ + Identifies when the comment was published at. + """ + publishedAt: DateTime + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! + + """ + A list of edits to this content. + """ + userContentEdits( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): UserContentEditConnection + + """ + Check if the current viewer can delete this object. + """ + viewerCanDelete: Boolean! + + """ + Check if the current viewer can minimize this object. + """ + viewerCanMinimize: Boolean! + + """ + Check if the current viewer can update this object. + """ + viewerCanUpdate: Boolean! + + """ + Reasons why the current viewer can not update this comment. + """ + viewerCannotUpdateReasons: [CommentCannotUpdateReason!]! + + """ + Did the viewer author this comment. + """ + viewerDidAuthor: Boolean! +} + +""" +The connection type for GistComment. +""" +type GistCommentConnection { + """ + A list of edges. + """ + edges: [GistCommentEdge] + + """ + A list of nodes. + """ + nodes: [GistComment] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type GistCommentEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: GistComment +} + +""" +The connection type for Gist. +""" +type GistConnection { + """ + A list of edges. + """ + edges: [GistEdge] + + """ + A list of nodes. + """ + nodes: [Gist] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type GistEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Gist +} + +""" +A file in a gist. +""" +type GistFile { + """ + The file name encoded to remove characters that are invalid in URL paths. + """ + encodedName: String + + """ + The gist file encoding. + """ + encoding: String + + """ + The file extension from the file name. + """ + extension: String + + """ + Indicates if this file is an image. + """ + isImage: Boolean! + + """ + Whether the file's contents were truncated. + """ + isTruncated: Boolean! + + """ + The programming language this file is written in. + """ + language: Language + + """ + The gist file name. + """ + name: String + + """ + The gist file size in bytes. + """ + size: Int + + """ + UTF8 text data or null if the file is binary + """ + text( + """ + Optionally truncate the returned file to this length. + """ + truncate: Int + ): String +} + +""" +Ordering options for gist connections +""" +input GistOrder { + """ + The ordering direction. + """ + direction: OrderDirection! + + """ + The field to order repositories by. + """ + field: GistOrderField! +} + +""" +Properties by which gist connections can be ordered. +""" +enum GistOrderField { + """ + Order gists by creation time + """ + CREATED_AT + + """ + Order gists by push time + """ + PUSHED_AT + + """ + Order gists by update time + """ + UPDATED_AT +} + +""" +The privacy of a Gist +""" +enum GistPrivacy { + """ + Gists that are public and secret + """ + ALL + + """ + Public + """ + PUBLIC + + """ + Secret + """ + SECRET +} + +""" +Represents an actor in a Git commit (ie. an author or committer). +""" +type GitActor { + """ + A URL pointing to the author's public avatar. + """ + avatarUrl( + """ + The size of the resulting square image. + """ + size: Int + ): URI! + + """ + The timestamp of the Git action (authoring or committing). + """ + date: GitTimestamp + + """ + The email in the Git commit. + """ + email: String + + """ + The name in the Git commit. + """ + name: String + + """ + The GitHub user corresponding to the email field. Null if no such user exists. + """ + user: User +} + +""" +The connection type for GitActor. +""" +type GitActorConnection { + """ + A list of edges. + """ + edges: [GitActorEdge] + + """ + A list of nodes. + """ + nodes: [GitActor] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type GitActorEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: GitActor +} + +""" +Represents information about the GitHub instance. +""" +type GitHubMetadata { + """ + Returns a String that's a SHA of `github-services` + """ + gitHubServicesSha: GitObjectID! + + """ + IP addresses that users connect to for git operations + """ + gitIpAddresses: [String!] + + """ + IP addresses that service hooks are sent from + """ + hookIpAddresses: [String!] + + """ + IP addresses that the importer connects from + """ + importerIpAddresses: [String!] + + """ + Whether or not users are verified + """ + isPasswordAuthenticationVerifiable: Boolean! + + """ + IP addresses for GitHub Pages' A records + """ + pagesIpAddresses: [String!] +} + +""" +Represents a Git object. +""" +interface GitObject { + """ + An abbreviated version of the Git object ID + """ + abbreviatedOid: String! + + """ + The HTTP path for this Git object + """ + commitResourcePath: URI! + + """ + The HTTP URL for this Git object + """ + commitUrl: URI! + id: ID! + + """ + The Git object ID + """ + oid: GitObjectID! + + """ + The Repository the Git object belongs to + """ + repository: Repository! +} + +""" +A Git object ID. +""" +scalar GitObjectID + +""" +A fully qualified reference name (e.g. `refs/heads/master`). +""" +scalar GitRefname @preview(toggledBy: "update-refs-preview") + +""" +Git SSH string +""" +scalar GitSSHRemote + +""" +Information about a signature (GPG or S/MIME) on a Commit or Tag. +""" +interface GitSignature { + """ + Email used to sign this object. + """ + email: String! + + """ + True if the signature is valid and verified by GitHub. + """ + isValid: Boolean! + + """ + Payload for GPG signing object. Raw ODB object without the signature header. + """ + payload: String! + + """ + ASCII-armored signature header from object. + """ + signature: String! + + """ + GitHub user corresponding to the email signing this commit. + """ + signer: User + + """ + The state of this signature. `VALID` if signature is valid and verified by + GitHub, otherwise represents reason why signature is considered invalid. + """ + state: GitSignatureState! + + """ + True if the signature was made with GitHub's signing key. + """ + wasSignedByGitHub: Boolean! +} + +""" +The state of a Git signature. +""" +enum GitSignatureState { + """ + The signing certificate or its chain could not be verified + """ + BAD_CERT + + """ + Invalid email used for signing + """ + BAD_EMAIL + + """ + Signing key expired + """ + EXPIRED_KEY + + """ + Internal error - the GPG verification service misbehaved + """ + GPGVERIFY_ERROR + + """ + Internal error - the GPG verification service is unavailable at the moment + """ + GPGVERIFY_UNAVAILABLE + + """ + Invalid signature + """ + INVALID + + """ + Malformed signature + """ + MALFORMED_SIG + + """ + The usage flags for the key that signed this don't allow signing + """ + NOT_SIGNING_KEY + + """ + Email used for signing not known to GitHub + """ + NO_USER + + """ + Valid signature, though certificate revocation check failed + """ + OCSP_ERROR + + """ + Valid signature, pending certificate revocation checking + """ + OCSP_PENDING + + """ + One or more certificates in chain has been revoked + """ + OCSP_REVOKED + + """ + Key used for signing not known to GitHub + """ + UNKNOWN_KEY + + """ + Unknown signature type + """ + UNKNOWN_SIG_TYPE + + """ + Unsigned + """ + UNSIGNED + + """ + Email used for signing unverified on GitHub + """ + UNVERIFIED_EMAIL + + """ + Valid signature and verified by GitHub + """ + VALID +} + +""" +An ISO-8601 encoded date string. Unlike the DateTime type, GitTimestamp is not converted in UTC. +""" +scalar GitTimestamp + +""" +Represents a GPG signature on a Commit or Tag. +""" +type GpgSignature implements GitSignature { + """ + Email used to sign this object. + """ + email: String! + + """ + True if the signature is valid and verified by GitHub. + """ + isValid: Boolean! + + """ + Hex-encoded ID of the key that signed this object. + """ + keyId: String + + """ + Payload for GPG signing object. Raw ODB object without the signature header. + """ + payload: String! + + """ + ASCII-armored signature header from object. + """ + signature: String! + + """ + GitHub user corresponding to the email signing this commit. + """ + signer: User + + """ + The state of this signature. `VALID` if signature is valid and verified by + GitHub, otherwise represents reason why signature is considered invalid. + """ + state: GitSignatureState! + + """ + True if the signature was made with GitHub's signing key. + """ + wasSignedByGitHub: Boolean! +} + +""" +A string containing HTML code. +""" +scalar HTML + +""" +Represents a 'head_ref_deleted' event on a given pull request. +""" +type HeadRefDeletedEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Identifies the Ref associated with the `head_ref_deleted` event. + """ + headRef: Ref + + """ + Identifies the name of the Ref associated with the `head_ref_deleted` event. + """ + headRefName: String! + id: ID! + + """ + PullRequest referenced by event. + """ + pullRequest: PullRequest! +} + +""" +Represents a 'head_ref_force_pushed' event on a given pull request. +""" +type HeadRefForcePushedEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the after commit SHA for the 'head_ref_force_pushed' event. + """ + afterCommit: Commit + + """ + Identifies the before commit SHA for the 'head_ref_force_pushed' event. + """ + beforeCommit: Commit + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! + + """ + PullRequest referenced by event. + """ + pullRequest: PullRequest! + + """ + Identifies the fully qualified ref name for the 'head_ref_force_pushed' event. + """ + ref: Ref +} + +""" +Represents a 'head_ref_restored' event on a given pull request. +""" +type HeadRefRestoredEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! + + """ + PullRequest referenced by event. + """ + pullRequest: PullRequest! +} + +""" +Detail needed to display a hovercard for a user +""" +type Hovercard { + """ + Each of the contexts for this hovercard + """ + contexts: [HovercardContext!]! +} + +""" +An individual line of a hovercard +""" +interface HovercardContext { + """ + A string describing this context + """ + message: String! + + """ + An octicon to accompany this context + """ + octicon: String! +} + +""" +The possible states in which authentication can be configured with an identity provider. +""" +enum IdentityProviderConfigurationState { + """ + Authentication with an identity provider is configured but not enforced. + """ + CONFIGURED + + """ + Authentication with an identity provider is configured and enforced. + """ + ENFORCED + + """ + Authentication with an identity provider is not configured. + """ + UNCONFIGURED +} + +""" +Autogenerated input type of ImportProject +""" +input ImportProjectInput { + """ + The description of Project. + """ + body: String + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + A list of columns containing issues and pull requests. + """ + columnImports: [ProjectColumnImport!]! + + """ + The name of Project. + """ + name: String! + + """ + The name of the Organization or User to create the Project under. + """ + ownerName: String! + + """ + Whether the Project is public or not. + """ + public: Boolean = false +} + +""" +Autogenerated return type of ImportProject +""" +type ImportProjectPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The new Project! + """ + project: Project +} + +""" +Autogenerated input type of InviteEnterpriseAdmin +""" +input InviteEnterpriseAdminInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The email of the person to invite as an administrator. + """ + email: String + + """ + The ID of the enterprise to which you want to invite an administrator. + """ + enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) + + """ + The login of a user to invite as an administrator. + """ + invitee: String + + """ + The role of the administrator. + """ + role: EnterpriseAdministratorRole +} + +""" +Autogenerated return type of InviteEnterpriseAdmin +""" +type InviteEnterpriseAdminPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The created enterprise administrator invitation. + """ + invitation: EnterpriseAdministratorInvitation +} + +""" +The possible values for the IP allow list enabled setting. +""" +enum IpAllowListEnabledSettingValue { + """ + The setting is disabled for the owner. + """ + DISABLED + + """ + The setting is enabled for the owner. + """ + ENABLED +} + +""" +An IP address or range of addresses that is allowed to access an owner's resources. +""" +type IpAllowListEntry implements Node { + """ + A single IP address or range of IP addresses in CIDR notation. + """ + allowListValue: String! + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! + + """ + Whether the entry is currently active. + """ + isActive: Boolean! + + """ + The name of the IP allow list entry. + """ + name: String + + """ + The owner of the IP allow list entry. + """ + owner: IpAllowListOwner! + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! +} + +""" +The connection type for IpAllowListEntry. +""" +type IpAllowListEntryConnection { + """ + A list of edges. + """ + edges: [IpAllowListEntryEdge] + + """ + A list of nodes. + """ + nodes: [IpAllowListEntry] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type IpAllowListEntryEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: IpAllowListEntry +} + +""" +Ordering options for IP allow list entry connections. +""" +input IpAllowListEntryOrder { + """ + The ordering direction. + """ + direction: OrderDirection! + + """ + The field to order IP allow list entries by. + """ + field: IpAllowListEntryOrderField! +} + +""" +Properties by which IP allow list entry connections can be ordered. +""" +enum IpAllowListEntryOrderField { + """ + Order IP allow list entries by the allow list value. + """ + ALLOW_LIST_VALUE + + """ + Order IP allow list entries by creation time. + """ + CREATED_AT +} + +""" +Types that can own an IP allow list. +""" +union IpAllowListOwner = Enterprise | Organization + +""" +An Issue is a place to discuss ideas, enhancements, tasks, and bugs for a project. +""" +type Issue implements Assignable & Closable & Comment & Labelable & Lockable & Node & Reactable & RepositoryNode & Subscribable & UniformResourceLocatable & Updatable & UpdatableComment { + """ + Reason that the conversation was locked. + """ + activeLockReason: LockReason + + """ + A list of Users assigned to this object. + """ + assignees( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): UserConnection! + + """ + The actor who authored the comment. + """ + author: Actor + + """ + Author's association with the subject of the comment. + """ + authorAssociation: CommentAuthorAssociation! + + """ + Identifies the body of the issue. + """ + body: String! + + """ + The body rendered to HTML. + """ + bodyHTML: HTML! + + """ + The http path for this issue body + """ + bodyResourcePath: URI! + + """ + Identifies the body of the issue rendered to text. + """ + bodyText: String! + + """ + The http URL for this issue body + """ + bodyUrl: URI! + + """ + `true` if the object is closed (definition of closed may depend on type) + """ + closed: Boolean! + + """ + Identifies the date and time when the object was closed. + """ + closedAt: DateTime + + """ + A list of comments associated with the Issue. + """ + comments( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for issue comments returned from the connection. + """ + orderBy: IssueCommentOrder + ): IssueCommentConnection! + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Check if this comment was created via an email reply. + """ + createdViaEmail: Boolean! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + + """ + The actor who edited the comment. + """ + editor: Actor + + """ + The hovercard information for this issue + """ + hovercard( + """ + Whether or not to include notification contexts + """ + includeNotificationContexts: Boolean = true + ): Hovercard! + id: ID! + + """ + Check if this comment was edited and includes an edit with the creation data + """ + includesCreatedEdit: Boolean! + + """ + Indicates whether or not this issue is currently pinned to the repository issues list + """ + isPinned: Boolean + + """ + Is this issue read by the viewer + """ + isReadByViewer: Boolean + + """ + A list of labels associated with the object. + """ + labels( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for labels returned from the connection. + """ + orderBy: LabelOrder = {field: CREATED_AT, direction: ASC} + ): LabelConnection + + """ + The moment the editor made the last edit + """ + lastEditedAt: DateTime + + """ + `true` if the object is locked + """ + locked: Boolean! + + """ + Identifies the milestone associated with the issue. + """ + milestone: Milestone + + """ + Identifies the issue number. + """ + number: Int! + + """ + A list of Users that are participating in the Issue conversation. + """ + participants( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): UserConnection! + + """ + List of project cards associated with this issue. + """ + projectCards( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + A list of archived states to filter the cards by + """ + archivedStates: [ProjectCardArchivedState] = [ARCHIVED, NOT_ARCHIVED] + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): ProjectCardConnection! + + """ + Identifies when the comment was published at. + """ + publishedAt: DateTime + + """ + A list of reactions grouped by content left on the subject. + """ + reactionGroups: [ReactionGroup!] + + """ + A list of Reactions left on the Issue. + """ + reactions( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Allows filtering Reactions by emoji. + """ + content: ReactionContent + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Allows specifying the order in which reactions are returned. + """ + orderBy: ReactionOrder + ): ReactionConnection! + + """ + The repository associated with this node. + """ + repository: Repository! + + """ + The HTTP path for this issue + """ + resourcePath: URI! + + """ + Identifies the state of the issue. + """ + state: IssueState! + + """ + A list of events, comments, commits, etc. associated with the issue. + """ + timeline( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Allows filtering timeline events by a `since` timestamp. + """ + since: DateTime + ): IssueTimelineConnection! @deprecated(reason: "`timeline` will be removed Use Issue.timelineItems instead. Removal on 2020-10-01 UTC.") + + """ + A list of events, comments, commits, etc. associated with the issue. + """ + timelineItems( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Filter timeline items by type. + """ + itemTypes: [IssueTimelineItemsItemType!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Filter timeline items by a `since` timestamp. + """ + since: DateTime + + """ + Skips the first _n_ elements in the list. + """ + skip: Int + ): IssueTimelineItemsConnection! + + """ + Identifies the issue title. + """ + title: String! + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! + + """ + The HTTP URL for this issue + """ + url: URI! + + """ + A list of edits to this content. + """ + userContentEdits( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): UserContentEditConnection + + """ + Can user react to this subject + """ + viewerCanReact: Boolean! + + """ + Check if the viewer is able to change their subscription status for the repository. + """ + viewerCanSubscribe: Boolean! + + """ + Check if the current viewer can update this object. + """ + viewerCanUpdate: Boolean! + + """ + Reasons why the current viewer can not update this comment. + """ + viewerCannotUpdateReasons: [CommentCannotUpdateReason!]! + + """ + Did the viewer author this comment. + """ + viewerDidAuthor: Boolean! + + """ + Identifies if the viewer is watching, not watching, or ignoring the subscribable entity. + """ + viewerSubscription: SubscriptionState +} + +""" +Represents a comment on an Issue. +""" +type IssueComment implements Comment & Deletable & Minimizable & Node & Reactable & RepositoryNode & Updatable & UpdatableComment { + """ + The actor who authored the comment. + """ + author: Actor + + """ + Author's association with the subject of the comment. + """ + authorAssociation: CommentAuthorAssociation! + + """ + The body as Markdown. + """ + body: String! + + """ + The body rendered to HTML. + """ + bodyHTML: HTML! + + """ + The body rendered to text. + """ + bodyText: String! + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Check if this comment was created via an email reply. + """ + createdViaEmail: Boolean! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + + """ + The actor who edited the comment. + """ + editor: Actor + id: ID! + + """ + Check if this comment was edited and includes an edit with the creation data + """ + includesCreatedEdit: Boolean! + + """ + Returns whether or not a comment has been minimized. + """ + isMinimized: Boolean! + + """ + Identifies the issue associated with the comment. + """ + issue: Issue! + + """ + The moment the editor made the last edit + """ + lastEditedAt: DateTime + + """ + Returns why the comment was minimized. + """ + minimizedReason: String + + """ + Identifies when the comment was published at. + """ + publishedAt: DateTime + + """ + Returns the pull request associated with the comment, if this comment was made on a + pull request. + """ + pullRequest: PullRequest + + """ + A list of reactions grouped by content left on the subject. + """ + reactionGroups: [ReactionGroup!] + + """ + A list of Reactions left on the Issue. + """ + reactions( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Allows filtering Reactions by emoji. + """ + content: ReactionContent + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Allows specifying the order in which reactions are returned. + """ + orderBy: ReactionOrder + ): ReactionConnection! + + """ + The repository associated with this node. + """ + repository: Repository! + + """ + The HTTP path for this issue comment + """ + resourcePath: URI! + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! + + """ + The HTTP URL for this issue comment + """ + url: URI! + + """ + A list of edits to this content. + """ + userContentEdits( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): UserContentEditConnection + + """ + Check if the current viewer can delete this object. + """ + viewerCanDelete: Boolean! + + """ + Check if the current viewer can minimize this object. + """ + viewerCanMinimize: Boolean! + + """ + Can user react to this subject + """ + viewerCanReact: Boolean! + + """ + Check if the current viewer can update this object. + """ + viewerCanUpdate: Boolean! + + """ + Reasons why the current viewer can not update this comment. + """ + viewerCannotUpdateReasons: [CommentCannotUpdateReason!]! + + """ + Did the viewer author this comment. + """ + viewerDidAuthor: Boolean! +} + +""" +The connection type for IssueComment. +""" +type IssueCommentConnection { + """ + A list of edges. + """ + edges: [IssueCommentEdge] + + """ + A list of nodes. + """ + nodes: [IssueComment] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type IssueCommentEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: IssueComment +} + +""" +Ways in which lists of issue comments can be ordered upon return. +""" +input IssueCommentOrder { + """ + The direction in which to order issue comments by the specified field. + """ + direction: OrderDirection! + + """ + The field in which to order issue comments by. + """ + field: IssueCommentOrderField! +} + +""" +Properties by which issue comment connections can be ordered. +""" +enum IssueCommentOrderField { + """ + Order issue comments by update time + """ + UPDATED_AT +} + +""" +The connection type for Issue. +""" +type IssueConnection { + """ + A list of edges. + """ + edges: [IssueEdge] + + """ + A list of nodes. + """ + nodes: [Issue] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +This aggregates issues opened by a user within one repository. +""" +type IssueContributionsByRepository { + """ + The issue contributions. + """ + contributions( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for contributions returned from the connection. + """ + orderBy: ContributionOrder = {direction: DESC} + ): CreatedIssueContributionConnection! + + """ + The repository in which the issues were opened. + """ + repository: Repository! +} + +""" +An edge in a connection. +""" +type IssueEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Issue +} + +""" +Ways in which to filter lists of issues. +""" +input IssueFilters { + """ + List issues assigned to given name. Pass in `null` for issues with no assigned + user, and `*` for issues assigned to any user. + """ + assignee: String + + """ + List issues created by given name. + """ + createdBy: String + + """ + List issues where the list of label names exist on the issue. + """ + labels: [String!] + + """ + List issues where the given name is mentioned in the issue. + """ + mentioned: String + + """ + List issues by given milestone argument. If an string representation of an + integer is passed, it should refer to a milestone by its number field. Pass in + `null` for issues with no milestone, and `*` for issues that are assigned to any milestone. + """ + milestone: String + + """ + List issues that have been updated at or after the given date. + """ + since: DateTime + + """ + List issues filtered by the list of states given. + """ + states: [IssueState!] + + """ + List issues subscribed to by viewer. + """ + viewerSubscribed: Boolean = false +} + +""" +Used for return value of Repository.issueOrPullRequest. +""" +union IssueOrPullRequest = Issue | PullRequest + +""" +Ways in which lists of issues can be ordered upon return. +""" +input IssueOrder { + """ + The direction in which to order issues by the specified field. + """ + direction: OrderDirection! + + """ + The field in which to order issues by. + """ + field: IssueOrderField! +} + +""" +Properties by which issue connections can be ordered. +""" +enum IssueOrderField { + """ + Order issues by comment count + """ + COMMENTS + + """ + Order issues by creation time + """ + CREATED_AT + + """ + Order issues by update time + """ + UPDATED_AT +} + +""" +The possible states of an issue. +""" +enum IssueState { + """ + An issue that has been closed + """ + CLOSED + + """ + An issue that is still open + """ + OPEN +} + +""" +A repository issue template. +""" +type IssueTemplate { + """ + The template purpose. + """ + about: String + + """ + The suggested issue body. + """ + body: String + + """ + The template name. + """ + name: String! + + """ + The suggested issue title. + """ + title: String +} + +""" +The connection type for IssueTimelineItem. +""" +type IssueTimelineConnection { + """ + A list of edges. + """ + edges: [IssueTimelineItemEdge] + + """ + A list of nodes. + """ + nodes: [IssueTimelineItem] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An item in an issue timeline +""" +union IssueTimelineItem = AssignedEvent | ClosedEvent | Commit | CrossReferencedEvent | DemilestonedEvent | IssueComment | LabeledEvent | LockedEvent | MilestonedEvent | ReferencedEvent | RenamedTitleEvent | ReopenedEvent | SubscribedEvent | TransferredEvent | UnassignedEvent | UnlabeledEvent | UnlockedEvent | UnsubscribedEvent | UserBlockedEvent + +""" +An edge in a connection. +""" +type IssueTimelineItemEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: IssueTimelineItem +} + +""" +An item in an issue timeline +""" +union IssueTimelineItems = AddedToProjectEvent | AssignedEvent | ClosedEvent | CommentDeletedEvent | ConnectedEvent | ConvertedNoteToIssueEvent | CrossReferencedEvent | DemilestonedEvent | DisconnectedEvent | IssueComment | LabeledEvent | LockedEvent | MarkedAsDuplicateEvent | MentionedEvent | MilestonedEvent | MovedColumnsInProjectEvent | PinnedEvent | ReferencedEvent | RemovedFromProjectEvent | RenamedTitleEvent | ReopenedEvent | SubscribedEvent | TransferredEvent | UnassignedEvent | UnlabeledEvent | UnlockedEvent | UnmarkedAsDuplicateEvent | UnpinnedEvent | UnsubscribedEvent | UserBlockedEvent + +""" +The connection type for IssueTimelineItems. +""" +type IssueTimelineItemsConnection { + """ + A list of edges. + """ + edges: [IssueTimelineItemsEdge] + + """ + Identifies the count of items after applying `before` and `after` filters. + """ + filteredCount: Int! + + """ + A list of nodes. + """ + nodes: [IssueTimelineItems] + + """ + Identifies the count of items after applying `before`/`after` filters and `first`/`last`/`skip` slicing. + """ + pageCount: Int! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! + + """ + Identifies the date and time when the timeline was last updated. + """ + updatedAt: DateTime! +} + +""" +An edge in a connection. +""" +type IssueTimelineItemsEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: IssueTimelineItems +} + +""" +The possible item types found in a timeline. +""" +enum IssueTimelineItemsItemType { + """ + Represents a 'added_to_project' event on a given issue or pull request. + """ + ADDED_TO_PROJECT_EVENT + + """ + Represents an 'assigned' event on any assignable object. + """ + ASSIGNED_EVENT + + """ + Represents a 'closed' event on any `Closable`. + """ + CLOSED_EVENT + + """ + Represents a 'comment_deleted' event on a given issue or pull request. + """ + COMMENT_DELETED_EVENT + + """ + Represents a 'connected' event on a given issue or pull request. + """ + CONNECTED_EVENT + + """ + Represents a 'converted_note_to_issue' event on a given issue or pull request. + """ + CONVERTED_NOTE_TO_ISSUE_EVENT + + """ + Represents a mention made by one issue or pull request to another. + """ + CROSS_REFERENCED_EVENT + + """ + Represents a 'demilestoned' event on a given issue or pull request. + """ + DEMILESTONED_EVENT + + """ + Represents a 'disconnected' event on a given issue or pull request. + """ + DISCONNECTED_EVENT + + """ + Represents a comment on an Issue. + """ + ISSUE_COMMENT + + """ + Represents a 'labeled' event on a given issue or pull request. + """ + LABELED_EVENT + + """ + Represents a 'locked' event on a given issue or pull request. + """ + LOCKED_EVENT + + """ + Represents a 'marked_as_duplicate' event on a given issue or pull request. + """ + MARKED_AS_DUPLICATE_EVENT + + """ + Represents a 'mentioned' event on a given issue or pull request. + """ + MENTIONED_EVENT + + """ + Represents a 'milestoned' event on a given issue or pull request. + """ + MILESTONED_EVENT + + """ + Represents a 'moved_columns_in_project' event on a given issue or pull request. + """ + MOVED_COLUMNS_IN_PROJECT_EVENT + + """ + Represents a 'pinned' event on a given issue or pull request. + """ + PINNED_EVENT + + """ + Represents a 'referenced' event on a given `ReferencedSubject`. + """ + REFERENCED_EVENT + + """ + Represents a 'removed_from_project' event on a given issue or pull request. + """ + REMOVED_FROM_PROJECT_EVENT + + """ + Represents a 'renamed' event on a given issue or pull request + """ + RENAMED_TITLE_EVENT + + """ + Represents a 'reopened' event on any `Closable`. + """ + REOPENED_EVENT + + """ + Represents a 'subscribed' event on a given `Subscribable`. + """ + SUBSCRIBED_EVENT + + """ + Represents a 'transferred' event on a given issue or pull request. + """ + TRANSFERRED_EVENT + + """ + Represents an 'unassigned' event on any assignable object. + """ + UNASSIGNED_EVENT + + """ + Represents an 'unlabeled' event on a given issue or pull request. + """ + UNLABELED_EVENT + + """ + Represents an 'unlocked' event on a given issue or pull request. + """ + UNLOCKED_EVENT + + """ + Represents an 'unmarked_as_duplicate' event on a given issue or pull request. + """ + UNMARKED_AS_DUPLICATE_EVENT + + """ + Represents an 'unpinned' event on a given issue or pull request. + """ + UNPINNED_EVENT + + """ + Represents an 'unsubscribed' event on a given `Subscribable`. + """ + UNSUBSCRIBED_EVENT + + """ + Represents a 'user_blocked' event on a given user. + """ + USER_BLOCKED_EVENT +} + +""" +Represents a user signing up for a GitHub account. +""" +type JoinedGitHubContribution implements Contribution { + """ + Whether this contribution is associated with a record you do not have access to. For + example, your own 'first issue' contribution may have been made on a repository you can no + longer access. + """ + isRestricted: Boolean! + + """ + When this contribution was made. + """ + occurredAt: DateTime! + + """ + The HTTP path for this contribution. + """ + resourcePath: URI! + + """ + The HTTP URL for this contribution. + """ + url: URI! + + """ + The user who made this contribution. + """ + user: User! +} + +""" +A label for categorizing Issues or Milestones with a given Repository. +""" +type Label implements Node { + """ + Identifies the label color. + """ + color: String! + + """ + Identifies the date and time when the label was created. + """ + createdAt: DateTime + + """ + A brief description of this label. + """ + description: String + id: ID! + + """ + Indicates whether or not this is a default label. + """ + isDefault: Boolean! + + """ + A list of issues associated with this label. + """ + issues( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Filtering options for issues returned from the connection. + """ + filterBy: IssueFilters + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + A list of label names to filter the pull requests by. + """ + labels: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for issues returned from the connection. + """ + orderBy: IssueOrder + + """ + A list of states to filter the issues by. + """ + states: [IssueState!] + ): IssueConnection! + + """ + Identifies the label name. + """ + name: String! + + """ + A list of pull requests associated with this label. + """ + pullRequests( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + The base ref name to filter the pull requests by. + """ + baseRefName: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + The head ref name to filter the pull requests by. + """ + headRefName: String + + """ + A list of label names to filter the pull requests by. + """ + labels: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for pull requests returned from the connection. + """ + orderBy: IssueOrder + + """ + A list of states to filter the pull requests by. + """ + states: [PullRequestState!] + ): PullRequestConnection! + + """ + The repository associated with this label. + """ + repository: Repository! + + """ + The HTTP path for this label. + """ + resourcePath: URI! + + """ + Identifies the date and time when the label was last updated. + """ + updatedAt: DateTime + + """ + The HTTP URL for this label. + """ + url: URI! +} + +""" +The connection type for Label. +""" +type LabelConnection { + """ + A list of edges. + """ + edges: [LabelEdge] + + """ + A list of nodes. + """ + nodes: [Label] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type LabelEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Label +} + +""" +Ways in which lists of labels can be ordered upon return. +""" +input LabelOrder { + """ + The direction in which to order labels by the specified field. + """ + direction: OrderDirection! + + """ + The field in which to order labels by. + """ + field: LabelOrderField! +} + +""" +Properties by which label connections can be ordered. +""" +enum LabelOrderField { + """ + Order labels by creation time + """ + CREATED_AT + + """ + Order labels by name + """ + NAME +} + +""" +An object that can have labels assigned to it. +""" +interface Labelable { + """ + A list of labels associated with the object. + """ + labels( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for labels returned from the connection. + """ + orderBy: LabelOrder = {field: CREATED_AT, direction: ASC} + ): LabelConnection +} + +""" +Represents a 'labeled' event on a given issue or pull request. +""" +type LabeledEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! + + """ + Identifies the label associated with the 'labeled' event. + """ + label: Label! + + """ + Identifies the `Labelable` associated with the event. + """ + labelable: Labelable! +} + +""" +Represents a given language found in repositories. +""" +type Language implements Node { + """ + The color defined for the current language. + """ + color: String + id: ID! + + """ + The name of the current language. + """ + name: String! +} + +""" +A list of languages associated with the parent. +""" +type LanguageConnection { + """ + A list of edges. + """ + edges: [LanguageEdge] + + """ + A list of nodes. + """ + nodes: [Language] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! + + """ + The total size in bytes of files written in that language. + """ + totalSize: Int! +} + +""" +Represents the language of a repository. +""" +type LanguageEdge { + cursor: String! + node: Language! + + """ + The number of bytes of code written in the language. + """ + size: Int! +} + +""" +Ordering options for language connections. +""" +input LanguageOrder { + """ + The ordering direction. + """ + direction: OrderDirection! + + """ + The field to order languages by. + """ + field: LanguageOrderField! +} + +""" +Properties by which language connections can be ordered. +""" +enum LanguageOrderField { + """ + Order languages by the size of all files containing the language + """ + SIZE +} + +""" +A repository's open source license +""" +type License implements Node { + """ + The full text of the license + """ + body: String! + + """ + The conditions set by the license + """ + conditions: [LicenseRule]! + + """ + A human-readable description of the license + """ + description: String + + """ + Whether the license should be featured + """ + featured: Boolean! + + """ + Whether the license should be displayed in license pickers + """ + hidden: Boolean! + id: ID! + + """ + Instructions on how to implement the license + """ + implementation: String + + """ + The lowercased SPDX ID of the license + """ + key: String! + + """ + The limitations set by the license + """ + limitations: [LicenseRule]! + + """ + The license full name specified by + """ + name: String! + + """ + Customary short name if applicable (e.g, GPLv3) + """ + nickname: String + + """ + The permissions set by the license + """ + permissions: [LicenseRule]! + + """ + Whether the license is a pseudo-license placeholder (e.g., other, no-license) + """ + pseudoLicense: Boolean! + + """ + Short identifier specified by + """ + spdxId: String + + """ + URL to the license on + """ + url: URI +} + +""" +Describes a License's conditions, permissions, and limitations +""" +type LicenseRule { + """ + A description of the rule + """ + description: String! + + """ + The machine-readable rule key + """ + key: String! + + """ + The human-readable rule label + """ + label: String! +} + +""" +Autogenerated input type of LinkRepositoryToProject +""" +input LinkRepositoryToProjectInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the Project to link to a Repository + """ + projectId: ID! @possibleTypes(concreteTypes: ["Project"]) + + """ + The ID of the Repository to link to a Project. + """ + repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) +} + +""" +Autogenerated return type of LinkRepositoryToProject +""" +type LinkRepositoryToProjectPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The linked Project. + """ + project: Project + + """ + The linked Repository. + """ + repository: Repository +} + +""" +Autogenerated input type of LockLockable +""" +input LockLockableInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + A reason for why the item will be locked. + """ + lockReason: LockReason + + """ + ID of the item to be locked. + """ + lockableId: ID! @possibleTypes(concreteTypes: ["Issue", "PullRequest"], abstractType: "Lockable") +} + +""" +Autogenerated return type of LockLockable +""" +type LockLockablePayload { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The item that was locked. + """ + lockedRecord: Lockable +} + +""" +The possible reasons that an issue or pull request was locked. +""" +enum LockReason { + """ + The issue or pull request was locked because the conversation was off-topic. + """ + OFF_TOPIC + + """ + The issue or pull request was locked because the conversation was resolved. + """ + RESOLVED + + """ + The issue or pull request was locked because the conversation was spam. + """ + SPAM + + """ + The issue or pull request was locked because the conversation was too heated. + """ + TOO_HEATED +} + +""" +An object that can be locked. +""" +interface Lockable { + """ + Reason that the conversation was locked. + """ + activeLockReason: LockReason + + """ + `true` if the object is locked + """ + locked: Boolean! +} + +""" +Represents a 'locked' event on a given issue or pull request. +""" +type LockedEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! + + """ + Reason that the conversation was locked (optional). + """ + lockReason: LockReason + + """ + Object that was locked. + """ + lockable: Lockable! +} + +""" +A placeholder user for attribution of imported data on GitHub. +""" +type Mannequin implements Actor & Node & UniformResourceLocatable { + """ + A URL pointing to the GitHub App's public avatar. + """ + avatarUrl( + """ + The size of the resulting square image. + """ + size: Int + ): URI! + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + + """ + The mannequin's email on the source instance. + """ + email: String + id: ID! + + """ + The username of the actor. + """ + login: String! + + """ + The HTML path to this resource. + """ + resourcePath: URI! + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! + + """ + The URL to this resource. + """ + url: URI! +} + +""" +Autogenerated input type of MarkFileAsViewed +""" +input MarkFileAsViewedInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The path of the file to mark as viewed + """ + path: String! + + """ + The Node ID of the pull request. + """ + pullRequestId: ID! @possibleTypes(concreteTypes: ["PullRequest"]) +} + +""" +Autogenerated return type of MarkFileAsViewed +""" +type MarkFileAsViewedPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The updated pull request. + """ + pullRequest: PullRequest +} + +""" +Autogenerated input type of MarkPullRequestReadyForReview +""" +input MarkPullRequestReadyForReviewInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + ID of the pull request to be marked as ready for review. + """ + pullRequestId: ID! @possibleTypes(concreteTypes: ["PullRequest"]) +} + +""" +Autogenerated return type of MarkPullRequestReadyForReview +""" +type MarkPullRequestReadyForReviewPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The pull request that is ready for review. + """ + pullRequest: PullRequest +} + +""" +Represents a 'marked_as_duplicate' event on a given issue or pull request. +""" +type MarkedAsDuplicateEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + The authoritative issue or pull request which has been duplicated by another. + """ + canonical: IssueOrPullRequest + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + The issue or pull request which has been marked as a duplicate of another. + """ + duplicate: IssueOrPullRequest + id: ID! + + """ + Canonical and duplicate belong to different repositories. + """ + isCrossRepository: Boolean! +} + +""" +A public description of a Marketplace category. +""" +type MarketplaceCategory implements Node { + """ + The category's description. + """ + description: String + + """ + The technical description of how apps listed in this category work with GitHub. + """ + howItWorks: String + id: ID! + + """ + The category's name. + """ + name: String! + + """ + How many Marketplace listings have this as their primary category. + """ + primaryListingCount: Int! + + """ + The HTTP path for this Marketplace category. + """ + resourcePath: URI! + + """ + How many Marketplace listings have this as their secondary category. + """ + secondaryListingCount: Int! + + """ + The short name of the category used in its URL. + """ + slug: String! + + """ + The HTTP URL for this Marketplace category. + """ + url: URI! +} + +""" +A listing in the GitHub integration marketplace. +""" +type MarketplaceListing implements Node { + """ + The GitHub App this listing represents. + """ + app: App + + """ + URL to the listing owner's company site. + """ + companyUrl: URI + + """ + The HTTP path for configuring access to the listing's integration or OAuth app + """ + configurationResourcePath: URI! + + """ + The HTTP URL for configuring access to the listing's integration or OAuth app + """ + configurationUrl: URI! + + """ + URL to the listing's documentation. + """ + documentationUrl: URI + + """ + The listing's detailed description. + """ + extendedDescription: String + + """ + The listing's detailed description rendered to HTML. + """ + extendedDescriptionHTML: HTML! + + """ + The listing's introductory description. + """ + fullDescription: String! + + """ + The listing's introductory description rendered to HTML. + """ + fullDescriptionHTML: HTML! + + """ + Does this listing have any plans with a free trial? + """ + hasPublishedFreeTrialPlans: Boolean! + + """ + Does this listing have a terms of service link? + """ + hasTermsOfService: Boolean! + + """ + Whether the creator of the app is a verified org + """ + hasVerifiedOwner: Boolean! + + """ + A technical description of how this app works with GitHub. + """ + howItWorks: String + + """ + The listing's technical description rendered to HTML. + """ + howItWorksHTML: HTML! + id: ID! + + """ + URL to install the product to the viewer's account or organization. + """ + installationUrl: URI + + """ + Whether this listing's app has been installed for the current viewer + """ + installedForViewer: Boolean! + + """ + Whether this listing has been removed from the Marketplace. + """ + isArchived: Boolean! + + """ + Whether this listing is still an editable draft that has not been submitted + for review and is not publicly visible in the Marketplace. + """ + isDraft: Boolean! + + """ + Whether the product this listing represents is available as part of a paid plan. + """ + isPaid: Boolean! + + """ + Whether this listing has been approved for display in the Marketplace. + """ + isPublic: Boolean! + + """ + Whether this listing has been rejected by GitHub for display in the Marketplace. + """ + isRejected: Boolean! + + """ + Whether this listing has been approved for unverified display in the Marketplace. + """ + isUnverified: Boolean! + + """ + Whether this draft listing has been submitted for review for approval to be unverified in the Marketplace. + """ + isUnverifiedPending: Boolean! + + """ + Whether this draft listing has been submitted for review from GitHub for approval to be verified in the Marketplace. + """ + isVerificationPendingFromDraft: Boolean! + + """ + Whether this unverified listing has been submitted for review from GitHub for approval to be verified in the Marketplace. + """ + isVerificationPendingFromUnverified: Boolean! + + """ + Whether this listing has been approved for verified display in the Marketplace. + """ + isVerified: Boolean! + + """ + The hex color code, without the leading '#', for the logo background. + """ + logoBackgroundColor: String! + + """ + URL for the listing's logo image. + """ + logoUrl( + """ + The size in pixels of the resulting square image. + """ + size: Int = 400 + ): URI + + """ + The listing's full name. + """ + name: String! + + """ + The listing's very short description without a trailing period or ampersands. + """ + normalizedShortDescription: String! + + """ + URL to the listing's detailed pricing. + """ + pricingUrl: URI + + """ + The category that best describes the listing. + """ + primaryCategory: MarketplaceCategory! + + """ + URL to the listing's privacy policy, may return an empty string for listings that do not require a privacy policy URL. + """ + privacyPolicyUrl: URI! + + """ + The HTTP path for the Marketplace listing. + """ + resourcePath: URI! + + """ + The URLs for the listing's screenshots. + """ + screenshotUrls: [String]! + + """ + An alternate category that describes the listing. + """ + secondaryCategory: MarketplaceCategory + + """ + The listing's very short description. + """ + shortDescription: String! + + """ + The short name of the listing used in its URL. + """ + slug: String! + + """ + URL to the listing's status page. + """ + statusUrl: URI + + """ + An email address for support for this listing's app. + """ + supportEmail: String + + """ + Either a URL or an email address for support for this listing's app, may + return an empty string for listings that do not require a support URL. + """ + supportUrl: URI! + + """ + URL to the listing's terms of service. + """ + termsOfServiceUrl: URI + + """ + The HTTP URL for the Marketplace listing. + """ + url: URI! + + """ + Can the current viewer add plans for this Marketplace listing. + """ + viewerCanAddPlans: Boolean! + + """ + Can the current viewer approve this Marketplace listing. + """ + viewerCanApprove: Boolean! + + """ + Can the current viewer delist this Marketplace listing. + """ + viewerCanDelist: Boolean! + + """ + Can the current viewer edit this Marketplace listing. + """ + viewerCanEdit: Boolean! + + """ + Can the current viewer edit the primary and secondary category of this + Marketplace listing. + """ + viewerCanEditCategories: Boolean! + + """ + Can the current viewer edit the plans for this Marketplace listing. + """ + viewerCanEditPlans: Boolean! + + """ + Can the current viewer return this Marketplace listing to draft state + so it becomes editable again. + """ + viewerCanRedraft: Boolean! + + """ + Can the current viewer reject this Marketplace listing by returning it to + an editable draft state or rejecting it entirely. + """ + viewerCanReject: Boolean! + + """ + Can the current viewer request this listing be reviewed for display in + the Marketplace as verified. + """ + viewerCanRequestApproval: Boolean! + + """ + Indicates whether the current user has an active subscription to this Marketplace listing. + """ + viewerHasPurchased: Boolean! + + """ + Indicates if the current user has purchased a subscription to this Marketplace listing + for all of the organizations the user owns. + """ + viewerHasPurchasedForAllOrganizations: Boolean! + + """ + Does the current viewer role allow them to administer this Marketplace listing. + """ + viewerIsListingAdmin: Boolean! +} + +""" +Look up Marketplace Listings +""" +type MarketplaceListingConnection { + """ + A list of edges. + """ + edges: [MarketplaceListingEdge] + + """ + A list of nodes. + """ + nodes: [MarketplaceListing] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type MarketplaceListingEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: MarketplaceListing +} + +""" +Entities that have members who can set status messages. +""" +interface MemberStatusable { + """ + Get the status messages members of this entity have set that are either public or visible only to the organization. + """ + memberStatuses( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for user statuses returned from the connection. + """ + orderBy: UserStatusOrder = {field: UPDATED_AT, direction: DESC} + ): UserStatusConnection! +} + +""" +Audit log entry for a members_can_delete_repos.clear event. +""" +type MembersCanDeleteReposClearAuditEntry implements AuditEntry & EnterpriseAuditEntryData & Node & OrganizationAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + + """ + The HTTP path for this enterprise. + """ + enterpriseResourcePath: URI + + """ + The slug of the enterprise. + """ + enterpriseSlug: String + + """ + The HTTP URL for this enterprise. + """ + enterpriseUrl: URI + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a members_can_delete_repos.disable event. +""" +type MembersCanDeleteReposDisableAuditEntry implements AuditEntry & EnterpriseAuditEntryData & Node & OrganizationAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + + """ + The HTTP path for this enterprise. + """ + enterpriseResourcePath: URI + + """ + The slug of the enterprise. + """ + enterpriseSlug: String + + """ + The HTTP URL for this enterprise. + """ + enterpriseUrl: URI + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a members_can_delete_repos.enable event. +""" +type MembersCanDeleteReposEnableAuditEntry implements AuditEntry & EnterpriseAuditEntryData & Node & OrganizationAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + + """ + The HTTP path for this enterprise. + """ + enterpriseResourcePath: URI + + """ + The slug of the enterprise. + """ + enterpriseSlug: String + + """ + The HTTP URL for this enterprise. + """ + enterpriseUrl: URI + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Represents a 'mentioned' event on a given issue or pull request. +""" +type MentionedEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + id: ID! +} + +""" +Autogenerated input type of MergeBranch +""" +input MergeBranchInput { + """ + The email address to associate with this commit. + """ + authorEmail: String + + """ + The name of the base branch that the provided head will be merged into. + """ + base: String! + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + Message to use for the merge commit. If omitted, a default will be used. + """ + commitMessage: String + + """ + The head to merge into the base branch. This can be a branch name or a commit GitObjectID. + """ + head: String! + + """ + The Node ID of the Repository containing the base branch that will be modified. + """ + repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) +} + +""" +Autogenerated return type of MergeBranch +""" +type MergeBranchPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The resulting merge Commit. + """ + mergeCommit: Commit +} + +""" +Autogenerated input type of MergePullRequest +""" +input MergePullRequestInput { + """ + The email address to associate with this merge. + """ + authorEmail: String + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + Commit body to use for the merge commit; if omitted, a default message will be used + """ + commitBody: String + + """ + Commit headline to use for the merge commit; if omitted, a default message will be used. + """ + commitHeadline: String + + """ + OID that the pull request head ref must match to allow merge; if omitted, no check is performed. + """ + expectedHeadOid: GitObjectID + + """ + The merge method to use. If omitted, defaults to 'MERGE' + """ + mergeMethod: PullRequestMergeMethod = MERGE + + """ + ID of the pull request to be merged. + """ + pullRequestId: ID! @possibleTypes(concreteTypes: ["PullRequest"]) +} + +""" +Autogenerated return type of MergePullRequest +""" +type MergePullRequestPayload { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The pull request that was merged. + """ + pullRequest: PullRequest +} + +""" +Detailed status information about a pull request merge. +""" +enum MergeStateStatus { + """ + The head ref is out of date. + """ + BEHIND + + """ + The merge is blocked. + """ + BLOCKED + + """ + Mergeable and passing commit status. + """ + CLEAN + + """ + The merge commit cannot be cleanly created. + """ + DIRTY + + """ + The merge is blocked due to the pull request being a draft. + """ + DRAFT @deprecated(reason: "DRAFT state will be removed from this enum and `isDraft` should be used instead Use PullRequest.isDraft instead. Removal on 2021-01-01 UTC.") + + """ + Mergeable with passing commit status and pre-receive hooks. + """ + HAS_HOOKS + + """ + The state cannot currently be determined. + """ + UNKNOWN + + """ + Mergeable with non-passing commit status. + """ + UNSTABLE +} + +""" +Whether or not a PullRequest can be merged. +""" +enum MergeableState { + """ + The pull request cannot be merged due to merge conflicts. + """ + CONFLICTING + + """ + The pull request can be merged. + """ + MERGEABLE + + """ + The mergeability of the pull request is still being calculated. + """ + UNKNOWN +} + +""" +Represents a 'merged' event on a given pull request. +""" +type MergedEvent implements Node & UniformResourceLocatable { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the commit associated with the `merge` event. + """ + commit: Commit + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! + + """ + Identifies the Ref associated with the `merge` event. + """ + mergeRef: Ref + + """ + Identifies the name of the Ref associated with the `merge` event. + """ + mergeRefName: String! + + """ + PullRequest referenced by event. + """ + pullRequest: PullRequest! + + """ + The HTTP path for this merged event. + """ + resourcePath: URI! + + """ + The HTTP URL for this merged event. + """ + url: URI! +} + +""" +Represents a Milestone object on a given repository. +""" +type Milestone implements Closable & Node & UniformResourceLocatable { + """ + `true` if the object is closed (definition of closed may depend on type) + """ + closed: Boolean! + + """ + Identifies the date and time when the object was closed. + """ + closedAt: DateTime + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Identifies the actor who created the milestone. + """ + creator: Actor + + """ + Identifies the description of the milestone. + """ + description: String + + """ + Identifies the due date of the milestone. + """ + dueOn: DateTime + id: ID! + + """ + A list of issues associated with the milestone. + """ + issues( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Filtering options for issues returned from the connection. + """ + filterBy: IssueFilters + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + A list of label names to filter the pull requests by. + """ + labels: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for issues returned from the connection. + """ + orderBy: IssueOrder + + """ + A list of states to filter the issues by. + """ + states: [IssueState!] + ): IssueConnection! + + """ + Identifies the number of the milestone. + """ + number: Int! + + """ + Identifies the percentage complete for the milestone + """ + progressPercentage: Float! + + """ + A list of pull requests associated with the milestone. + """ + pullRequests( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + The base ref name to filter the pull requests by. + """ + baseRefName: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + The head ref name to filter the pull requests by. + """ + headRefName: String + + """ + A list of label names to filter the pull requests by. + """ + labels: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for pull requests returned from the connection. + """ + orderBy: IssueOrder + + """ + A list of states to filter the pull requests by. + """ + states: [PullRequestState!] + ): PullRequestConnection! + + """ + The repository associated with this milestone. + """ + repository: Repository! + + """ + The HTTP path for this milestone + """ + resourcePath: URI! + + """ + Identifies the state of the milestone. + """ + state: MilestoneState! + + """ + Identifies the title of the milestone. + """ + title: String! + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! + + """ + The HTTP URL for this milestone + """ + url: URI! +} + +""" +The connection type for Milestone. +""" +type MilestoneConnection { + """ + A list of edges. + """ + edges: [MilestoneEdge] + + """ + A list of nodes. + """ + nodes: [Milestone] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type MilestoneEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Milestone +} + +""" +Types that can be inside a Milestone. +""" +union MilestoneItem = Issue | PullRequest + +""" +Ordering options for milestone connections. +""" +input MilestoneOrder { + """ + The ordering direction. + """ + direction: OrderDirection! + + """ + The field to order milestones by. + """ + field: MilestoneOrderField! +} + +""" +Properties by which milestone connections can be ordered. +""" +enum MilestoneOrderField { + """ + Order milestones by when they were created. + """ + CREATED_AT + + """ + Order milestones by when they are due. + """ + DUE_DATE + + """ + Order milestones by their number. + """ + NUMBER + + """ + Order milestones by when they were last updated. + """ + UPDATED_AT +} + +""" +The possible states of a milestone. +""" +enum MilestoneState { + """ + A milestone that has been closed. + """ + CLOSED + + """ + A milestone that is still open. + """ + OPEN +} + +""" +Represents a 'milestoned' event on a given issue or pull request. +""" +type MilestonedEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! + + """ + Identifies the milestone title associated with the 'milestoned' event. + """ + milestoneTitle: String! + + """ + Object referenced by event. + """ + subject: MilestoneItem! +} + +""" +Entities that can be minimized. +""" +interface Minimizable { + """ + Returns whether or not a comment has been minimized. + """ + isMinimized: Boolean! + + """ + Returns why the comment was minimized. + """ + minimizedReason: String + + """ + Check if the current viewer can minimize this object. + """ + viewerCanMinimize: Boolean! +} + +""" +Autogenerated input type of MinimizeComment +""" +input MinimizeCommentInput { + """ + The classification of comment + """ + classifier: ReportedContentClassifiers! + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The Node ID of the subject to modify. + """ + subjectId: ID! @possibleTypes(concreteTypes: ["CommitComment", "GistComment", "IssueComment", "PullRequestReviewComment"], abstractType: "Minimizable") +} + +""" +Autogenerated return type of MinimizeComment +""" +type MinimizeCommentPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The comment that was minimized. + """ + minimizedComment: Minimizable +} + +""" +Autogenerated input type of MoveProjectCard +""" +input MoveProjectCardInput { + """ + Place the new card after the card with this id. Pass null to place it at the top. + """ + afterCardId: ID @possibleTypes(concreteTypes: ["ProjectCard"]) + + """ + The id of the card to move. + """ + cardId: ID! @possibleTypes(concreteTypes: ["ProjectCard"]) + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The id of the column to move it into. + """ + columnId: ID! @possibleTypes(concreteTypes: ["ProjectColumn"]) +} + +""" +Autogenerated return type of MoveProjectCard +""" +type MoveProjectCardPayload { + """ + The new edge of the moved card. + """ + cardEdge: ProjectCardEdge + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String +} + +""" +Autogenerated input type of MoveProjectColumn +""" +input MoveProjectColumnInput { + """ + Place the new column after the column with this id. Pass null to place it at the front. + """ + afterColumnId: ID @possibleTypes(concreteTypes: ["ProjectColumn"]) + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The id of the column to move. + """ + columnId: ID! @possibleTypes(concreteTypes: ["ProjectColumn"]) +} + +""" +Autogenerated return type of MoveProjectColumn +""" +type MoveProjectColumnPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The new edge of the moved column. + """ + columnEdge: ProjectColumnEdge +} + +""" +Represents a 'moved_columns_in_project' event on a given issue or pull request. +""" +type MovedColumnsInProjectEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + id: ID! + + """ + Column name the issue or pull request was moved from. + """ + previousProjectColumnName: String! @preview(toggledBy: "starfox-preview") + + """ + Project referenced by event. + """ + project: Project @preview(toggledBy: "starfox-preview") + + """ + Project card referenced by this project event. + """ + projectCard: ProjectCard @preview(toggledBy: "starfox-preview") + + """ + Column name the issue or pull request was moved to. + """ + projectColumnName: String! @preview(toggledBy: "starfox-preview") +} + +""" +The root query for implementing GraphQL mutations. +""" +type Mutation { + """ + Accepts a pending invitation for a user to become an administrator of an enterprise. + """ + acceptEnterpriseAdministratorInvitation( + """ + Parameters for AcceptEnterpriseAdministratorInvitation + """ + input: AcceptEnterpriseAdministratorInvitationInput! + ): AcceptEnterpriseAdministratorInvitationPayload + + """ + Applies a suggested topic to the repository. + """ + acceptTopicSuggestion( + """ + Parameters for AcceptTopicSuggestion + """ + input: AcceptTopicSuggestionInput! + ): AcceptTopicSuggestionPayload + + """ + Adds assignees to an assignable object. + """ + addAssigneesToAssignable( + """ + Parameters for AddAssigneesToAssignable + """ + input: AddAssigneesToAssignableInput! + ): AddAssigneesToAssignablePayload + + """ + Adds a comment to an Issue or Pull Request. + """ + addComment( + """ + Parameters for AddComment + """ + input: AddCommentInput! + ): AddCommentPayload + + """ + Adds a support entitlement to an enterprise member. + """ + addEnterpriseSupportEntitlement( + """ + Parameters for AddEnterpriseSupportEntitlement + """ + input: AddEnterpriseSupportEntitlementInput! + ): AddEnterpriseSupportEntitlementPayload + + """ + Adds labels to a labelable object. + """ + addLabelsToLabelable( + """ + Parameters for AddLabelsToLabelable + """ + input: AddLabelsToLabelableInput! + ): AddLabelsToLabelablePayload + + """ + Adds a card to a ProjectColumn. Either `contentId` or `note` must be provided but **not** both. + """ + addProjectCard( + """ + Parameters for AddProjectCard + """ + input: AddProjectCardInput! + ): AddProjectCardPayload + + """ + Adds a column to a Project. + """ + addProjectColumn( + """ + Parameters for AddProjectColumn + """ + input: AddProjectColumnInput! + ): AddProjectColumnPayload + + """ + Adds a review to a Pull Request. + """ + addPullRequestReview( + """ + Parameters for AddPullRequestReview + """ + input: AddPullRequestReviewInput! + ): AddPullRequestReviewPayload + + """ + Adds a comment to a review. + """ + addPullRequestReviewComment( + """ + Parameters for AddPullRequestReviewComment + """ + input: AddPullRequestReviewCommentInput! + ): AddPullRequestReviewCommentPayload + + """ + Adds a new thread to a pending Pull Request Review. + """ + addPullRequestReviewThread( + """ + Parameters for AddPullRequestReviewThread + """ + input: AddPullRequestReviewThreadInput! + ): AddPullRequestReviewThreadPayload + + """ + Adds a reaction to a subject. + """ + addReaction( + """ + Parameters for AddReaction + """ + input: AddReactionInput! + ): AddReactionPayload + + """ + Adds a star to a Starrable. + """ + addStar( + """ + Parameters for AddStar + """ + input: AddStarInput! + ): AddStarPayload + + """ + Adds a verifiable domain to an owning account. + """ + addVerifiableDomain( + """ + Parameters for AddVerifiableDomain + """ + input: AddVerifiableDomainInput! + ): AddVerifiableDomainPayload + + """ + Approve a verifiable domain for notification delivery. + """ + approveVerifiableDomain( + """ + Parameters for ApproveVerifiableDomain + """ + input: ApproveVerifiableDomainInput! + ): ApproveVerifiableDomainPayload + + """ + Marks a repository as archived. + """ + archiveRepository( + """ + Parameters for ArchiveRepository + """ + input: ArchiveRepositoryInput! + ): ArchiveRepositoryPayload + + """ + Cancels a pending invitation for an administrator to join an enterprise. + """ + cancelEnterpriseAdminInvitation( + """ + Parameters for CancelEnterpriseAdminInvitation + """ + input: CancelEnterpriseAdminInvitationInput! + ): CancelEnterpriseAdminInvitationPayload + + """ + Update your status on GitHub. + """ + changeUserStatus( + """ + Parameters for ChangeUserStatus + """ + input: ChangeUserStatusInput! + ): ChangeUserStatusPayload + + """ + Clears all labels from a labelable object. + """ + clearLabelsFromLabelable( + """ + Parameters for ClearLabelsFromLabelable + """ + input: ClearLabelsFromLabelableInput! + ): ClearLabelsFromLabelablePayload + + """ + Creates a new project by cloning configuration from an existing project. + """ + cloneProject( + """ + Parameters for CloneProject + """ + input: CloneProjectInput! + ): CloneProjectPayload + + """ + Create a new repository with the same files and directory structure as a template repository. + """ + cloneTemplateRepository( + """ + Parameters for CloneTemplateRepository + """ + input: CloneTemplateRepositoryInput! + ): CloneTemplateRepositoryPayload + + """ + Close an issue. + """ + closeIssue( + """ + Parameters for CloseIssue + """ + input: CloseIssueInput! + ): CloseIssuePayload + + """ + Close a pull request. + """ + closePullRequest( + """ + Parameters for ClosePullRequest + """ + input: ClosePullRequestInput! + ): ClosePullRequestPayload + + """ + Convert a project note card to one associated with a newly created issue. + """ + convertProjectCardNoteToIssue( + """ + Parameters for ConvertProjectCardNoteToIssue + """ + input: ConvertProjectCardNoteToIssueInput! + ): ConvertProjectCardNoteToIssuePayload + + """ + Create a new branch protection rule + """ + createBranchProtectionRule( + """ + Parameters for CreateBranchProtectionRule + """ + input: CreateBranchProtectionRuleInput! + ): CreateBranchProtectionRulePayload + + """ + Create a check run. + """ + createCheckRun( + """ + Parameters for CreateCheckRun + """ + input: CreateCheckRunInput! + ): CreateCheckRunPayload + + """ + Create a check suite + """ + createCheckSuite( + """ + Parameters for CreateCheckSuite + """ + input: CreateCheckSuiteInput! + ): CreateCheckSuitePayload + + """ + Create a content attachment. + """ + createContentAttachment( + """ + Parameters for CreateContentAttachment + """ + input: CreateContentAttachmentInput! + ): CreateContentAttachmentPayload @preview(toggledBy: "corsair-preview") + + """ + Creates a new deployment event. + """ + createDeployment( + """ + Parameters for CreateDeployment + """ + input: CreateDeploymentInput! + ): CreateDeploymentPayload @preview(toggledBy: "flash-preview") + + """ + Create a deployment status. + """ + createDeploymentStatus( + """ + Parameters for CreateDeploymentStatus + """ + input: CreateDeploymentStatusInput! + ): CreateDeploymentStatusPayload @preview(toggledBy: "flash-preview") + + """ + Creates an organization as part of an enterprise account. + """ + createEnterpriseOrganization( + """ + Parameters for CreateEnterpriseOrganization + """ + input: CreateEnterpriseOrganizationInput! + ): CreateEnterpriseOrganizationPayload + + """ + Creates a new IP allow list entry. + """ + createIpAllowListEntry( + """ + Parameters for CreateIpAllowListEntry + """ + input: CreateIpAllowListEntryInput! + ): CreateIpAllowListEntryPayload + + """ + Creates a new issue. + """ + createIssue( + """ + Parameters for CreateIssue + """ + input: CreateIssueInput! + ): CreateIssuePayload + + """ + Creates a new label. + """ + createLabel( + """ + Parameters for CreateLabel + """ + input: CreateLabelInput! + ): CreateLabelPayload @preview(toggledBy: "bane-preview") + + """ + Creates a new project. + """ + createProject( + """ + Parameters for CreateProject + """ + input: CreateProjectInput! + ): CreateProjectPayload + + """ + Create a new pull request + """ + createPullRequest( + """ + Parameters for CreatePullRequest + """ + input: CreatePullRequestInput! + ): CreatePullRequestPayload + + """ + Create a new Git Ref. + """ + createRef( + """ + Parameters for CreateRef + """ + input: CreateRefInput! + ): CreateRefPayload + + """ + Create a new repository. + """ + createRepository( + """ + Parameters for CreateRepository + """ + input: CreateRepositoryInput! + ): CreateRepositoryPayload + + """ + Creates a new team discussion. + """ + createTeamDiscussion( + """ + Parameters for CreateTeamDiscussion + """ + input: CreateTeamDiscussionInput! + ): CreateTeamDiscussionPayload + + """ + Creates a new team discussion comment. + """ + createTeamDiscussionComment( + """ + Parameters for CreateTeamDiscussionComment + """ + input: CreateTeamDiscussionCommentInput! + ): CreateTeamDiscussionCommentPayload + + """ + Rejects a suggested topic for the repository. + """ + declineTopicSuggestion( + """ + Parameters for DeclineTopicSuggestion + """ + input: DeclineTopicSuggestionInput! + ): DeclineTopicSuggestionPayload + + """ + Delete a branch protection rule + """ + deleteBranchProtectionRule( + """ + Parameters for DeleteBranchProtectionRule + """ + input: DeleteBranchProtectionRuleInput! + ): DeleteBranchProtectionRulePayload + + """ + Deletes a deployment. + """ + deleteDeployment( + """ + Parameters for DeleteDeployment + """ + input: DeleteDeploymentInput! + ): DeleteDeploymentPayload + + """ + Deletes an IP allow list entry. + """ + deleteIpAllowListEntry( + """ + Parameters for DeleteIpAllowListEntry + """ + input: DeleteIpAllowListEntryInput! + ): DeleteIpAllowListEntryPayload + + """ + Deletes an Issue object. + """ + deleteIssue( + """ + Parameters for DeleteIssue + """ + input: DeleteIssueInput! + ): DeleteIssuePayload + + """ + Deletes an IssueComment object. + """ + deleteIssueComment( + """ + Parameters for DeleteIssueComment + """ + input: DeleteIssueCommentInput! + ): DeleteIssueCommentPayload + + """ + Deletes a label. + """ + deleteLabel( + """ + Parameters for DeleteLabel + """ + input: DeleteLabelInput! + ): DeleteLabelPayload @preview(toggledBy: "bane-preview") + + """ + Delete a package version. + """ + deletePackageVersion( + """ + Parameters for DeletePackageVersion + """ + input: DeletePackageVersionInput! + ): DeletePackageVersionPayload @preview(toggledBy: "package-deletes-preview") + + """ + Deletes a project. + """ + deleteProject( + """ + Parameters for DeleteProject + """ + input: DeleteProjectInput! + ): DeleteProjectPayload + + """ + Deletes a project card. + """ + deleteProjectCard( + """ + Parameters for DeleteProjectCard + """ + input: DeleteProjectCardInput! + ): DeleteProjectCardPayload + + """ + Deletes a project column. + """ + deleteProjectColumn( + """ + Parameters for DeleteProjectColumn + """ + input: DeleteProjectColumnInput! + ): DeleteProjectColumnPayload + + """ + Deletes a pull request review. + """ + deletePullRequestReview( + """ + Parameters for DeletePullRequestReview + """ + input: DeletePullRequestReviewInput! + ): DeletePullRequestReviewPayload + + """ + Deletes a pull request review comment. + """ + deletePullRequestReviewComment( + """ + Parameters for DeletePullRequestReviewComment + """ + input: DeletePullRequestReviewCommentInput! + ): DeletePullRequestReviewCommentPayload + + """ + Delete a Git Ref. + """ + deleteRef( + """ + Parameters for DeleteRef + """ + input: DeleteRefInput! + ): DeleteRefPayload + + """ + Deletes a team discussion. + """ + deleteTeamDiscussion( + """ + Parameters for DeleteTeamDiscussion + """ + input: DeleteTeamDiscussionInput! + ): DeleteTeamDiscussionPayload + + """ + Deletes a team discussion comment. + """ + deleteTeamDiscussionComment( + """ + Parameters for DeleteTeamDiscussionComment + """ + input: DeleteTeamDiscussionCommentInput! + ): DeleteTeamDiscussionCommentPayload + + """ + Deletes a verifiable domain. + """ + deleteVerifiableDomain( + """ + Parameters for DeleteVerifiableDomain + """ + input: DeleteVerifiableDomainInput! + ): DeleteVerifiableDomainPayload + + """ + Disable auto merge on the given pull request + """ + disablePullRequestAutoMerge( + """ + Parameters for DisablePullRequestAutoMerge + """ + input: DisablePullRequestAutoMergeInput! + ): DisablePullRequestAutoMergePayload + + """ + Dismisses an approved or rejected pull request review. + """ + dismissPullRequestReview( + """ + Parameters for DismissPullRequestReview + """ + input: DismissPullRequestReviewInput! + ): DismissPullRequestReviewPayload + + """ + Enable the default auto-merge on a pull request. + """ + enablePullRequestAutoMerge( + """ + Parameters for EnablePullRequestAutoMerge + """ + input: EnablePullRequestAutoMergeInput! + ): EnablePullRequestAutoMergePayload + + """ + Follow a user. + """ + followUser( + """ + Parameters for FollowUser + """ + input: FollowUserInput! + ): FollowUserPayload + + """ + Creates a new project by importing columns and a list of issues/PRs. + """ + importProject( + """ + Parameters for ImportProject + """ + input: ImportProjectInput! + ): ImportProjectPayload @preview(toggledBy: "slothette-preview") + + """ + Invite someone to become an administrator of the enterprise. + """ + inviteEnterpriseAdmin( + """ + Parameters for InviteEnterpriseAdmin + """ + input: InviteEnterpriseAdminInput! + ): InviteEnterpriseAdminPayload + + """ + Creates a repository link for a project. + """ + linkRepositoryToProject( + """ + Parameters for LinkRepositoryToProject + """ + input: LinkRepositoryToProjectInput! + ): LinkRepositoryToProjectPayload + + """ + Lock a lockable object + """ + lockLockable( + """ + Parameters for LockLockable + """ + input: LockLockableInput! + ): LockLockablePayload + + """ + Mark a pull request file as viewed + """ + markFileAsViewed( + """ + Parameters for MarkFileAsViewed + """ + input: MarkFileAsViewedInput! + ): MarkFileAsViewedPayload + + """ + Marks a pull request ready for review. + """ + markPullRequestReadyForReview( + """ + Parameters for MarkPullRequestReadyForReview + """ + input: MarkPullRequestReadyForReviewInput! + ): MarkPullRequestReadyForReviewPayload + + """ + Merge a head into a branch. + """ + mergeBranch( + """ + Parameters for MergeBranch + """ + input: MergeBranchInput! + ): MergeBranchPayload + + """ + Merge a pull request. + """ + mergePullRequest( + """ + Parameters for MergePullRequest + """ + input: MergePullRequestInput! + ): MergePullRequestPayload + + """ + Minimizes a comment on an Issue, Commit, Pull Request, or Gist + """ + minimizeComment( + """ + Parameters for MinimizeComment + """ + input: MinimizeCommentInput! + ): MinimizeCommentPayload + + """ + Moves a project card to another place. + """ + moveProjectCard( + """ + Parameters for MoveProjectCard + """ + input: MoveProjectCardInput! + ): MoveProjectCardPayload + + """ + Moves a project column to another place. + """ + moveProjectColumn( + """ + Parameters for MoveProjectColumn + """ + input: MoveProjectColumnInput! + ): MoveProjectColumnPayload + + """ + Pin an issue to a repository + """ + pinIssue( + """ + Parameters for PinIssue + """ + input: PinIssueInput! + ): PinIssuePayload + + """ + Regenerates the identity provider recovery codes for an enterprise + """ + regenerateEnterpriseIdentityProviderRecoveryCodes( + """ + Parameters for RegenerateEnterpriseIdentityProviderRecoveryCodes + """ + input: RegenerateEnterpriseIdentityProviderRecoveryCodesInput! + ): RegenerateEnterpriseIdentityProviderRecoveryCodesPayload + + """ + Regenerates a verifiable domain's verification token. + """ + regenerateVerifiableDomainToken( + """ + Parameters for RegenerateVerifiableDomainToken + """ + input: RegenerateVerifiableDomainTokenInput! + ): RegenerateVerifiableDomainTokenPayload + + """ + Removes assignees from an assignable object. + """ + removeAssigneesFromAssignable( + """ + Parameters for RemoveAssigneesFromAssignable + """ + input: RemoveAssigneesFromAssignableInput! + ): RemoveAssigneesFromAssignablePayload + + """ + Removes an administrator from the enterprise. + """ + removeEnterpriseAdmin( + """ + Parameters for RemoveEnterpriseAdmin + """ + input: RemoveEnterpriseAdminInput! + ): RemoveEnterpriseAdminPayload + + """ + Removes the identity provider from an enterprise + """ + removeEnterpriseIdentityProvider( + """ + Parameters for RemoveEnterpriseIdentityProvider + """ + input: RemoveEnterpriseIdentityProviderInput! + ): RemoveEnterpriseIdentityProviderPayload + + """ + Removes an organization from the enterprise + """ + removeEnterpriseOrganization( + """ + Parameters for RemoveEnterpriseOrganization + """ + input: RemoveEnterpriseOrganizationInput! + ): RemoveEnterpriseOrganizationPayload + + """ + Removes a support entitlement from an enterprise member. + """ + removeEnterpriseSupportEntitlement( + """ + Parameters for RemoveEnterpriseSupportEntitlement + """ + input: RemoveEnterpriseSupportEntitlementInput! + ): RemoveEnterpriseSupportEntitlementPayload + + """ + Removes labels from a Labelable object. + """ + removeLabelsFromLabelable( + """ + Parameters for RemoveLabelsFromLabelable + """ + input: RemoveLabelsFromLabelableInput! + ): RemoveLabelsFromLabelablePayload + + """ + Removes outside collaborator from all repositories in an organization. + """ + removeOutsideCollaborator( + """ + Parameters for RemoveOutsideCollaborator + """ + input: RemoveOutsideCollaboratorInput! + ): RemoveOutsideCollaboratorPayload + + """ + Removes a reaction from a subject. + """ + removeReaction( + """ + Parameters for RemoveReaction + """ + input: RemoveReactionInput! + ): RemoveReactionPayload + + """ + Removes a star from a Starrable. + """ + removeStar( + """ + Parameters for RemoveStar + """ + input: RemoveStarInput! + ): RemoveStarPayload + + """ + Reopen a issue. + """ + reopenIssue( + """ + Parameters for ReopenIssue + """ + input: ReopenIssueInput! + ): ReopenIssuePayload + + """ + Reopen a pull request. + """ + reopenPullRequest( + """ + Parameters for ReopenPullRequest + """ + input: ReopenPullRequestInput! + ): ReopenPullRequestPayload + + """ + Set review requests on a pull request. + """ + requestReviews( + """ + Parameters for RequestReviews + """ + input: RequestReviewsInput! + ): RequestReviewsPayload + + """ + Rerequests an existing check suite. + """ + rerequestCheckSuite( + """ + Parameters for RerequestCheckSuite + """ + input: RerequestCheckSuiteInput! + ): RerequestCheckSuitePayload + + """ + Marks a review thread as resolved. + """ + resolveReviewThread( + """ + Parameters for ResolveReviewThread + """ + input: ResolveReviewThreadInput! + ): ResolveReviewThreadPayload + + """ + Creates or updates the identity provider for an enterprise. + """ + setEnterpriseIdentityProvider( + """ + Parameters for SetEnterpriseIdentityProvider + """ + input: SetEnterpriseIdentityProviderInput! + ): SetEnterpriseIdentityProviderPayload + + """ + Set an organization level interaction limit for an organization's public repositories. + """ + setOrganizationInteractionLimit( + """ + Parameters for SetOrganizationInteractionLimit + """ + input: SetOrganizationInteractionLimitInput! + ): SetOrganizationInteractionLimitPayload + + """ + Sets an interaction limit setting for a repository. + """ + setRepositoryInteractionLimit( + """ + Parameters for SetRepositoryInteractionLimit + """ + input: SetRepositoryInteractionLimitInput! + ): SetRepositoryInteractionLimitPayload + + """ + Set a user level interaction limit for an user's public repositories. + """ + setUserInteractionLimit( + """ + Parameters for SetUserInteractionLimit + """ + input: SetUserInteractionLimitInput! + ): SetUserInteractionLimitPayload + + """ + Submits a pending pull request review. + """ + submitPullRequestReview( + """ + Parameters for SubmitPullRequestReview + """ + input: SubmitPullRequestReviewInput! + ): SubmitPullRequestReviewPayload + + """ + Transfer an issue to a different repository + """ + transferIssue( + """ + Parameters for TransferIssue + """ + input: TransferIssueInput! + ): TransferIssuePayload + + """ + Unarchives a repository. + """ + unarchiveRepository( + """ + Parameters for UnarchiveRepository + """ + input: UnarchiveRepositoryInput! + ): UnarchiveRepositoryPayload + + """ + Unfollow a user. + """ + unfollowUser( + """ + Parameters for UnfollowUser + """ + input: UnfollowUserInput! + ): UnfollowUserPayload + + """ + Deletes a repository link from a project. + """ + unlinkRepositoryFromProject( + """ + Parameters for UnlinkRepositoryFromProject + """ + input: UnlinkRepositoryFromProjectInput! + ): UnlinkRepositoryFromProjectPayload + + """ + Unlock a lockable object + """ + unlockLockable( + """ + Parameters for UnlockLockable + """ + input: UnlockLockableInput! + ): UnlockLockablePayload + + """ + Unmark a pull request file as viewed + """ + unmarkFileAsViewed( + """ + Parameters for UnmarkFileAsViewed + """ + input: UnmarkFileAsViewedInput! + ): UnmarkFileAsViewedPayload + + """ + Unmark an issue as a duplicate of another issue. + """ + unmarkIssueAsDuplicate( + """ + Parameters for UnmarkIssueAsDuplicate + """ + input: UnmarkIssueAsDuplicateInput! + ): UnmarkIssueAsDuplicatePayload + + """ + Unminimizes a comment on an Issue, Commit, Pull Request, or Gist + """ + unminimizeComment( + """ + Parameters for UnminimizeComment + """ + input: UnminimizeCommentInput! + ): UnminimizeCommentPayload + + """ + Unpin a pinned issue from a repository + """ + unpinIssue( + """ + Parameters for UnpinIssue + """ + input: UnpinIssueInput! + ): UnpinIssuePayload + + """ + Marks a review thread as unresolved. + """ + unresolveReviewThread( + """ + Parameters for UnresolveReviewThread + """ + input: UnresolveReviewThreadInput! + ): UnresolveReviewThreadPayload + + """ + Create a new branch protection rule + """ + updateBranchProtectionRule( + """ + Parameters for UpdateBranchProtectionRule + """ + input: UpdateBranchProtectionRuleInput! + ): UpdateBranchProtectionRulePayload + + """ + Update a check run + """ + updateCheckRun( + """ + Parameters for UpdateCheckRun + """ + input: UpdateCheckRunInput! + ): UpdateCheckRunPayload + + """ + Modifies the settings of an existing check suite + """ + updateCheckSuitePreferences( + """ + Parameters for UpdateCheckSuitePreferences + """ + input: UpdateCheckSuitePreferencesInput! + ): UpdateCheckSuitePreferencesPayload + + """ + Updates the role of an enterprise administrator. + """ + updateEnterpriseAdministratorRole( + """ + Parameters for UpdateEnterpriseAdministratorRole + """ + input: UpdateEnterpriseAdministratorRoleInput! + ): UpdateEnterpriseAdministratorRolePayload + + """ + Sets whether private repository forks are enabled for an enterprise. + """ + updateEnterpriseAllowPrivateRepositoryForkingSetting( + """ + Parameters for UpdateEnterpriseAllowPrivateRepositoryForkingSetting + """ + input: UpdateEnterpriseAllowPrivateRepositoryForkingSettingInput! + ): UpdateEnterpriseAllowPrivateRepositoryForkingSettingPayload + + """ + Sets the default repository permission for organizations in an enterprise. + """ + updateEnterpriseDefaultRepositoryPermissionSetting( + """ + Parameters for UpdateEnterpriseDefaultRepositoryPermissionSetting + """ + input: UpdateEnterpriseDefaultRepositoryPermissionSettingInput! + ): UpdateEnterpriseDefaultRepositoryPermissionSettingPayload + + """ + Sets whether organization members with admin permissions on a repository can change repository visibility. + """ + updateEnterpriseMembersCanChangeRepositoryVisibilitySetting( + """ + Parameters for UpdateEnterpriseMembersCanChangeRepositoryVisibilitySetting + """ + input: UpdateEnterpriseMembersCanChangeRepositoryVisibilitySettingInput! + ): UpdateEnterpriseMembersCanChangeRepositoryVisibilitySettingPayload + + """ + Sets the members can create repositories setting for an enterprise. + """ + updateEnterpriseMembersCanCreateRepositoriesSetting( + """ + Parameters for UpdateEnterpriseMembersCanCreateRepositoriesSetting + """ + input: UpdateEnterpriseMembersCanCreateRepositoriesSettingInput! + ): UpdateEnterpriseMembersCanCreateRepositoriesSettingPayload + + """ + Sets the members can delete issues setting for an enterprise. + """ + updateEnterpriseMembersCanDeleteIssuesSetting( + """ + Parameters for UpdateEnterpriseMembersCanDeleteIssuesSetting + """ + input: UpdateEnterpriseMembersCanDeleteIssuesSettingInput! + ): UpdateEnterpriseMembersCanDeleteIssuesSettingPayload + + """ + Sets the members can delete repositories setting for an enterprise. + """ + updateEnterpriseMembersCanDeleteRepositoriesSetting( + """ + Parameters for UpdateEnterpriseMembersCanDeleteRepositoriesSetting + """ + input: UpdateEnterpriseMembersCanDeleteRepositoriesSettingInput! + ): UpdateEnterpriseMembersCanDeleteRepositoriesSettingPayload + + """ + Sets whether members can invite collaborators are enabled for an enterprise. + """ + updateEnterpriseMembersCanInviteCollaboratorsSetting( + """ + Parameters for UpdateEnterpriseMembersCanInviteCollaboratorsSetting + """ + input: UpdateEnterpriseMembersCanInviteCollaboratorsSettingInput! + ): UpdateEnterpriseMembersCanInviteCollaboratorsSettingPayload + + """ + Sets whether or not an organization admin can make purchases. + """ + updateEnterpriseMembersCanMakePurchasesSetting( + """ + Parameters for UpdateEnterpriseMembersCanMakePurchasesSetting + """ + input: UpdateEnterpriseMembersCanMakePurchasesSettingInput! + ): UpdateEnterpriseMembersCanMakePurchasesSettingPayload + + """ + Sets the members can update protected branches setting for an enterprise. + """ + updateEnterpriseMembersCanUpdateProtectedBranchesSetting( + """ + Parameters for UpdateEnterpriseMembersCanUpdateProtectedBranchesSetting + """ + input: UpdateEnterpriseMembersCanUpdateProtectedBranchesSettingInput! + ): UpdateEnterpriseMembersCanUpdateProtectedBranchesSettingPayload + + """ + Sets the members can view dependency insights for an enterprise. + """ + updateEnterpriseMembersCanViewDependencyInsightsSetting( + """ + Parameters for UpdateEnterpriseMembersCanViewDependencyInsightsSetting + """ + input: UpdateEnterpriseMembersCanViewDependencyInsightsSettingInput! + ): UpdateEnterpriseMembersCanViewDependencyInsightsSettingPayload + + """ + Sets whether organization projects are enabled for an enterprise. + """ + updateEnterpriseOrganizationProjectsSetting( + """ + Parameters for UpdateEnterpriseOrganizationProjectsSetting + """ + input: UpdateEnterpriseOrganizationProjectsSettingInput! + ): UpdateEnterpriseOrganizationProjectsSettingPayload + + """ + Updates an enterprise's profile. + """ + updateEnterpriseProfile( + """ + Parameters for UpdateEnterpriseProfile + """ + input: UpdateEnterpriseProfileInput! + ): UpdateEnterpriseProfilePayload + + """ + Sets whether repository projects are enabled for a enterprise. + """ + updateEnterpriseRepositoryProjectsSetting( + """ + Parameters for UpdateEnterpriseRepositoryProjectsSetting + """ + input: UpdateEnterpriseRepositoryProjectsSettingInput! + ): UpdateEnterpriseRepositoryProjectsSettingPayload + + """ + Sets whether team discussions are enabled for an enterprise. + """ + updateEnterpriseTeamDiscussionsSetting( + """ + Parameters for UpdateEnterpriseTeamDiscussionsSetting + """ + input: UpdateEnterpriseTeamDiscussionsSettingInput! + ): UpdateEnterpriseTeamDiscussionsSettingPayload + + """ + Sets whether two factor authentication is required for all users in an enterprise. + """ + updateEnterpriseTwoFactorAuthenticationRequiredSetting( + """ + Parameters for UpdateEnterpriseTwoFactorAuthenticationRequiredSetting + """ + input: UpdateEnterpriseTwoFactorAuthenticationRequiredSettingInput! + ): UpdateEnterpriseTwoFactorAuthenticationRequiredSettingPayload + + """ + Sets whether an IP allow list is enabled on an owner. + """ + updateIpAllowListEnabledSetting( + """ + Parameters for UpdateIpAllowListEnabledSetting + """ + input: UpdateIpAllowListEnabledSettingInput! + ): UpdateIpAllowListEnabledSettingPayload + + """ + Updates an IP allow list entry. + """ + updateIpAllowListEntry( + """ + Parameters for UpdateIpAllowListEntry + """ + input: UpdateIpAllowListEntryInput! + ): UpdateIpAllowListEntryPayload + + """ + Updates an Issue. + """ + updateIssue( + """ + Parameters for UpdateIssue + """ + input: UpdateIssueInput! + ): UpdateIssuePayload + + """ + Updates an IssueComment object. + """ + updateIssueComment( + """ + Parameters for UpdateIssueComment + """ + input: UpdateIssueCommentInput! + ): UpdateIssueCommentPayload + + """ + Updates an existing label. + """ + updateLabel( + """ + Parameters for UpdateLabel + """ + input: UpdateLabelInput! + ): UpdateLabelPayload @preview(toggledBy: "bane-preview") + + """ + Update the setting to restrict notifications to only verified domains available to an owner. + """ + updateNotificationRestrictionSetting( + """ + Parameters for UpdateNotificationRestrictionSetting + """ + input: UpdateNotificationRestrictionSettingInput! + ): UpdateNotificationRestrictionSettingPayload + + """ + Updates an existing project. + """ + updateProject( + """ + Parameters for UpdateProject + """ + input: UpdateProjectInput! + ): UpdateProjectPayload + + """ + Updates an existing project card. + """ + updateProjectCard( + """ + Parameters for UpdateProjectCard + """ + input: UpdateProjectCardInput! + ): UpdateProjectCardPayload + + """ + Updates an existing project column. + """ + updateProjectColumn( + """ + Parameters for UpdateProjectColumn + """ + input: UpdateProjectColumnInput! + ): UpdateProjectColumnPayload + + """ + Update a pull request + """ + updatePullRequest( + """ + Parameters for UpdatePullRequest + """ + input: UpdatePullRequestInput! + ): UpdatePullRequestPayload + + """ + Updates the body of a pull request review. + """ + updatePullRequestReview( + """ + Parameters for UpdatePullRequestReview + """ + input: UpdatePullRequestReviewInput! + ): UpdatePullRequestReviewPayload + + """ + Updates a pull request review comment. + """ + updatePullRequestReviewComment( + """ + Parameters for UpdatePullRequestReviewComment + """ + input: UpdatePullRequestReviewCommentInput! + ): UpdatePullRequestReviewCommentPayload + + """ + Update a Git Ref. + """ + updateRef( + """ + Parameters for UpdateRef + """ + input: UpdateRefInput! + ): UpdateRefPayload + + """ + Creates, updates and/or deletes multiple refs in a repository. + + This mutation takes a list of `RefUpdate`s and performs these updates + on the repository. All updates are performed atomically, meaning that + if one of them is rejected, no other ref will be modified. + + `RefUpdate.beforeOid` specifies that the given reference needs to point + to the given value before performing any updates. A value of + `0000000000000000000000000000000000000000` can be used to verify that + the references should not exist. + + `RefUpdate.afterOid` specifies the value that the given reference + will point to after performing all updates. A value of + `0000000000000000000000000000000000000000` can be used to delete a + reference. + + If `RefUpdate.force` is set to `true`, a non-fast-forward updates + for the given reference will be allowed. + """ + updateRefs( + """ + Parameters for UpdateRefs + """ + input: UpdateRefsInput! + ): UpdateRefsPayload @preview(toggledBy: "update-refs-preview") + + """ + Update information about a repository. + """ + updateRepository( + """ + Parameters for UpdateRepository + """ + input: UpdateRepositoryInput! + ): UpdateRepositoryPayload + + """ + Updates the state for subscribable subjects. + """ + updateSubscription( + """ + Parameters for UpdateSubscription + """ + input: UpdateSubscriptionInput! + ): UpdateSubscriptionPayload + + """ + Updates a team discussion. + """ + updateTeamDiscussion( + """ + Parameters for UpdateTeamDiscussion + """ + input: UpdateTeamDiscussionInput! + ): UpdateTeamDiscussionPayload + + """ + Updates a discussion comment. + """ + updateTeamDiscussionComment( + """ + Parameters for UpdateTeamDiscussionComment + """ + input: UpdateTeamDiscussionCommentInput! + ): UpdateTeamDiscussionCommentPayload + + """ + Updates team review assignment. + """ + updateTeamReviewAssignment( + """ + Parameters for UpdateTeamReviewAssignment + """ + input: UpdateTeamReviewAssignmentInput! + ): UpdateTeamReviewAssignmentPayload @preview(toggledBy: "stone-crop-preview") + + """ + Replaces the repository's topics with the given topics. + """ + updateTopics( + """ + Parameters for UpdateTopics + """ + input: UpdateTopicsInput! + ): UpdateTopicsPayload + + """ + Verify that a verifiable domain has the expected DNS record. + """ + verifyVerifiableDomain( + """ + Parameters for VerifyVerifiableDomain + """ + input: VerifyVerifiableDomainInput! + ): VerifyVerifiableDomainPayload +} + +""" +An object with an ID. +""" +interface Node { + """ + ID of the object. + """ + id: ID! +} + +""" +The possible values for the notification restriction setting. +""" +enum NotificationRestrictionSettingValue { + """ + The setting is disabled for the owner. + """ + DISABLED + + """ + The setting is enabled for the owner. + """ + ENABLED +} + +""" +Metadata for an audit entry with action oauth_application.* +""" +interface OauthApplicationAuditEntryData { + """ + The name of the OAuth Application. + """ + oauthApplicationName: String + + """ + The HTTP path for the OAuth Application + """ + oauthApplicationResourcePath: URI + + """ + The HTTP URL for the OAuth Application + """ + oauthApplicationUrl: URI +} + +""" +Audit log entry for a oauth_application.create event. +""" +type OauthApplicationCreateAuditEntry implements AuditEntry & Node & OauthApplicationAuditEntryData & OrganizationAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The application URL of the OAuth Application. + """ + applicationUrl: URI + + """ + The callback URL of the OAuth Application. + """ + callbackUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The name of the OAuth Application. + """ + oauthApplicationName: String + + """ + The HTTP path for the OAuth Application + """ + oauthApplicationResourcePath: URI + + """ + The HTTP URL for the OAuth Application + """ + oauthApplicationUrl: URI + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The rate limit of the OAuth Application. + """ + rateLimit: Int + + """ + The state of the OAuth Application. + """ + state: OauthApplicationCreateAuditEntryState + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +The state of an OAuth Application when it was created. +""" +enum OauthApplicationCreateAuditEntryState { + """ + The OAuth Application was active and allowed to have OAuth Accesses. + """ + ACTIVE + + """ + The OAuth Application was in the process of being deleted. + """ + PENDING_DELETION + + """ + The OAuth Application was suspended from generating OAuth Accesses due to abuse or security concerns. + """ + SUSPENDED +} + +""" +The corresponding operation type for the action +""" +enum OperationType { + """ + An existing resource was accessed + """ + ACCESS + + """ + A resource performed an authentication event + """ + AUTHENTICATION + + """ + A new resource was created + """ + CREATE + + """ + An existing resource was modified + """ + MODIFY + + """ + An existing resource was removed + """ + REMOVE + + """ + An existing resource was restored + """ + RESTORE + + """ + An existing resource was transferred between multiple resources + """ + TRANSFER +} + +""" +Possible directions in which to order a list of items when provided an `orderBy` argument. +""" +enum OrderDirection { + """ + Specifies an ascending order for a given `orderBy` argument. + """ + ASC + + """ + Specifies a descending order for a given `orderBy` argument. + """ + DESC +} + +""" +Audit log entry for a org.add_billing_manager +""" +type OrgAddBillingManagerAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The email address used to invite a billing manager for the organization. + """ + invitationEmail: String + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a org.add_member +""" +type OrgAddMemberAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The permission level of the member added to the organization. + """ + permission: OrgAddMemberAuditEntryPermission + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +The permissions available to members on an Organization. +""" +enum OrgAddMemberAuditEntryPermission { + """ + Can read, clone, push, and add collaborators to repositories. + """ + ADMIN + + """ + Can read and clone repositories. + """ + READ +} + +""" +Audit log entry for a org.block_user +""" +type OrgBlockUserAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The blocked user. + """ + blockedUser: User + + """ + The username of the blocked user. + """ + blockedUserName: String + + """ + The HTTP path for the blocked user. + """ + blockedUserResourcePath: URI + + """ + The HTTP URL for the blocked user. + """ + blockedUserUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a org.config.disable_collaborators_only event. +""" +type OrgConfigDisableCollaboratorsOnlyAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a org.config.enable_collaborators_only event. +""" +type OrgConfigEnableCollaboratorsOnlyAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a org.create event. +""" +type OrgCreateAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The billing plan for the Organization. + """ + billingPlan: OrgCreateAuditEntryBillingPlan + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +The billing plans available for organizations. +""" +enum OrgCreateAuditEntryBillingPlan { + """ + Team Plan + """ + BUSINESS + + """ + Enterprise Cloud Plan + """ + BUSINESS_PLUS + + """ + Free Plan + """ + FREE + + """ + Tiered Per Seat Plan + """ + TIERED_PER_SEAT + + """ + Legacy Unlimited Plan + """ + UNLIMITED +} + +""" +Audit log entry for a org.disable_oauth_app_restrictions event. +""" +type OrgDisableOauthAppRestrictionsAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a org.disable_saml event. +""" +type OrgDisableSamlAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + + """ + The SAML provider's digest algorithm URL. + """ + digestMethodUrl: URI + id: ID! + + """ + The SAML provider's issuer URL. + """ + issuerUrl: URI + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The SAML provider's signature algorithm URL. + """ + signatureMethodUrl: URI + + """ + The SAML provider's single sign-on URL. + """ + singleSignOnUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a org.disable_two_factor_requirement event. +""" +type OrgDisableTwoFactorRequirementAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a org.enable_oauth_app_restrictions event. +""" +type OrgEnableOauthAppRestrictionsAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a org.enable_saml event. +""" +type OrgEnableSamlAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + + """ + The SAML provider's digest algorithm URL. + """ + digestMethodUrl: URI + id: ID! + + """ + The SAML provider's issuer URL. + """ + issuerUrl: URI + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The SAML provider's signature algorithm URL. + """ + signatureMethodUrl: URI + + """ + The SAML provider's single sign-on URL. + """ + singleSignOnUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a org.enable_two_factor_requirement event. +""" +type OrgEnableTwoFactorRequirementAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a org.invite_member event. +""" +type OrgInviteMemberAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + + """ + The email address of the organization invitation. + """ + email: String + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The organization invitation. + """ + organizationInvitation: OrganizationInvitation + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a org.invite_to_business event. +""" +type OrgInviteToBusinessAuditEntry implements AuditEntry & EnterpriseAuditEntryData & Node & OrganizationAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + + """ + The HTTP path for this enterprise. + """ + enterpriseResourcePath: URI + + """ + The slug of the enterprise. + """ + enterpriseSlug: String + + """ + The HTTP URL for this enterprise. + """ + enterpriseUrl: URI + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a org.oauth_app_access_approved event. +""" +type OrgOauthAppAccessApprovedAuditEntry implements AuditEntry & Node & OauthApplicationAuditEntryData & OrganizationAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The name of the OAuth Application. + """ + oauthApplicationName: String + + """ + The HTTP path for the OAuth Application + """ + oauthApplicationResourcePath: URI + + """ + The HTTP URL for the OAuth Application + """ + oauthApplicationUrl: URI + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a org.oauth_app_access_denied event. +""" +type OrgOauthAppAccessDeniedAuditEntry implements AuditEntry & Node & OauthApplicationAuditEntryData & OrganizationAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The name of the OAuth Application. + """ + oauthApplicationName: String + + """ + The HTTP path for the OAuth Application + """ + oauthApplicationResourcePath: URI + + """ + The HTTP URL for the OAuth Application + """ + oauthApplicationUrl: URI + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a org.oauth_app_access_requested event. +""" +type OrgOauthAppAccessRequestedAuditEntry implements AuditEntry & Node & OauthApplicationAuditEntryData & OrganizationAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The name of the OAuth Application. + """ + oauthApplicationName: String + + """ + The HTTP path for the OAuth Application + """ + oauthApplicationResourcePath: URI + + """ + The HTTP URL for the OAuth Application + """ + oauthApplicationUrl: URI + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a org.remove_billing_manager event. +""" +type OrgRemoveBillingManagerAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The reason for the billing manager being removed. + """ + reason: OrgRemoveBillingManagerAuditEntryReason + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +The reason a billing manager was removed from an Organization. +""" +enum OrgRemoveBillingManagerAuditEntryReason { + """ + SAML external identity missing + """ + SAML_EXTERNAL_IDENTITY_MISSING + + """ + SAML SSO enforcement requires an external identity + """ + SAML_SSO_ENFORCEMENT_REQUIRES_EXTERNAL_IDENTITY + + """ + The organization required 2FA of its billing managers and this user did not have 2FA enabled. + """ + TWO_FACTOR_REQUIREMENT_NON_COMPLIANCE +} + +""" +Audit log entry for a org.remove_member event. +""" +type OrgRemoveMemberAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The types of membership the member has with the organization. + """ + membershipTypes: [OrgRemoveMemberAuditEntryMembershipType!] + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The reason for the member being removed. + """ + reason: OrgRemoveMemberAuditEntryReason + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +The type of membership a user has with an Organization. +""" +enum OrgRemoveMemberAuditEntryMembershipType { + """ + Organization administrators have full access and can change several settings, + including the names of repositories that belong to the Organization and Owners + team membership. In addition, organization admins can delete the organization + and all of its repositories. + """ + ADMIN + + """ + A billing manager is a user who manages the billing settings for the Organization, such as updating payment information. + """ + BILLING_MANAGER + + """ + A direct member is a user that is a member of the Organization. + """ + DIRECT_MEMBER + + """ + An outside collaborator is a person who isn't explicitly a member of the + Organization, but who has Read, Write, or Admin permissions to one or more + repositories in the organization. + """ + OUTSIDE_COLLABORATOR + + """ + An unaffiliated collaborator is a person who is not a member of the + Organization and does not have access to any repositories in the Organization. + """ + UNAFFILIATED +} + +""" +The reason a member was removed from an Organization. +""" +enum OrgRemoveMemberAuditEntryReason { + """ + SAML external identity missing + """ + SAML_EXTERNAL_IDENTITY_MISSING + + """ + SAML SSO enforcement requires an external identity + """ + SAML_SSO_ENFORCEMENT_REQUIRES_EXTERNAL_IDENTITY + + """ + User was removed from organization during account recovery + """ + TWO_FACTOR_ACCOUNT_RECOVERY + + """ + The organization required 2FA of its billing managers and this user did not have 2FA enabled. + """ + TWO_FACTOR_REQUIREMENT_NON_COMPLIANCE + + """ + User account has been deleted + """ + USER_ACCOUNT_DELETED +} + +""" +Audit log entry for a org.remove_outside_collaborator event. +""" +type OrgRemoveOutsideCollaboratorAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The types of membership the outside collaborator has with the organization. + """ + membershipTypes: [OrgRemoveOutsideCollaboratorAuditEntryMembershipType!] + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The reason for the outside collaborator being removed from the Organization. + """ + reason: OrgRemoveOutsideCollaboratorAuditEntryReason + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +The type of membership a user has with an Organization. +""" +enum OrgRemoveOutsideCollaboratorAuditEntryMembershipType { + """ + A billing manager is a user who manages the billing settings for the Organization, such as updating payment information. + """ + BILLING_MANAGER + + """ + An outside collaborator is a person who isn't explicitly a member of the + Organization, but who has Read, Write, or Admin permissions to one or more + repositories in the organization. + """ + OUTSIDE_COLLABORATOR + + """ + An unaffiliated collaborator is a person who is not a member of the + Organization and does not have access to any repositories in the organization. + """ + UNAFFILIATED +} + +""" +The reason an outside collaborator was removed from an Organization. +""" +enum OrgRemoveOutsideCollaboratorAuditEntryReason { + """ + SAML external identity missing + """ + SAML_EXTERNAL_IDENTITY_MISSING + + """ + The organization required 2FA of its billing managers and this user did not have 2FA enabled. + """ + TWO_FACTOR_REQUIREMENT_NON_COMPLIANCE +} + +""" +Audit log entry for a org.restore_member event. +""" +type OrgRestoreMemberAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The number of custom email routings for the restored member. + """ + restoredCustomEmailRoutingsCount: Int + + """ + The number of issue assignments for the restored member. + """ + restoredIssueAssignmentsCount: Int + + """ + Restored organization membership objects. + """ + restoredMemberships: [OrgRestoreMemberAuditEntryMembership!] + + """ + The number of restored memberships. + """ + restoredMembershipsCount: Int + + """ + The number of repositories of the restored member. + """ + restoredRepositoriesCount: Int + + """ + The number of starred repositories for the restored member. + """ + restoredRepositoryStarsCount: Int + + """ + The number of watched repositories for the restored member. + """ + restoredRepositoryWatchesCount: Int + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Types of memberships that can be restored for an Organization member. +""" +union OrgRestoreMemberAuditEntryMembership = OrgRestoreMemberMembershipOrganizationAuditEntryData | OrgRestoreMemberMembershipRepositoryAuditEntryData | OrgRestoreMemberMembershipTeamAuditEntryData + +""" +Metadata for an organization membership for org.restore_member actions +""" +type OrgRestoreMemberMembershipOrganizationAuditEntryData implements OrganizationAuditEntryData { + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI +} + +""" +Metadata for a repository membership for org.restore_member actions +""" +type OrgRestoreMemberMembershipRepositoryAuditEntryData implements RepositoryAuditEntryData { + """ + The repository associated with the action + """ + repository: Repository + + """ + The name of the repository + """ + repositoryName: String + + """ + The HTTP path for the repository + """ + repositoryResourcePath: URI + + """ + The HTTP URL for the repository + """ + repositoryUrl: URI +} + +""" +Metadata for a team membership for org.restore_member actions +""" +type OrgRestoreMemberMembershipTeamAuditEntryData implements TeamAuditEntryData { + """ + The team associated with the action + """ + team: Team + + """ + The name of the team + """ + teamName: String + + """ + The HTTP path for this team + """ + teamResourcePath: URI + + """ + The HTTP URL for this team + """ + teamUrl: URI +} + +""" +Audit log entry for a org.unblock_user +""" +type OrgUnblockUserAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The user being unblocked by the organization. + """ + blockedUser: User + + """ + The username of the blocked user. + """ + blockedUserName: String + + """ + The HTTP path for the blocked user. + """ + blockedUserResourcePath: URI + + """ + The HTTP URL for the blocked user. + """ + blockedUserUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a org.update_default_repository_permission +""" +type OrgUpdateDefaultRepositoryPermissionAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The new default repository permission level for the organization. + """ + permission: OrgUpdateDefaultRepositoryPermissionAuditEntryPermission + + """ + The former default repository permission level for the organization. + """ + permissionWas: OrgUpdateDefaultRepositoryPermissionAuditEntryPermission + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +The default permission a repository can have in an Organization. +""" +enum OrgUpdateDefaultRepositoryPermissionAuditEntryPermission { + """ + Can read, clone, push, and add collaborators to repositories. + """ + ADMIN + + """ + No default permission value. + """ + NONE + + """ + Can read and clone repositories. + """ + READ + + """ + Can read, clone and push to repositories. + """ + WRITE +} + +""" +Audit log entry for a org.update_member event. +""" +type OrgUpdateMemberAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The new member permission level for the organization. + """ + permission: OrgUpdateMemberAuditEntryPermission + + """ + The former member permission level for the organization. + """ + permissionWas: OrgUpdateMemberAuditEntryPermission + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +The permissions available to members on an Organization. +""" +enum OrgUpdateMemberAuditEntryPermission { + """ + Can read, clone, push, and add collaborators to repositories. + """ + ADMIN + + """ + Can read and clone repositories. + """ + READ +} + +""" +Audit log entry for a org.update_member_repository_creation_permission event. +""" +type OrgUpdateMemberRepositoryCreationPermissionAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + Can members create repositories in the organization. + """ + canCreateRepositories: Boolean + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI + + """ + The permission for visibility level of repositories for this organization. + """ + visibility: OrgUpdateMemberRepositoryCreationPermissionAuditEntryVisibility +} + +""" +The permissions available for repository creation on an Organization. +""" +enum OrgUpdateMemberRepositoryCreationPermissionAuditEntryVisibility { + """ + All organization members are restricted from creating any repositories. + """ + ALL + + """ + All organization members are restricted from creating internal repositories. + """ + INTERNAL + + """ + All organization members are allowed to create any repositories. + """ + NONE + + """ + All organization members are restricted from creating private repositories. + """ + PRIVATE + + """ + All organization members are restricted from creating private or internal repositories. + """ + PRIVATE_INTERNAL + + """ + All organization members are restricted from creating public repositories. + """ + PUBLIC + + """ + All organization members are restricted from creating public or internal repositories. + """ + PUBLIC_INTERNAL + + """ + All organization members are restricted from creating public or private repositories. + """ + PUBLIC_PRIVATE +} + +""" +Audit log entry for a org.update_member_repository_invitation_permission event. +""" +type OrgUpdateMemberRepositoryInvitationPermissionAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + Can outside collaborators be invited to repositories in the organization. + """ + canInviteOutsideCollaboratorsToRepositories: Boolean + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +An account on GitHub, with one or more owners, that has repositories, members and teams. +""" +type Organization implements Actor & MemberStatusable & Node & PackageOwner & ProfileOwner & ProjectOwner & RepositoryOwner & Sponsorable & UniformResourceLocatable { + """ + Determine if this repository owner has any items that can be pinned to their profile. + """ + anyPinnableItems( + """ + Filter to only a particular kind of pinnable item. + """ + type: PinnableItemType + ): Boolean! + + """ + Audit log entries of the organization + """ + auditLog( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for the returned audit log entries. + """ + orderBy: AuditLogOrder = {field: CREATED_AT, direction: DESC} + + """ + The query string to filter audit entries + """ + query: String + ): OrganizationAuditEntryConnection! + + """ + A URL pointing to the organization's public avatar. + """ + avatarUrl( + """ + The size of the resulting square image. + """ + size: Int + ): URI! + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + + """ + The organization's public profile description. + """ + description: String + + """ + The organization's public profile description rendered to HTML. + """ + descriptionHTML: String + + """ + A list of domains owned by the organization. + """ + domains( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Filter by if the domain is verified. + """ + isVerified: Boolean = null + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for verifiable domains returned. + """ + orderBy: VerifiableDomainOrder = {field: DOMAIN, direction: ASC} + ): VerifiableDomainConnection + + """ + The organization's public email. + """ + email: String + + """ + True if this user/organization has a GitHub Sponsors listing. + """ + hasSponsorsListing: Boolean! + id: ID! + + """ + The interaction ability settings for this organization. + """ + interactionAbility: RepositoryInteractionAbility + + """ + The setting value for whether the organization has an IP allow list enabled. + """ + ipAllowListEnabledSetting: IpAllowListEnabledSettingValue! + + """ + The IP addresses that are allowed to access resources owned by the organization. + """ + ipAllowListEntries( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for IP allow list entries returned. + """ + orderBy: IpAllowListEntryOrder = {field: ALLOW_LIST_VALUE, direction: ASC} + ): IpAllowListEntryConnection! + + """ + Check if the given account is sponsoring this user/organization. + """ + isSponsoredBy( + """ + The target account's login. + """ + accountLogin: String! + ): Boolean! + + """ + True if the viewer is sponsored by this user/organization. + """ + isSponsoringViewer: Boolean! + + """ + Whether the organization has verified its profile email and website. + """ + isVerified: Boolean! + + """ + Showcases a selection of repositories and gists that the profile owner has + either curated or that have been selected automatically based on popularity. + """ + itemShowcase: ProfileItemShowcase! + + """ + The organization's public profile location. + """ + location: String + + """ + The organization's login name. + """ + login: String! + + """ + Get the status messages members of this entity have set that are either public or visible only to the organization. + """ + memberStatuses( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for user statuses returned from the connection. + """ + orderBy: UserStatusOrder = {field: UPDATED_AT, direction: DESC} + ): UserStatusConnection! + + """ + A list of users who are members of this organization. + """ + membersWithRole( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): OrganizationMemberConnection! + + """ + The organization's public profile name. + """ + name: String + + """ + The HTTP path creating a new team + """ + newTeamResourcePath: URI! + + """ + The HTTP URL creating a new team + """ + newTeamUrl: URI! + + """ + Indicates if email notification delivery for this organization is restricted to verified domains. + """ + notificationDeliveryRestrictionEnabledSetting: NotificationRestrictionSettingValue! + + """ + The billing email for the organization. + """ + organizationBillingEmail: String + + """ + A list of packages under the owner. + """ + packages( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Find packages by their names. + """ + names: [String] + + """ + Ordering of the returned packages. + """ + orderBy: PackageOrder = {field: CREATED_AT, direction: DESC} + + """ + Filter registry package by type. + """ + packageType: PackageType + + """ + Find packages in a repository by ID. + """ + repositoryId: ID + ): PackageConnection! + + """ + A list of users who have been invited to join this organization. + """ + pendingMembers( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): UserConnection! + + """ + A list of repositories and gists this profile owner can pin to their profile. + """ + pinnableItems( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Filter the types of pinnable items that are returned. + """ + types: [PinnableItemType!] + ): PinnableItemConnection! + + """ + A list of repositories and gists this profile owner has pinned to their profile + """ + pinnedItems( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Filter the types of pinned items that are returned. + """ + types: [PinnableItemType!] + ): PinnableItemConnection! + + """ + Returns how many more items this profile owner can pin to their profile. + """ + pinnedItemsRemaining: Int! + + """ + Find project by number. + """ + project( + """ + The project number to find. + """ + number: Int! + ): Project + + """ + A list of projects under the owner. + """ + projects( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for projects returned from the connection + """ + orderBy: ProjectOrder + + """ + Query to search projects by, currently only searching by name. + """ + search: String + + """ + A list of states to filter the projects by. + """ + states: [ProjectState!] + ): ProjectConnection! + + """ + The HTTP path listing organization's projects + """ + projectsResourcePath: URI! + + """ + The HTTP URL listing organization's projects + """ + projectsUrl: URI! + + """ + A list of repositories that the user owns. + """ + repositories( + """ + Array of viewer's affiliation options for repositories returned from the + connection. For example, OWNER will include only repositories that the + current viewer owns. + """ + affiliations: [RepositoryAffiliation] + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + If non-null, filters repositories according to whether they are forks of another repository + """ + isFork: Boolean + + """ + If non-null, filters repositories according to whether they have been locked + """ + isLocked: Boolean + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for repositories returned from the connection + """ + orderBy: RepositoryOrder + + """ + Array of owner's affiliation options for repositories returned from the + connection. For example, OWNER will include only repositories that the + organization or user being viewed owns. + """ + ownerAffiliations: [RepositoryAffiliation] = [OWNER, COLLABORATOR] + + """ + If non-null, filters repositories according to privacy + """ + privacy: RepositoryPrivacy + ): RepositoryConnection! + + """ + Find Repository. + """ + repository( + """ + Name of Repository to find. + """ + name: String! + ): Repository + + """ + When true the organization requires all members, billing managers, and outside + collaborators to enable two-factor authentication. + """ + requiresTwoFactorAuthentication: Boolean + + """ + The HTTP path for this organization. + """ + resourcePath: URI! + + """ + The Organization's SAML identity providers + """ + samlIdentityProvider: OrganizationIdentityProvider + + """ + The GitHub Sponsors listing for this user or organization. + """ + sponsorsListing: SponsorsListing + + """ + The viewer's sponsorship of this entity. + """ + sponsorshipForViewerAsSponsor: Sponsorship + + """ + This object's sponsorships as the maintainer. + """ + sponsorshipsAsMaintainer( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Whether or not to include private sponsorships in the result set + """ + includePrivate: Boolean = false + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for sponsorships returned from this connection. If left + blank, the sponsorships will be ordered based on relevancy to the viewer. + """ + orderBy: SponsorshipOrder + ): SponsorshipConnection! + + """ + This object's sponsorships as the sponsor. + """ + sponsorshipsAsSponsor( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for sponsorships returned from this connection. If left + blank, the sponsorships will be ordered based on relevancy to the viewer. + """ + orderBy: SponsorshipOrder + ): SponsorshipConnection! + + """ + Find an organization's team by its slug. + """ + team( + """ + The name or slug of the team to find. + """ + slug: String! + ): Team + + """ + A list of teams in this organization. + """ + teams( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + If true, filters teams that are mapped to an LDAP Group (Enterprise only) + """ + ldapMapped: Boolean + + """ + Ordering options for teams returned from the connection + """ + orderBy: TeamOrder + + """ + If non-null, filters teams according to privacy + """ + privacy: TeamPrivacy + + """ + If non-null, filters teams with query on team name and team slug + """ + query: String + + """ + If non-null, filters teams according to whether the viewer is an admin or member on team + """ + role: TeamRole + + """ + If true, restrict to only root teams + """ + rootTeamsOnly: Boolean = false + + """ + User logins to filter by + """ + userLogins: [String!] + ): TeamConnection! + + """ + The HTTP path listing organization's teams + """ + teamsResourcePath: URI! + + """ + The HTTP URL listing organization's teams + """ + teamsUrl: URI! + + """ + The organization's Twitter username. + """ + twitterUsername: String + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! + + """ + The HTTP URL for this organization. + """ + url: URI! + + """ + Organization is adminable by the viewer. + """ + viewerCanAdminister: Boolean! + + """ + Can the viewer pin repositories and gists to the profile? + """ + viewerCanChangePinnedItems: Boolean! + + """ + Can the current viewer create new projects on this owner. + """ + viewerCanCreateProjects: Boolean! + + """ + Viewer can create repositories on this organization + """ + viewerCanCreateRepositories: Boolean! + + """ + Viewer can create teams on this organization. + """ + viewerCanCreateTeams: Boolean! + + """ + Whether or not the viewer is able to sponsor this user/organization. + """ + viewerCanSponsor: Boolean! + + """ + Viewer is an active member of this organization. + """ + viewerIsAMember: Boolean! + + """ + True if the viewer is sponsoring this user/organization. + """ + viewerIsSponsoring: Boolean! + + """ + The organization's public profile URL. + """ + websiteUrl: URI +} + +""" +An audit entry in an organization audit log. +""" +union OrganizationAuditEntry = MembersCanDeleteReposClearAuditEntry | MembersCanDeleteReposDisableAuditEntry | MembersCanDeleteReposEnableAuditEntry | OauthApplicationCreateAuditEntry | OrgAddBillingManagerAuditEntry | OrgAddMemberAuditEntry | OrgBlockUserAuditEntry | OrgConfigDisableCollaboratorsOnlyAuditEntry | OrgConfigEnableCollaboratorsOnlyAuditEntry | OrgCreateAuditEntry | OrgDisableOauthAppRestrictionsAuditEntry | OrgDisableSamlAuditEntry | OrgDisableTwoFactorRequirementAuditEntry | OrgEnableOauthAppRestrictionsAuditEntry | OrgEnableSamlAuditEntry | OrgEnableTwoFactorRequirementAuditEntry | OrgInviteMemberAuditEntry | OrgInviteToBusinessAuditEntry | OrgOauthAppAccessApprovedAuditEntry | OrgOauthAppAccessDeniedAuditEntry | OrgOauthAppAccessRequestedAuditEntry | OrgRemoveBillingManagerAuditEntry | OrgRemoveMemberAuditEntry | OrgRemoveOutsideCollaboratorAuditEntry | OrgRestoreMemberAuditEntry | OrgUnblockUserAuditEntry | OrgUpdateDefaultRepositoryPermissionAuditEntry | OrgUpdateMemberAuditEntry | OrgUpdateMemberRepositoryCreationPermissionAuditEntry | OrgUpdateMemberRepositoryInvitationPermissionAuditEntry | PrivateRepositoryForkingDisableAuditEntry | PrivateRepositoryForkingEnableAuditEntry | RepoAccessAuditEntry | RepoAddMemberAuditEntry | RepoAddTopicAuditEntry | RepoArchivedAuditEntry | RepoChangeMergeSettingAuditEntry | RepoConfigDisableAnonymousGitAccessAuditEntry | RepoConfigDisableCollaboratorsOnlyAuditEntry | RepoConfigDisableContributorsOnlyAuditEntry | RepoConfigDisableSockpuppetDisallowedAuditEntry | RepoConfigEnableAnonymousGitAccessAuditEntry | RepoConfigEnableCollaboratorsOnlyAuditEntry | RepoConfigEnableContributorsOnlyAuditEntry | RepoConfigEnableSockpuppetDisallowedAuditEntry | RepoConfigLockAnonymousGitAccessAuditEntry | RepoConfigUnlockAnonymousGitAccessAuditEntry | RepoCreateAuditEntry | RepoDestroyAuditEntry | RepoRemoveMemberAuditEntry | RepoRemoveTopicAuditEntry | RepositoryVisibilityChangeDisableAuditEntry | RepositoryVisibilityChangeEnableAuditEntry | TeamAddMemberAuditEntry | TeamAddRepositoryAuditEntry | TeamChangeParentTeamAuditEntry | TeamRemoveMemberAuditEntry | TeamRemoveRepositoryAuditEntry + +""" +The connection type for OrganizationAuditEntry. +""" +type OrganizationAuditEntryConnection { + """ + A list of edges. + """ + edges: [OrganizationAuditEntryEdge] + + """ + A list of nodes. + """ + nodes: [OrganizationAuditEntry] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +Metadata for an audit entry with action org.* +""" +interface OrganizationAuditEntryData { + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI +} + +""" +An edge in a connection. +""" +type OrganizationAuditEntryEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: OrganizationAuditEntry +} + +""" +The connection type for Organization. +""" +type OrganizationConnection { + """ + A list of edges. + """ + edges: [OrganizationEdge] + + """ + A list of nodes. + """ + nodes: [Organization] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type OrganizationEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Organization +} + +""" +An Identity Provider configured to provision SAML and SCIM identities for Organizations +""" +type OrganizationIdentityProvider implements Node { + """ + The digest algorithm used to sign SAML requests for the Identity Provider. + """ + digestMethod: URI + + """ + External Identities provisioned by this Identity Provider + """ + externalIdentities( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): ExternalIdentityConnection! + id: ID! + + """ + The x509 certificate used by the Identity Provider to sign assertions and responses. + """ + idpCertificate: X509Certificate + + """ + The Issuer Entity ID for the SAML Identity Provider + """ + issuer: String + + """ + Organization this Identity Provider belongs to + """ + organization: Organization + + """ + The signature algorithm used to sign SAML requests for the Identity Provider. + """ + signatureMethod: URI + + """ + The URL endpoint for the Identity Provider's SAML SSO. + """ + ssoUrl: URI +} + +""" +An Invitation for a user to an organization. +""" +type OrganizationInvitation implements Node { + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + The email address of the user invited to the organization. + """ + email: String + id: ID! + + """ + The type of invitation that was sent (e.g. email, user). + """ + invitationType: OrganizationInvitationType! + + """ + The user who was invited to the organization. + """ + invitee: User + + """ + The user who created the invitation. + """ + inviter: User! + + """ + The organization the invite is for + """ + organization: Organization! + + """ + The user's pending role in the organization (e.g. member, owner). + """ + role: OrganizationInvitationRole! +} + +""" +The connection type for OrganizationInvitation. +""" +type OrganizationInvitationConnection { + """ + A list of edges. + """ + edges: [OrganizationInvitationEdge] + + """ + A list of nodes. + """ + nodes: [OrganizationInvitation] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type OrganizationInvitationEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: OrganizationInvitation +} + +""" +The possible organization invitation roles. +""" +enum OrganizationInvitationRole { + """ + The user is invited to be an admin of the organization. + """ + ADMIN + + """ + The user is invited to be a billing manager of the organization. + """ + BILLING_MANAGER + + """ + The user is invited to be a direct member of the organization. + """ + DIRECT_MEMBER + + """ + The user's previous role will be reinstated. + """ + REINSTATE +} + +""" +The possible organization invitation types. +""" +enum OrganizationInvitationType { + """ + The invitation was to an email address. + """ + EMAIL + + """ + The invitation was to an existing user. + """ + USER +} + +""" +The connection type for User. +""" +type OrganizationMemberConnection { + """ + A list of edges. + """ + edges: [OrganizationMemberEdge] + + """ + A list of nodes. + """ + nodes: [User] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +Represents a user within an organization. +""" +type OrganizationMemberEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + Whether the organization member has two factor enabled or not. Returns null if information is not available to viewer. + """ + hasTwoFactorEnabled: Boolean + + """ + The item at the end of the edge. + """ + node: User + + """ + The role this user has in the organization. + """ + role: OrganizationMemberRole +} + +""" +The possible roles within an organization for its members. +""" +enum OrganizationMemberRole { + """ + The user is an administrator of the organization. + """ + ADMIN + + """ + The user is a member of the organization. + """ + MEMBER +} + +""" +The possible values for the members can create repositories setting on an organization. +""" +enum OrganizationMembersCanCreateRepositoriesSettingValue { + """ + Members will be able to create public and private repositories. + """ + ALL + + """ + Members will not be able to create public or private repositories. + """ + DISABLED + + """ + Members will be able to create only private repositories. + """ + PRIVATE +} + +""" +Ordering options for organization connections. +""" +input OrganizationOrder { + """ + The ordering direction. + """ + direction: OrderDirection! + + """ + The field to order organizations by. + """ + field: OrganizationOrderField! +} + +""" +Properties by which organization connections can be ordered. +""" +enum OrganizationOrderField { + """ + Order organizations by creation time + """ + CREATED_AT + + """ + Order organizations by login + """ + LOGIN +} + +""" +An organization teams hovercard context +""" +type OrganizationTeamsHovercardContext implements HovercardContext { + """ + A string describing this context + """ + message: String! + + """ + An octicon to accompany this context + """ + octicon: String! + + """ + Teams in this organization the user is a member of that are relevant + """ + relevantTeams( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): TeamConnection! + + """ + The path for the full team list for this user + """ + teamsResourcePath: URI! + + """ + The URL for the full team list for this user + """ + teamsUrl: URI! + + """ + The total number of teams the user is on in the organization + """ + totalTeamCount: Int! +} + +""" +An organization list hovercard context +""" +type OrganizationsHovercardContext implements HovercardContext { + """ + A string describing this context + """ + message: String! + + """ + An octicon to accompany this context + """ + octicon: String! + + """ + Organizations this user is a member of that are relevant + """ + relevantOrganizations( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): OrganizationConnection! + + """ + The total number of organizations this user is in + """ + totalOrganizationCount: Int! +} + +""" +Information for an uploaded package. +""" +type Package implements Node { + id: ID! + + """ + Find the latest version for the package. + """ + latestVersion: PackageVersion + + """ + Identifies the name of the package. + """ + name: String! + + """ + Identifies the type of the package. + """ + packageType: PackageType! + + """ + The repository this package belongs to. + """ + repository: Repository + + """ + Statistics about package activity. + """ + statistics: PackageStatistics + + """ + Find package version by version string. + """ + version( + """ + The package version. + """ + version: String! + ): PackageVersion + + """ + list of versions for this package + """ + versions( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering of the returned packages. + """ + orderBy: PackageVersionOrder = {field: CREATED_AT, direction: DESC} + ): PackageVersionConnection! +} + +""" +The connection type for Package. +""" +type PackageConnection { + """ + A list of edges. + """ + edges: [PackageEdge] + + """ + A list of nodes. + """ + nodes: [Package] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type PackageEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Package +} + +""" +A file in a package version. +""" +type PackageFile implements Node { + id: ID! + + """ + MD5 hash of the file. + """ + md5: String + + """ + Name of the file. + """ + name: String! + + """ + The package version this file belongs to. + """ + packageVersion: PackageVersion + + """ + SHA1 hash of the file. + """ + sha1: String + + """ + SHA256 hash of the file. + """ + sha256: String + + """ + Size of the file in bytes. + """ + size: Int + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! + + """ + URL to download the asset. + """ + url: URI +} + +""" +The connection type for PackageFile. +""" +type PackageFileConnection { + """ + A list of edges. + """ + edges: [PackageFileEdge] + + """ + A list of nodes. + """ + nodes: [PackageFile] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type PackageFileEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: PackageFile +} + +""" +Ways in which lists of package files can be ordered upon return. +""" +input PackageFileOrder { + """ + The direction in which to order package files by the specified field. + """ + direction: OrderDirection + + """ + The field in which to order package files by. + """ + field: PackageFileOrderField +} + +""" +Properties by which package file connections can be ordered. +""" +enum PackageFileOrderField { + """ + Order package files by creation time + """ + CREATED_AT +} + +""" +Ways in which lists of packages can be ordered upon return. +""" +input PackageOrder { + """ + The direction in which to order packages by the specified field. + """ + direction: OrderDirection + + """ + The field in which to order packages by. + """ + field: PackageOrderField +} + +""" +Properties by which package connections can be ordered. +""" +enum PackageOrderField { + """ + Order packages by creation time + """ + CREATED_AT +} + +""" +Represents an owner of a package. +""" +interface PackageOwner { + id: ID! + + """ + A list of packages under the owner. + """ + packages( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Find packages by their names. + """ + names: [String] + + """ + Ordering of the returned packages. + """ + orderBy: PackageOrder = {field: CREATED_AT, direction: DESC} + + """ + Filter registry package by type. + """ + packageType: PackageType + + """ + Find packages in a repository by ID. + """ + repositoryId: ID + ): PackageConnection! +} + +""" +Represents a object that contains package activity statistics such as downloads. +""" +type PackageStatistics { + """ + Number of times the package was downloaded since it was created. + """ + downloadsTotalCount: Int! +} + +""" +A version tag contains the mapping between a tag name and a version. +""" +type PackageTag implements Node { + id: ID! + + """ + Identifies the tag name of the version. + """ + name: String! + + """ + Version that the tag is associated with. + """ + version: PackageVersion +} + +""" +The possible types of a package. +""" +enum PackageType { + """ + A debian package. + """ + DEBIAN + + """ + A docker image. + """ + DOCKER + + """ + A maven package. + """ + MAVEN + + """ + An npm package. + """ + NPM + + """ + A nuget package. + """ + NUGET + + """ + A python package. + """ + PYPI + + """ + A rubygems package. + """ + RUBYGEMS +} + +""" +Information about a specific package version. +""" +type PackageVersion implements Node { + """ + List of files associated with this package version + """ + files( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering of the returned package files. + """ + orderBy: PackageFileOrder = {field: CREATED_AT, direction: ASC} + ): PackageFileConnection! + id: ID! + + """ + The package associated with this version. + """ + package: Package + + """ + The platform this version was built for. + """ + platform: String + + """ + Whether or not this version is a pre-release. + """ + preRelease: Boolean! + + """ + The README of this package version. + """ + readme: String + + """ + The release associated with this package version. + """ + release: Release + + """ + Statistics about package activity. + """ + statistics: PackageVersionStatistics + + """ + The package version summary. + """ + summary: String + + """ + The version string. + """ + version: String! +} + +""" +The connection type for PackageVersion. +""" +type PackageVersionConnection { + """ + A list of edges. + """ + edges: [PackageVersionEdge] + + """ + A list of nodes. + """ + nodes: [PackageVersion] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type PackageVersionEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: PackageVersion +} + +""" +Ways in which lists of package versions can be ordered upon return. +""" +input PackageVersionOrder { + """ + The direction in which to order package versions by the specified field. + """ + direction: OrderDirection + + """ + The field in which to order package versions by. + """ + field: PackageVersionOrderField +} + +""" +Properties by which package version connections can be ordered. +""" +enum PackageVersionOrderField { + """ + Order package versions by creation time + """ + CREATED_AT +} + +""" +Represents a object that contains package version activity statistics such as downloads. +""" +type PackageVersionStatistics { + """ + Number of times the package was downloaded since it was created. + """ + downloadsTotalCount: Int! +} + +""" +Information about pagination in a connection. +""" +type PageInfo { + """ + When paginating forwards, the cursor to continue. + """ + endCursor: String + + """ + When paginating forwards, are there more items? + """ + hasNextPage: Boolean! + + """ + When paginating backwards, are there more items? + """ + hasPreviousPage: Boolean! + + """ + When paginating backwards, the cursor to continue. + """ + startCursor: String +} + +""" +Types that can grant permissions on a repository to a user +""" +union PermissionGranter = Organization | Repository | Team + +""" +A level of permission and source for a user's access to a repository. +""" +type PermissionSource { + """ + The organization the repository belongs to. + """ + organization: Organization! + + """ + The level of access this source has granted to the user. + """ + permission: DefaultRepositoryPermissionField! + + """ + The source of this permission. + """ + source: PermissionGranter! +} + +""" +Autogenerated input type of PinIssue +""" +input PinIssueInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the issue to be pinned + """ + issueId: ID! @possibleTypes(concreteTypes: ["Issue"]) +} + +""" +Autogenerated return type of PinIssue +""" +type PinIssuePayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The issue that was pinned + """ + issue: Issue +} + +""" +Types that can be pinned to a profile page. +""" +union PinnableItem = Gist | Repository + +""" +The connection type for PinnableItem. +""" +type PinnableItemConnection { + """ + A list of edges. + """ + edges: [PinnableItemEdge] + + """ + A list of nodes. + """ + nodes: [PinnableItem] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type PinnableItemEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: PinnableItem +} + +""" +Represents items that can be pinned to a profile page or dashboard. +""" +enum PinnableItemType { + """ + A gist. + """ + GIST + + """ + An issue. + """ + ISSUE + + """ + An organization. + """ + ORGANIZATION + + """ + A project. + """ + PROJECT + + """ + A pull request. + """ + PULL_REQUEST + + """ + A repository. + """ + REPOSITORY + + """ + A team. + """ + TEAM + + """ + A user. + """ + USER +} + +""" +Represents a 'pinned' event on a given issue or pull request. +""" +type PinnedEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! + + """ + Identifies the issue associated with the event. + """ + issue: Issue! +} + +""" +A Pinned Issue is a issue pinned to a repository's index page. +""" +type PinnedIssue implements Node { + """ + Identifies the primary key from the database. + """ + databaseId: Int + id: ID! + + """ + The issue that was pinned. + """ + issue: Issue! + + """ + The actor that pinned this issue. + """ + pinnedBy: Actor! + + """ + The repository that this issue was pinned to. + """ + repository: Repository! +} + +""" +The connection type for PinnedIssue. +""" +type PinnedIssueConnection { + """ + A list of edges. + """ + edges: [PinnedIssueEdge] + + """ + A list of nodes. + """ + nodes: [PinnedIssue] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type PinnedIssueEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: PinnedIssue +} + +""" +An ISO-8601 encoded UTC date string with millisecond precision. +""" +scalar PreciseDateTime + +""" +Audit log entry for a private_repository_forking.disable event. +""" +type PrivateRepositoryForkingDisableAuditEntry implements AuditEntry & EnterpriseAuditEntryData & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + + """ + The HTTP path for this enterprise. + """ + enterpriseResourcePath: URI + + """ + The slug of the enterprise. + """ + enterpriseSlug: String + + """ + The HTTP URL for this enterprise. + """ + enterpriseUrl: URI + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The repository associated with the action + """ + repository: Repository + + """ + The name of the repository + """ + repositoryName: String + + """ + The HTTP path for the repository + """ + repositoryResourcePath: URI + + """ + The HTTP URL for the repository + """ + repositoryUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a private_repository_forking.enable event. +""" +type PrivateRepositoryForkingEnableAuditEntry implements AuditEntry & EnterpriseAuditEntryData & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + + """ + The HTTP path for this enterprise. + """ + enterpriseResourcePath: URI + + """ + The slug of the enterprise. + """ + enterpriseSlug: String + + """ + The HTTP URL for this enterprise. + """ + enterpriseUrl: URI + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The repository associated with the action + """ + repository: Repository + + """ + The name of the repository + """ + repositoryName: String + + """ + The HTTP path for the repository + """ + repositoryResourcePath: URI + + """ + The HTTP URL for the repository + """ + repositoryUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +A curatable list of repositories relating to a repository owner, which defaults +to showing the most popular repositories they own. +""" +type ProfileItemShowcase { + """ + Whether or not the owner has pinned any repositories or gists. + """ + hasPinnedItems: Boolean! + + """ + The repositories and gists in the showcase. If the profile owner has any + pinned items, those will be returned. Otherwise, the profile owner's popular + repositories will be returned. + """ + items( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): PinnableItemConnection! +} + +""" +Represents any entity on GitHub that has a profile page. +""" +interface ProfileOwner { + """ + Determine if this repository owner has any items that can be pinned to their profile. + """ + anyPinnableItems( + """ + Filter to only a particular kind of pinnable item. + """ + type: PinnableItemType + ): Boolean! + + """ + The public profile email. + """ + email: String + id: ID! + + """ + Showcases a selection of repositories and gists that the profile owner has + either curated or that have been selected automatically based on popularity. + """ + itemShowcase: ProfileItemShowcase! + + """ + The public profile location. + """ + location: String + + """ + The username used to login. + """ + login: String! + + """ + The public profile name. + """ + name: String + + """ + A list of repositories and gists this profile owner can pin to their profile. + """ + pinnableItems( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Filter the types of pinnable items that are returned. + """ + types: [PinnableItemType!] + ): PinnableItemConnection! + + """ + A list of repositories and gists this profile owner has pinned to their profile + """ + pinnedItems( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Filter the types of pinned items that are returned. + """ + types: [PinnableItemType!] + ): PinnableItemConnection! + + """ + Returns how many more items this profile owner can pin to their profile. + """ + pinnedItemsRemaining: Int! + + """ + Can the viewer pin repositories and gists to the profile? + """ + viewerCanChangePinnedItems: Boolean! + + """ + The public profile website URL. + """ + websiteUrl: URI +} + +""" +Projects manage issues, pull requests and notes within a project owner. +""" +type Project implements Closable & Node & Updatable { + """ + The project's description body. + """ + body: String + + """ + The projects description body rendered to HTML. + """ + bodyHTML: HTML! + + """ + `true` if the object is closed (definition of closed may depend on type) + """ + closed: Boolean! + + """ + Identifies the date and time when the object was closed. + """ + closedAt: DateTime + + """ + List of columns in the project + """ + columns( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): ProjectColumnConnection! + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + The actor who originally created the project. + """ + creator: Actor + + """ + Identifies the primary key from the database. + """ + databaseId: Int + id: ID! + + """ + The project's name. + """ + name: String! + + """ + The project's number. + """ + number: Int! + + """ + The project's owner. Currently limited to repositories, organizations, and users. + """ + owner: ProjectOwner! + + """ + List of pending cards in this project + """ + pendingCards( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + A list of archived states to filter the cards by + """ + archivedStates: [ProjectCardArchivedState] = [ARCHIVED, NOT_ARCHIVED] + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): ProjectCardConnection! + + """ + Project progress details. + """ + progress: ProjectProgress! + + """ + The HTTP path for this project + """ + resourcePath: URI! + + """ + Whether the project is open or closed. + """ + state: ProjectState! + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! + + """ + The HTTP URL for this project + """ + url: URI! + + """ + Check if the current viewer can update this object. + """ + viewerCanUpdate: Boolean! +} + +""" +A card in a project. +""" +type ProjectCard implements Node { + """ + The project column this card is associated under. A card may only belong to one + project column at a time. The column field will be null if the card is created + in a pending state and has yet to be associated with a column. Once cards are + associated with a column, they will not become pending in the future. + """ + column: ProjectColumn + + """ + The card content item + """ + content: ProjectCardItem + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + The actor who created this card + """ + creator: Actor + + """ + Identifies the primary key from the database. + """ + databaseId: Int + id: ID! + + """ + Whether the card is archived + """ + isArchived: Boolean! + + """ + The card note + """ + note: String + + """ + The project that contains this card. + """ + project: Project! + + """ + The HTTP path for this card + """ + resourcePath: URI! + + """ + The state of ProjectCard + """ + state: ProjectCardState + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! + + """ + The HTTP URL for this card + """ + url: URI! +} + +""" +The possible archived states of a project card. +""" +enum ProjectCardArchivedState { + """ + A project card that is archived + """ + ARCHIVED + + """ + A project card that is not archived + """ + NOT_ARCHIVED +} + +""" +The connection type for ProjectCard. +""" +type ProjectCardConnection { + """ + A list of edges. + """ + edges: [ProjectCardEdge] + + """ + A list of nodes. + """ + nodes: [ProjectCard] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type ProjectCardEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: ProjectCard +} + +""" +An issue or PR and its owning repository to be used in a project card. +""" +input ProjectCardImport { + """ + The issue or pull request number. + """ + number: Int! + + """ + Repository name with owner (owner/repository). + """ + repository: String! +} + +""" +Types that can be inside Project Cards. +""" +union ProjectCardItem = Issue | PullRequest + +""" +Various content states of a ProjectCard +""" +enum ProjectCardState { + """ + The card has content only. + """ + CONTENT_ONLY + + """ + The card has a note only. + """ + NOTE_ONLY + + """ + The card is redacted. + """ + REDACTED +} + +""" +A column inside a project. +""" +type ProjectColumn implements Node { + """ + List of cards in the column + """ + cards( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + A list of archived states to filter the cards by + """ + archivedStates: [ProjectCardArchivedState] = [ARCHIVED, NOT_ARCHIVED] + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): ProjectCardConnection! + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + id: ID! + + """ + The project column's name. + """ + name: String! + + """ + The project that contains this column. + """ + project: Project! + + """ + The semantic purpose of the column + """ + purpose: ProjectColumnPurpose + + """ + The HTTP path for this project column + """ + resourcePath: URI! + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! + + """ + The HTTP URL for this project column + """ + url: URI! +} + +""" +The connection type for ProjectColumn. +""" +type ProjectColumnConnection { + """ + A list of edges. + """ + edges: [ProjectColumnEdge] + + """ + A list of nodes. + """ + nodes: [ProjectColumn] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type ProjectColumnEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: ProjectColumn +} + +""" +A project column and a list of its issues and PRs. +""" +input ProjectColumnImport { + """ + The name of the column. + """ + columnName: String! + + """ + A list of issues and pull requests in the column. + """ + issues: [ProjectCardImport!] + + """ + The position of the column, starting from 0. + """ + position: Int! +} + +""" +The semantic purpose of the column - todo, in progress, or done. +""" +enum ProjectColumnPurpose { + """ + The column contains cards which are complete + """ + DONE + + """ + The column contains cards which are currently being worked on + """ + IN_PROGRESS + + """ + The column contains cards still to be worked on + """ + TODO +} + +""" +A list of projects associated with the owner. +""" +type ProjectConnection { + """ + A list of edges. + """ + edges: [ProjectEdge] + + """ + A list of nodes. + """ + nodes: [Project] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type ProjectEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Project +} + +""" +Ways in which lists of projects can be ordered upon return. +""" +input ProjectOrder { + """ + The direction in which to order projects by the specified field. + """ + direction: OrderDirection! + + """ + The field in which to order projects by. + """ + field: ProjectOrderField! +} + +""" +Properties by which project connections can be ordered. +""" +enum ProjectOrderField { + """ + Order projects by creation time + """ + CREATED_AT + + """ + Order projects by name + """ + NAME + + """ + Order projects by update time + """ + UPDATED_AT +} + +""" +Represents an owner of a Project. +""" +interface ProjectOwner { + id: ID! + + """ + Find project by number. + """ + project( + """ + The project number to find. + """ + number: Int! + ): Project + + """ + A list of projects under the owner. + """ + projects( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for projects returned from the connection + """ + orderBy: ProjectOrder + + """ + Query to search projects by, currently only searching by name. + """ + search: String + + """ + A list of states to filter the projects by. + """ + states: [ProjectState!] + ): ProjectConnection! + + """ + The HTTP path listing owners projects + """ + projectsResourcePath: URI! + + """ + The HTTP URL listing owners projects + """ + projectsUrl: URI! + + """ + Can the current viewer create new projects on this owner. + """ + viewerCanCreateProjects: Boolean! +} + +""" +Project progress stats. +""" +type ProjectProgress { + """ + The number of done cards. + """ + doneCount: Int! + + """ + The percentage of done cards. + """ + donePercentage: Float! + + """ + Whether progress tracking is enabled and cards with purpose exist for this project + """ + enabled: Boolean! + + """ + The number of in-progress cards. + """ + inProgressCount: Int! + + """ + The percentage of in-progress cards. + """ + inProgressPercentage: Float! + + """ + The number of to do cards. + """ + todoCount: Int! + + """ + The percentage of to do cards. + """ + todoPercentage: Float! +} + +""" +State of the project; either 'open' or 'closed' +""" +enum ProjectState { + """ + The project is closed. + """ + CLOSED + + """ + The project is open. + """ + OPEN +} + +""" +GitHub-provided templates for Projects +""" +enum ProjectTemplate { + """ + Create a board with v2 triggers to automatically move cards across To do, In progress and Done columns. + """ + AUTOMATED_KANBAN_V2 + + """ + Create a board with triggers to automatically move cards across columns with review automation. + """ + AUTOMATED_REVIEWS_KANBAN + + """ + Create a board with columns for To do, In progress and Done. + """ + BASIC_KANBAN + + """ + Create a board to triage and prioritize bugs with To do, priority, and Done columns. + """ + BUG_TRIAGE +} + +""" +A user's public key. +""" +type PublicKey implements Node { + """ + The last time this authorization was used to perform an action. Values will be null for keys not owned by the user. + """ + accessedAt: DateTime + + """ + Identifies the date and time when the key was created. Keys created before + March 5th, 2014 have inaccurate values. Values will be null for keys not owned by the user. + """ + createdAt: DateTime + + """ + The fingerprint for this PublicKey. + """ + fingerprint: String! + id: ID! + + """ + Whether this PublicKey is read-only or not. Values will be null for keys not owned by the user. + """ + isReadOnly: Boolean + + """ + The public key string. + """ + key: String! + + """ + Identifies the date and time when the key was updated. Keys created before + March 5th, 2014 may have inaccurate values. Values will be null for keys not + owned by the user. + """ + updatedAt: DateTime +} + +""" +The connection type for PublicKey. +""" +type PublicKeyConnection { + """ + A list of edges. + """ + edges: [PublicKeyEdge] + + """ + A list of nodes. + """ + nodes: [PublicKey] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type PublicKeyEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: PublicKey +} + +""" +A repository pull request. +""" +type PullRequest implements Assignable & Closable & Comment & Labelable & Lockable & Node & Reactable & RepositoryNode & Subscribable & UniformResourceLocatable & Updatable & UpdatableComment { + """ + Reason that the conversation was locked. + """ + activeLockReason: LockReason + + """ + The number of additions in this pull request. + """ + additions: Int! + + """ + A list of Users assigned to this object. + """ + assignees( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): UserConnection! + + """ + The actor who authored the comment. + """ + author: Actor + + """ + Author's association with the subject of the comment. + """ + authorAssociation: CommentAuthorAssociation! + + """ + Returns the auto-merge request object if one exists for this pull request. + """ + autoMergeRequest: AutoMergeRequest + + """ + Identifies the base Ref associated with the pull request. + """ + baseRef: Ref + + """ + Identifies the name of the base Ref associated with the pull request, even if the ref has been deleted. + """ + baseRefName: String! + + """ + Identifies the oid of the base ref associated with the pull request, even if the ref has been deleted. + """ + baseRefOid: GitObjectID! + + """ + The repository associated with this pull request's base Ref. + """ + baseRepository: Repository + + """ + The body as Markdown. + """ + body: String! + + """ + The body rendered to HTML. + """ + bodyHTML: HTML! + + """ + The body rendered to text. + """ + bodyText: String! + + """ + Whether or not the pull request is rebaseable. + """ + canBeRebased: Boolean! @preview(toggledBy: "merge-info-preview") + + """ + The number of changed files in this pull request. + """ + changedFiles: Int! + + """ + The HTTP path for the checks of this pull request. + """ + checksResourcePath: URI! + + """ + The HTTP URL for the checks of this pull request. + """ + checksUrl: URI! + + """ + `true` if the pull request is closed + """ + closed: Boolean! + + """ + Identifies the date and time when the object was closed. + """ + closedAt: DateTime + + """ + A list of comments associated with the pull request. + """ + comments( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for issue comments returned from the connection. + """ + orderBy: IssueCommentOrder + ): IssueCommentConnection! + + """ + A list of commits present in this pull request's head branch not present in the base branch. + """ + commits( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): PullRequestCommitConnection! + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Check if this comment was created via an email reply. + """ + createdViaEmail: Boolean! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + + """ + The number of deletions in this pull request. + """ + deletions: Int! + + """ + The actor who edited this pull request's body. + """ + editor: Actor + + """ + Lists the files changed within this pull request. + """ + files( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): PullRequestChangedFileConnection + + """ + Identifies the head Ref associated with the pull request. + """ + headRef: Ref + + """ + Identifies the name of the head Ref associated with the pull request, even if the ref has been deleted. + """ + headRefName: String! + + """ + Identifies the oid of the head ref associated with the pull request, even if the ref has been deleted. + """ + headRefOid: GitObjectID! + + """ + The repository associated with this pull request's head Ref. + """ + headRepository: Repository + + """ + The owner of the repository associated with this pull request's head Ref. + """ + headRepositoryOwner: RepositoryOwner + + """ + The hovercard information for this issue + """ + hovercard( + """ + Whether or not to include notification contexts + """ + includeNotificationContexts: Boolean = true + ): Hovercard! + id: ID! + + """ + Check if this comment was edited and includes an edit with the creation data + """ + includesCreatedEdit: Boolean! + + """ + The head and base repositories are different. + """ + isCrossRepository: Boolean! + + """ + Identifies if the pull request is a draft. + """ + isDraft: Boolean! + + """ + Is this pull request read by the viewer + """ + isReadByViewer: Boolean + + """ + A list of labels associated with the object. + """ + labels( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for labels returned from the connection. + """ + orderBy: LabelOrder = {field: CREATED_AT, direction: ASC} + ): LabelConnection + + """ + The moment the editor made the last edit + """ + lastEditedAt: DateTime + + """ + A list of latest reviews per user associated with the pull request. + """ + latestOpinionatedReviews( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Only return reviews from user who have write access to the repository + """ + writersOnly: Boolean = false + ): PullRequestReviewConnection + + """ + A list of latest reviews per user associated with the pull request that are not also pending review. + """ + latestReviews( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): PullRequestReviewConnection + + """ + `true` if the pull request is locked + """ + locked: Boolean! + + """ + Indicates whether maintainers can modify the pull request. + """ + maintainerCanModify: Boolean! + + """ + The commit that was created when this pull request was merged. + """ + mergeCommit: Commit + + """ + Detailed information about the current pull request merge state status. + """ + mergeStateStatus: MergeStateStatus! @preview(toggledBy: "merge-info-preview") + + """ + Whether or not the pull request can be merged based on the existence of merge conflicts. + """ + mergeable: MergeableState! + + """ + Whether or not the pull request was merged. + """ + merged: Boolean! + + """ + The date and time that the pull request was merged. + """ + mergedAt: DateTime + + """ + The actor who merged the pull request. + """ + mergedBy: Actor + + """ + Identifies the milestone associated with the pull request. + """ + milestone: Milestone + + """ + Identifies the pull request number. + """ + number: Int! + + """ + A list of Users that are participating in the Pull Request conversation. + """ + participants( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): UserConnection! + + """ + The permalink to the pull request. + """ + permalink: URI! + + """ + The commit that GitHub automatically generated to test if this pull request + could be merged. This field will not return a value if the pull request is + merged, or if the test merge commit is still being generated. See the + `mergeable` field for more details on the mergeability of the pull request. + """ + potentialMergeCommit: Commit + + """ + List of project cards associated with this pull request. + """ + projectCards( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + A list of archived states to filter the cards by + """ + archivedStates: [ProjectCardArchivedState] = [ARCHIVED, NOT_ARCHIVED] + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): ProjectCardConnection! + + """ + Identifies when the comment was published at. + """ + publishedAt: DateTime + + """ + A list of reactions grouped by content left on the subject. + """ + reactionGroups: [ReactionGroup!] + + """ + A list of Reactions left on the Issue. + """ + reactions( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Allows filtering Reactions by emoji. + """ + content: ReactionContent + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Allows specifying the order in which reactions are returned. + """ + orderBy: ReactionOrder + ): ReactionConnection! + + """ + The repository associated with this node. + """ + repository: Repository! + + """ + The HTTP path for this pull request. + """ + resourcePath: URI! + + """ + The HTTP path for reverting this pull request. + """ + revertResourcePath: URI! + + """ + The HTTP URL for reverting this pull request. + """ + revertUrl: URI! + + """ + The current status of this pull request with respect to code review. + """ + reviewDecision: PullRequestReviewDecision + + """ + A list of review requests associated with the pull request. + """ + reviewRequests( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): ReviewRequestConnection + + """ + The list of all review threads for this pull request. + """ + reviewThreads( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): PullRequestReviewThreadConnection! + + """ + A list of reviews associated with the pull request. + """ + reviews( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Filter by author of the review. + """ + author: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + A list of states to filter the reviews. + """ + states: [PullRequestReviewState!] + ): PullRequestReviewConnection + + """ + Identifies the state of the pull request. + """ + state: PullRequestState! + + """ + A list of reviewer suggestions based on commit history and past review comments. + """ + suggestedReviewers: [SuggestedReviewer]! + + """ + A list of events, comments, commits, etc. associated with the pull request. + """ + timeline( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Allows filtering timeline events by a `since` timestamp. + """ + since: DateTime + ): PullRequestTimelineConnection! @deprecated(reason: "`timeline` will be removed Use PullRequest.timelineItems instead. Removal on 2020-10-01 UTC.") + + """ + A list of events, comments, commits, etc. associated with the pull request. + """ + timelineItems( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Filter timeline items by type. + """ + itemTypes: [PullRequestTimelineItemsItemType!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Filter timeline items by a `since` timestamp. + """ + since: DateTime + + """ + Skips the first _n_ elements in the list. + """ + skip: Int + ): PullRequestTimelineItemsConnection! + + """ + Identifies the pull request title. + """ + title: String! + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! + + """ + The HTTP URL for this pull request. + """ + url: URI! + + """ + A list of edits to this content. + """ + userContentEdits( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): UserContentEditConnection + + """ + Whether or not the viewer can apply suggestion. + """ + viewerCanApplySuggestion: Boolean! + + """ + Check if the viewer can restore the deleted head ref. + """ + viewerCanDeleteHeadRef: Boolean! + + """ + Whether or not the viewer can disable auto-merge + """ + viewerCanDisableAutoMerge: Boolean! + + """ + Whether or not the viewer can enable auto-merge + """ + viewerCanEnableAutoMerge: Boolean! + + """ + Can user react to this subject + """ + viewerCanReact: Boolean! + + """ + Check if the viewer is able to change their subscription status for the repository. + """ + viewerCanSubscribe: Boolean! + + """ + Check if the current viewer can update this object. + """ + viewerCanUpdate: Boolean! + + """ + Reasons why the current viewer can not update this comment. + """ + viewerCannotUpdateReasons: [CommentCannotUpdateReason!]! + + """ + Did the viewer author this comment. + """ + viewerDidAuthor: Boolean! + + """ + The latest review given from the viewer. + """ + viewerLatestReview: PullRequestReview + + """ + The person who has requested the viewer for review on this pull request. + """ + viewerLatestReviewRequest: ReviewRequest + + """ + The merge body text for the viewer and method. + """ + viewerMergeBodyText( + """ + The merge method for the message. + """ + mergeType: PullRequestMergeMethod + ): String! + + """ + The merge headline text for the viewer and method. + """ + viewerMergeHeadlineText( + """ + The merge method for the message. + """ + mergeType: PullRequestMergeMethod + ): String! + + """ + Identifies if the viewer is watching, not watching, or ignoring the subscribable entity. + """ + viewerSubscription: SubscriptionState +} + +""" +A file changed in a pull request. +""" +type PullRequestChangedFile { + """ + The number of additions to the file. + """ + additions: Int! + + """ + The number of deletions to the file. + """ + deletions: Int! + + """ + The path of the file. + """ + path: String! + + """ + The state of the file for the viewer. + """ + viewerViewedState: FileViewedState! +} + +""" +The connection type for PullRequestChangedFile. +""" +type PullRequestChangedFileConnection { + """ + A list of edges. + """ + edges: [PullRequestChangedFileEdge] + + """ + A list of nodes. + """ + nodes: [PullRequestChangedFile] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type PullRequestChangedFileEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: PullRequestChangedFile +} + +""" +Represents a Git commit part of a pull request. +""" +type PullRequestCommit implements Node & UniformResourceLocatable { + """ + The Git commit object + """ + commit: Commit! + id: ID! + + """ + The pull request this commit belongs to + """ + pullRequest: PullRequest! + + """ + The HTTP path for this pull request commit + """ + resourcePath: URI! + + """ + The HTTP URL for this pull request commit + """ + url: URI! +} + +""" +Represents a commit comment thread part of a pull request. +""" +type PullRequestCommitCommentThread implements Node & RepositoryNode { + """ + The comments that exist in this thread. + """ + comments( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): CommitCommentConnection! + + """ + The commit the comments were made on. + """ + commit: Commit! + id: ID! + + """ + The file the comments were made on. + """ + path: String + + """ + The position in the diff for the commit that the comment was made on. + """ + position: Int + + """ + The pull request this commit comment thread belongs to + """ + pullRequest: PullRequest! + + """ + The repository associated with this node. + """ + repository: Repository! +} + +""" +The connection type for PullRequestCommit. +""" +type PullRequestCommitConnection { + """ + A list of edges. + """ + edges: [PullRequestCommitEdge] + + """ + A list of nodes. + """ + nodes: [PullRequestCommit] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type PullRequestCommitEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: PullRequestCommit +} + +""" +The connection type for PullRequest. +""" +type PullRequestConnection { + """ + A list of edges. + """ + edges: [PullRequestEdge] + + """ + A list of nodes. + """ + nodes: [PullRequest] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +This aggregates pull requests opened by a user within one repository. +""" +type PullRequestContributionsByRepository { + """ + The pull request contributions. + """ + contributions( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for contributions returned from the connection. + """ + orderBy: ContributionOrder = {direction: DESC} + ): CreatedPullRequestContributionConnection! + + """ + The repository in which the pull requests were opened. + """ + repository: Repository! +} + +""" +An edge in a connection. +""" +type PullRequestEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: PullRequest +} + +""" +Represents available types of methods to use when merging a pull request. +""" +enum PullRequestMergeMethod { + """ + Add all commits from the head branch to the base branch with a merge commit. + """ + MERGE + + """ + Add all commits from the head branch onto the base branch individually. + """ + REBASE + + """ + Combine all commits from the head branch into a single commit in the base branch. + """ + SQUASH +} + +""" +Ways in which lists of issues can be ordered upon return. +""" +input PullRequestOrder { + """ + The direction in which to order pull requests by the specified field. + """ + direction: OrderDirection! + + """ + The field in which to order pull requests by. + """ + field: PullRequestOrderField! +} + +""" +Properties by which pull_requests connections can be ordered. +""" +enum PullRequestOrderField { + """ + Order pull_requests by creation time + """ + CREATED_AT + + """ + Order pull_requests by update time + """ + UPDATED_AT +} + +""" +A review object for a given pull request. +""" +type PullRequestReview implements Comment & Deletable & Node & Reactable & RepositoryNode & Updatable & UpdatableComment { + """ + The actor who authored the comment. + """ + author: Actor + + """ + Author's association with the subject of the comment. + """ + authorAssociation: CommentAuthorAssociation! + + """ + Indicates whether the author of this review has push access to the repository. + """ + authorCanPushToRepository: Boolean! + + """ + Identifies the pull request review body. + """ + body: String! + + """ + The body rendered to HTML. + """ + bodyHTML: HTML! + + """ + The body of this review rendered as plain text. + """ + bodyText: String! + + """ + A list of review comments for the current pull request review. + """ + comments( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): PullRequestReviewCommentConnection! + + """ + Identifies the commit associated with this pull request review. + """ + commit: Commit + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Check if this comment was created via an email reply. + """ + createdViaEmail: Boolean! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + + """ + The actor who edited the comment. + """ + editor: Actor + id: ID! + + """ + Check if this comment was edited and includes an edit with the creation data + """ + includesCreatedEdit: Boolean! + + """ + The moment the editor made the last edit + """ + lastEditedAt: DateTime + + """ + A list of teams that this review was made on behalf of. + """ + onBehalfOf( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): TeamConnection! + + """ + Identifies when the comment was published at. + """ + publishedAt: DateTime + + """ + Identifies the pull request associated with this pull request review. + """ + pullRequest: PullRequest! + + """ + A list of reactions grouped by content left on the subject. + """ + reactionGroups: [ReactionGroup!] + + """ + A list of Reactions left on the Issue. + """ + reactions( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Allows filtering Reactions by emoji. + """ + content: ReactionContent + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Allows specifying the order in which reactions are returned. + """ + orderBy: ReactionOrder + ): ReactionConnection! + + """ + The repository associated with this node. + """ + repository: Repository! + + """ + The HTTP path permalink for this PullRequestReview. + """ + resourcePath: URI! + + """ + Identifies the current state of the pull request review. + """ + state: PullRequestReviewState! + + """ + Identifies when the Pull Request Review was submitted + """ + submittedAt: DateTime + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! + + """ + The HTTP URL permalink for this PullRequestReview. + """ + url: URI! + + """ + A list of edits to this content. + """ + userContentEdits( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): UserContentEditConnection + + """ + Check if the current viewer can delete this object. + """ + viewerCanDelete: Boolean! + + """ + Can user react to this subject + """ + viewerCanReact: Boolean! + + """ + Check if the current viewer can update this object. + """ + viewerCanUpdate: Boolean! + + """ + Reasons why the current viewer can not update this comment. + """ + viewerCannotUpdateReasons: [CommentCannotUpdateReason!]! + + """ + Did the viewer author this comment. + """ + viewerDidAuthor: Boolean! +} + +""" +A review comment associated with a given repository pull request. +""" +type PullRequestReviewComment implements Comment & Deletable & Minimizable & Node & Reactable & RepositoryNode & Updatable & UpdatableComment { + """ + The actor who authored the comment. + """ + author: Actor + + """ + Author's association with the subject of the comment. + """ + authorAssociation: CommentAuthorAssociation! + + """ + The comment body of this review comment. + """ + body: String! + + """ + The body rendered to HTML. + """ + bodyHTML: HTML! + + """ + The comment body of this review comment rendered as plain text. + """ + bodyText: String! + + """ + Identifies the commit associated with the comment. + """ + commit: Commit + + """ + Identifies when the comment was created. + """ + createdAt: DateTime! + + """ + Check if this comment was created via an email reply. + """ + createdViaEmail: Boolean! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + + """ + The diff hunk to which the comment applies. + """ + diffHunk: String! + + """ + Identifies when the comment was created in a draft state. + """ + draftedAt: DateTime! + + """ + The actor who edited the comment. + """ + editor: Actor + id: ID! + + """ + Check if this comment was edited and includes an edit with the creation data + """ + includesCreatedEdit: Boolean! + + """ + Returns whether or not a comment has been minimized. + """ + isMinimized: Boolean! + + """ + The moment the editor made the last edit + """ + lastEditedAt: DateTime + + """ + Returns why the comment was minimized. + """ + minimizedReason: String + + """ + Identifies the original commit associated with the comment. + """ + originalCommit: Commit + + """ + The original line index in the diff to which the comment applies. + """ + originalPosition: Int! + + """ + Identifies when the comment body is outdated + """ + outdated: Boolean! + + """ + The path to which the comment applies. + """ + path: String! + + """ + The line index in the diff to which the comment applies. + """ + position: Int + + """ + Identifies when the comment was published at. + """ + publishedAt: DateTime + + """ + The pull request associated with this review comment. + """ + pullRequest: PullRequest! + + """ + The pull request review associated with this review comment. + """ + pullRequestReview: PullRequestReview + + """ + A list of reactions grouped by content left on the subject. + """ + reactionGroups: [ReactionGroup!] + + """ + A list of Reactions left on the Issue. + """ + reactions( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Allows filtering Reactions by emoji. + """ + content: ReactionContent + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Allows specifying the order in which reactions are returned. + """ + orderBy: ReactionOrder + ): ReactionConnection! + + """ + The comment this is a reply to. + """ + replyTo: PullRequestReviewComment + + """ + The repository associated with this node. + """ + repository: Repository! + + """ + The HTTP path permalink for this review comment. + """ + resourcePath: URI! + + """ + Identifies the state of the comment. + """ + state: PullRequestReviewCommentState! + + """ + Identifies when the comment was last updated. + """ + updatedAt: DateTime! + + """ + The HTTP URL permalink for this review comment. + """ + url: URI! + + """ + A list of edits to this content. + """ + userContentEdits( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): UserContentEditConnection + + """ + Check if the current viewer can delete this object. + """ + viewerCanDelete: Boolean! + + """ + Check if the current viewer can minimize this object. + """ + viewerCanMinimize: Boolean! + + """ + Can user react to this subject + """ + viewerCanReact: Boolean! + + """ + Check if the current viewer can update this object. + """ + viewerCanUpdate: Boolean! + + """ + Reasons why the current viewer can not update this comment. + """ + viewerCannotUpdateReasons: [CommentCannotUpdateReason!]! + + """ + Did the viewer author this comment. + """ + viewerDidAuthor: Boolean! +} + +""" +The connection type for PullRequestReviewComment. +""" +type PullRequestReviewCommentConnection { + """ + A list of edges. + """ + edges: [PullRequestReviewCommentEdge] + + """ + A list of nodes. + """ + nodes: [PullRequestReviewComment] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type PullRequestReviewCommentEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: PullRequestReviewComment +} + +""" +The possible states of a pull request review comment. +""" +enum PullRequestReviewCommentState { + """ + A comment that is part of a pending review + """ + PENDING + + """ + A comment that is part of a submitted review + """ + SUBMITTED +} + +""" +The connection type for PullRequestReview. +""" +type PullRequestReviewConnection { + """ + A list of edges. + """ + edges: [PullRequestReviewEdge] + + """ + A list of nodes. + """ + nodes: [PullRequestReview] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +This aggregates pull request reviews made by a user within one repository. +""" +type PullRequestReviewContributionsByRepository { + """ + The pull request review contributions. + """ + contributions( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for contributions returned from the connection. + """ + orderBy: ContributionOrder = {direction: DESC} + ): CreatedPullRequestReviewContributionConnection! + + """ + The repository in which the pull request reviews were made. + """ + repository: Repository! +} + +""" +The review status of a pull request. +""" +enum PullRequestReviewDecision { + """ + The pull request has received an approving review. + """ + APPROVED + + """ + Changes have been requested on the pull request. + """ + CHANGES_REQUESTED + + """ + A review is required before the pull request can be merged. + """ + REVIEW_REQUIRED +} + +""" +An edge in a connection. +""" +type PullRequestReviewEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: PullRequestReview +} + +""" +The possible events to perform on a pull request review. +""" +enum PullRequestReviewEvent { + """ + Submit feedback and approve merging these changes. + """ + APPROVE + + """ + Submit general feedback without explicit approval. + """ + COMMENT + + """ + Dismiss review so it now longer effects merging. + """ + DISMISS + + """ + Submit feedback that must be addressed before merging. + """ + REQUEST_CHANGES +} + +""" +The possible states of a pull request review. +""" +enum PullRequestReviewState { + """ + A review allowing the pull request to merge. + """ + APPROVED + + """ + A review blocking the pull request from merging. + """ + CHANGES_REQUESTED + + """ + An informational review. + """ + COMMENTED + + """ + A review that has been dismissed. + """ + DISMISSED + + """ + A review that has not yet been submitted. + """ + PENDING +} + +""" +A threaded list of comments for a given pull request. +""" +type PullRequestReviewThread implements Node { + """ + A list of pull request comments associated with the thread. + """ + comments( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Skips the first _n_ elements in the list. + """ + skip: Int + ): PullRequestReviewCommentConnection! + + """ + The side of the diff on which this thread was placed. + """ + diffSide: DiffSide! + id: ID! + + """ + Whether or not the thread has been collapsed (outdated or resolved) + """ + isCollapsed: Boolean! + + """ + Indicates whether this thread was outdated by newer changes. + """ + isOutdated: Boolean! + + """ + Whether this thread has been resolved + """ + isResolved: Boolean! + + """ + The line in the file to which this thread refers + """ + line: Int + + """ + The original line in the file to which this thread refers. + """ + originalLine: Int + + """ + The original start line in the file to which this thread refers (multi-line only). + """ + originalStartLine: Int + + """ + Identifies the file path of this thread. + """ + path: String! + + """ + Identifies the pull request associated with this thread. + """ + pullRequest: PullRequest! + + """ + Identifies the repository associated with this thread. + """ + repository: Repository! + + """ + The user who resolved this thread + """ + resolvedBy: User + + """ + The side of the diff that the first line of the thread starts on (multi-line only) + """ + startDiffSide: DiffSide + + """ + The start line in the file to which this thread refers (multi-line only) + """ + startLine: Int + + """ + Indicates whether the current viewer can reply to this thread. + """ + viewerCanReply: Boolean! + + """ + Whether or not the viewer can resolve this thread + """ + viewerCanResolve: Boolean! + + """ + Whether or not the viewer can unresolve this thread + """ + viewerCanUnresolve: Boolean! +} + +""" +Review comment threads for a pull request review. +""" +type PullRequestReviewThreadConnection { + """ + A list of edges. + """ + edges: [PullRequestReviewThreadEdge] + + """ + A list of nodes. + """ + nodes: [PullRequestReviewThread] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type PullRequestReviewThreadEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: PullRequestReviewThread +} + +""" +Represents the latest point in the pull request timeline for which the viewer has seen the pull request's commits. +""" +type PullRequestRevisionMarker { + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + The last commit the viewer has seen. + """ + lastSeenCommit: Commit! + + """ + The pull request to which the marker belongs. + """ + pullRequest: PullRequest! +} + +""" +The possible states of a pull request. +""" +enum PullRequestState { + """ + A pull request that has been closed without being merged. + """ + CLOSED + + """ + A pull request that has been closed by being merged. + """ + MERGED + + """ + A pull request that is still open. + """ + OPEN +} + +""" +The connection type for PullRequestTimelineItem. +""" +type PullRequestTimelineConnection { + """ + A list of edges. + """ + edges: [PullRequestTimelineItemEdge] + + """ + A list of nodes. + """ + nodes: [PullRequestTimelineItem] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An item in a pull request timeline +""" +union PullRequestTimelineItem = AssignedEvent | BaseRefDeletedEvent | BaseRefForcePushedEvent | ClosedEvent | Commit | CommitCommentThread | CrossReferencedEvent | DemilestonedEvent | DeployedEvent | DeploymentEnvironmentChangedEvent | HeadRefDeletedEvent | HeadRefForcePushedEvent | HeadRefRestoredEvent | IssueComment | LabeledEvent | LockedEvent | MergedEvent | MilestonedEvent | PullRequestReview | PullRequestReviewComment | PullRequestReviewThread | ReferencedEvent | RenamedTitleEvent | ReopenedEvent | ReviewDismissedEvent | ReviewRequestRemovedEvent | ReviewRequestedEvent | SubscribedEvent | UnassignedEvent | UnlabeledEvent | UnlockedEvent | UnsubscribedEvent | UserBlockedEvent + +""" +An edge in a connection. +""" +type PullRequestTimelineItemEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: PullRequestTimelineItem +} + +""" +An item in a pull request timeline +""" +union PullRequestTimelineItems = AddedToProjectEvent | AssignedEvent | AutoMergeDisabledEvent | AutoMergeEnabledEvent | AutoRebaseEnabledEvent | AutoSquashEnabledEvent | AutomaticBaseChangeFailedEvent | AutomaticBaseChangeSucceededEvent | BaseRefChangedEvent | BaseRefDeletedEvent | BaseRefForcePushedEvent | ClosedEvent | CommentDeletedEvent | ConnectedEvent | ConvertToDraftEvent | ConvertedNoteToIssueEvent | CrossReferencedEvent | DemilestonedEvent | DeployedEvent | DeploymentEnvironmentChangedEvent | DisconnectedEvent | HeadRefDeletedEvent | HeadRefForcePushedEvent | HeadRefRestoredEvent | IssueComment | LabeledEvent | LockedEvent | MarkedAsDuplicateEvent | MentionedEvent | MergedEvent | MilestonedEvent | MovedColumnsInProjectEvent | PinnedEvent | PullRequestCommit | PullRequestCommitCommentThread | PullRequestReview | PullRequestReviewThread | PullRequestRevisionMarker | ReadyForReviewEvent | ReferencedEvent | RemovedFromProjectEvent | RenamedTitleEvent | ReopenedEvent | ReviewDismissedEvent | ReviewRequestRemovedEvent | ReviewRequestedEvent | SubscribedEvent | TransferredEvent | UnassignedEvent | UnlabeledEvent | UnlockedEvent | UnmarkedAsDuplicateEvent | UnpinnedEvent | UnsubscribedEvent | UserBlockedEvent + +""" +The connection type for PullRequestTimelineItems. +""" +type PullRequestTimelineItemsConnection { + """ + A list of edges. + """ + edges: [PullRequestTimelineItemsEdge] + + """ + Identifies the count of items after applying `before` and `after` filters. + """ + filteredCount: Int! + + """ + A list of nodes. + """ + nodes: [PullRequestTimelineItems] + + """ + Identifies the count of items after applying `before`/`after` filters and `first`/`last`/`skip` slicing. + """ + pageCount: Int! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! + + """ + Identifies the date and time when the timeline was last updated. + """ + updatedAt: DateTime! +} + +""" +An edge in a connection. +""" +type PullRequestTimelineItemsEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: PullRequestTimelineItems +} + +""" +The possible item types found in a timeline. +""" +enum PullRequestTimelineItemsItemType { + """ + Represents a 'added_to_project' event on a given issue or pull request. + """ + ADDED_TO_PROJECT_EVENT + + """ + Represents an 'assigned' event on any assignable object. + """ + ASSIGNED_EVENT + + """ + Represents a 'automatic_base_change_failed' event on a given pull request. + """ + AUTOMATIC_BASE_CHANGE_FAILED_EVENT + + """ + Represents a 'automatic_base_change_succeeded' event on a given pull request. + """ + AUTOMATIC_BASE_CHANGE_SUCCEEDED_EVENT + + """ + Represents a 'auto_merge_disabled' event on a given pull request. + """ + AUTO_MERGE_DISABLED_EVENT + + """ + Represents a 'auto_merge_enabled' event on a given pull request. + """ + AUTO_MERGE_ENABLED_EVENT + + """ + Represents a 'auto_rebase_enabled' event on a given pull request. + """ + AUTO_REBASE_ENABLED_EVENT + + """ + Represents a 'auto_squash_enabled' event on a given pull request. + """ + AUTO_SQUASH_ENABLED_EVENT + + """ + Represents a 'base_ref_changed' event on a given issue or pull request. + """ + BASE_REF_CHANGED_EVENT + + """ + Represents a 'base_ref_deleted' event on a given pull request. + """ + BASE_REF_DELETED_EVENT + + """ + Represents a 'base_ref_force_pushed' event on a given pull request. + """ + BASE_REF_FORCE_PUSHED_EVENT + + """ + Represents a 'closed' event on any `Closable`. + """ + CLOSED_EVENT + + """ + Represents a 'comment_deleted' event on a given issue or pull request. + """ + COMMENT_DELETED_EVENT + + """ + Represents a 'connected' event on a given issue or pull request. + """ + CONNECTED_EVENT + + """ + Represents a 'converted_note_to_issue' event on a given issue or pull request. + """ + CONVERTED_NOTE_TO_ISSUE_EVENT + + """ + Represents a 'convert_to_draft' event on a given pull request. + """ + CONVERT_TO_DRAFT_EVENT + + """ + Represents a mention made by one issue or pull request to another. + """ + CROSS_REFERENCED_EVENT + + """ + Represents a 'demilestoned' event on a given issue or pull request. + """ + DEMILESTONED_EVENT + + """ + Represents a 'deployed' event on a given pull request. + """ + DEPLOYED_EVENT + + """ + Represents a 'deployment_environment_changed' event on a given pull request. + """ + DEPLOYMENT_ENVIRONMENT_CHANGED_EVENT + + """ + Represents a 'disconnected' event on a given issue or pull request. + """ + DISCONNECTED_EVENT + + """ + Represents a 'head_ref_deleted' event on a given pull request. + """ + HEAD_REF_DELETED_EVENT + + """ + Represents a 'head_ref_force_pushed' event on a given pull request. + """ + HEAD_REF_FORCE_PUSHED_EVENT + + """ + Represents a 'head_ref_restored' event on a given pull request. + """ + HEAD_REF_RESTORED_EVENT + + """ + Represents a comment on an Issue. + """ + ISSUE_COMMENT + + """ + Represents a 'labeled' event on a given issue or pull request. + """ + LABELED_EVENT + + """ + Represents a 'locked' event on a given issue or pull request. + """ + LOCKED_EVENT + + """ + Represents a 'marked_as_duplicate' event on a given issue or pull request. + """ + MARKED_AS_DUPLICATE_EVENT + + """ + Represents a 'mentioned' event on a given issue or pull request. + """ + MENTIONED_EVENT + + """ + Represents a 'merged' event on a given pull request. + """ + MERGED_EVENT + + """ + Represents a 'milestoned' event on a given issue or pull request. + """ + MILESTONED_EVENT + + """ + Represents a 'moved_columns_in_project' event on a given issue or pull request. + """ + MOVED_COLUMNS_IN_PROJECT_EVENT + + """ + Represents a 'pinned' event on a given issue or pull request. + """ + PINNED_EVENT + + """ + Represents a Git commit part of a pull request. + """ + PULL_REQUEST_COMMIT + + """ + Represents a commit comment thread part of a pull request. + """ + PULL_REQUEST_COMMIT_COMMENT_THREAD + + """ + A review object for a given pull request. + """ + PULL_REQUEST_REVIEW + + """ + A threaded list of comments for a given pull request. + """ + PULL_REQUEST_REVIEW_THREAD + + """ + Represents the latest point in the pull request timeline for which the viewer has seen the pull request's commits. + """ + PULL_REQUEST_REVISION_MARKER + + """ + Represents a 'ready_for_review' event on a given pull request. + """ + READY_FOR_REVIEW_EVENT + + """ + Represents a 'referenced' event on a given `ReferencedSubject`. + """ + REFERENCED_EVENT + + """ + Represents a 'removed_from_project' event on a given issue or pull request. + """ + REMOVED_FROM_PROJECT_EVENT + + """ + Represents a 'renamed' event on a given issue or pull request + """ + RENAMED_TITLE_EVENT + + """ + Represents a 'reopened' event on any `Closable`. + """ + REOPENED_EVENT + + """ + Represents a 'review_dismissed' event on a given issue or pull request. + """ + REVIEW_DISMISSED_EVENT + + """ + Represents an 'review_requested' event on a given pull request. + """ + REVIEW_REQUESTED_EVENT + + """ + Represents an 'review_request_removed' event on a given pull request. + """ + REVIEW_REQUEST_REMOVED_EVENT + + """ + Represents a 'subscribed' event on a given `Subscribable`. + """ + SUBSCRIBED_EVENT + + """ + Represents a 'transferred' event on a given issue or pull request. + """ + TRANSFERRED_EVENT + + """ + Represents an 'unassigned' event on any assignable object. + """ + UNASSIGNED_EVENT + + """ + Represents an 'unlabeled' event on a given issue or pull request. + """ + UNLABELED_EVENT + + """ + Represents an 'unlocked' event on a given issue or pull request. + """ + UNLOCKED_EVENT + + """ + Represents an 'unmarked_as_duplicate' event on a given issue or pull request. + """ + UNMARKED_AS_DUPLICATE_EVENT + + """ + Represents an 'unpinned' event on a given issue or pull request. + """ + UNPINNED_EVENT + + """ + Represents an 'unsubscribed' event on a given `Subscribable`. + """ + UNSUBSCRIBED_EVENT + + """ + Represents a 'user_blocked' event on a given user. + """ + USER_BLOCKED_EVENT +} + +""" +The possible target states when updating a pull request. +""" +enum PullRequestUpdateState { + """ + A pull request that has been closed without being merged. + """ + CLOSED + + """ + A pull request that is still open. + """ + OPEN +} + +""" +A Git push. +""" +type Push implements Node { + id: ID! + + """ + The SHA after the push + """ + nextSha: GitObjectID + + """ + The permalink for this push. + """ + permalink: URI! + + """ + The SHA before the push + """ + previousSha: GitObjectID + + """ + The user who pushed + """ + pusher: User! + + """ + The repository that was pushed to + """ + repository: Repository! +} + +""" +A team, user or app who has the ability to push to a protected branch. +""" +type PushAllowance implements Node { + """ + The actor that can push. + """ + actor: PushAllowanceActor + + """ + Identifies the branch protection rule associated with the allowed user or team. + """ + branchProtectionRule: BranchProtectionRule + id: ID! +} + +""" +Types that can be an actor. +""" +union PushAllowanceActor = App | Team | User + +""" +The connection type for PushAllowance. +""" +type PushAllowanceConnection { + """ + A list of edges. + """ + edges: [PushAllowanceEdge] + + """ + A list of nodes. + """ + nodes: [PushAllowance] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type PushAllowanceEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: PushAllowance +} + +""" +The query root of GitHub's GraphQL interface. +""" +type Query { + getApiVersion: String! + + """ + Look up a code of conduct by its key + """ + codeOfConduct( + """ + The code of conduct's key + """ + key: String! + ): CodeOfConduct + + """ + Look up a code of conduct by its key + """ + codesOfConduct: [CodeOfConduct] + + """ + Look up an enterprise by URL slug. + """ + enterprise( + """ + The enterprise invitation token. + """ + invitationToken: String + + """ + The enterprise URL slug. + """ + slug: String! + ): Enterprise + + """ + Look up a pending enterprise administrator invitation by invitee, enterprise and role. + """ + enterpriseAdministratorInvitation( + """ + The slug of the enterprise the user was invited to join. + """ + enterpriseSlug: String! + + """ + The role for the business member invitation. + """ + role: EnterpriseAdministratorRole! + + """ + The login of the user invited to join the business. + """ + userLogin: String! + ): EnterpriseAdministratorInvitation + + """ + Look up a pending enterprise administrator invitation by invitation token. + """ + enterpriseAdministratorInvitationByToken( + """ + The invitation token sent with the invitation email. + """ + invitationToken: String! + ): EnterpriseAdministratorInvitation + + """ + Look up an open source license by its key + """ + license( + """ + The license's downcased SPDX ID + """ + key: String! + ): License + + """ + Return a list of known open source licenses + """ + licenses: [License]! + + """ + Get alphabetically sorted list of Marketplace categories + """ + marketplaceCategories( + """ + Exclude categories with no listings. + """ + excludeEmpty: Boolean + + """ + Returns top level categories only, excluding any subcategories. + """ + excludeSubcategories: Boolean + + """ + Return only the specified categories. + """ + includeCategories: [String!] + ): [MarketplaceCategory!]! + + """ + Look up a Marketplace category by its slug. + """ + marketplaceCategory( + """ + The URL slug of the category. + """ + slug: String! + + """ + Also check topic aliases for the category slug + """ + useTopicAliases: Boolean + ): MarketplaceCategory + + """ + Look up a single Marketplace listing + """ + marketplaceListing( + """ + Select the listing that matches this slug. It's the short name of the listing used in its URL. + """ + slug: String! + ): MarketplaceListing + + """ + Look up Marketplace listings + """ + marketplaceListings( + """ + Select listings that can be administered by the specified user. + """ + adminId: ID + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Select listings visible to the viewer even if they are not approved. If omitted or + false, only approved listings will be returned. + """ + allStates: Boolean + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Select only listings with the given category. + """ + categorySlug: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Select listings for products owned by the specified organization. + """ + organizationId: ID + + """ + Select only listings where the primary category matches the given category slug. + """ + primaryCategoryOnly: Boolean = false + + """ + Select the listings with these slugs, if they are visible to the viewer. + """ + slugs: [String] + + """ + Also check topic aliases for the category slug + """ + useTopicAliases: Boolean + + """ + Select listings to which user has admin access. If omitted, listings visible to the + viewer are returned. + """ + viewerCanAdmin: Boolean + + """ + Select only listings that offer a free trial. + """ + withFreeTrialsOnly: Boolean = false + ): MarketplaceListingConnection! + + """ + Return information about the GitHub instance + """ + meta: GitHubMetadata! + + """ + Fetches an object given its ID. + """ + node( + """ + ID of the object. + """ + id: ID! + ): Node + + """ + Lookup nodes by a list of IDs. + """ + nodes( + """ + The list of node IDs. + """ + ids: [ID!]! + ): [Node]! + + """ + Lookup a organization by login. + """ + organization( + """ + The organization's login. + """ + login: String! + ): Organization + + """ + The client's rate limit information. + """ + rateLimit( + """ + If true, calculate the cost for the query without evaluating it + """ + dryRun: Boolean = false + ): RateLimit + + """ + Hack to workaround https://github.com/facebook/relay/issues/112 re-exposing the root query object + """ + relay: Query! + + """ + Lookup a given repository by the owner and repository name. + """ + repository( + """ + The name of the repository + """ + name: String! + + """ + The login field of a user or organization + """ + owner: String! + ): Repository + + """ + Lookup a repository owner (ie. either a User or an Organization) by login. + """ + repositoryOwner( + """ + The username to lookup the owner by. + """ + login: String! + ): RepositoryOwner + + """ + Lookup resource by a URL. + """ + resource( + """ + The URL. + """ + url: URI! + ): UniformResourceLocatable + + """ + Perform a search across resources. + """ + search( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + The search string to look for. + """ + query: String! + + """ + The types of search items to search within. + """ + type: SearchType! + ): SearchResultItemConnection! + + """ + GitHub Security Advisories + """ + securityAdvisories( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Filter advisories by identifier, e.g. GHSA or CVE. + """ + identifier: SecurityAdvisoryIdentifierFilter + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for the returned topics. + """ + orderBy: SecurityAdvisoryOrder = {field: UPDATED_AT, direction: DESC} + + """ + Filter advisories to those published since a time in the past. + """ + publishedSince: DateTime + + """ + Filter advisories to those updated since a time in the past. + """ + updatedSince: DateTime + ): SecurityAdvisoryConnection! + + """ + Fetch a Security Advisory by its GHSA ID + """ + securityAdvisory( + """ + GitHub Security Advisory ID. + """ + ghsaId: String! + ): SecurityAdvisory + + """ + Software Vulnerabilities documented by GitHub Security Advisories + """ + securityVulnerabilities( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + An ecosystem to filter vulnerabilities by. + """ + ecosystem: SecurityAdvisoryEcosystem + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for the returned topics. + """ + orderBy: SecurityVulnerabilityOrder = {field: UPDATED_AT, direction: DESC} + + """ + A package name to filter vulnerabilities by. + """ + package: String + + """ + A list of severities to filter vulnerabilities by. + """ + severities: [SecurityAdvisorySeverity!] + ): SecurityVulnerabilityConnection! + + """ + Users and organizations who can be sponsored via GitHub Sponsors. + """ + sponsorables( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Optional filter for which dependencies should be checked for sponsorable + owners. Only sponsorable owners of dependencies in this ecosystem will be + included. Used when onlyDependencies = true. + """ + dependencyEcosystem: SecurityAdvisoryEcosystem + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Whether only sponsorables who own the viewer's dependencies will be + returned. Must be authenticated to use. Can check an organization instead + for their dependencies owned by sponsorables by passing + orgLoginForDependencies. + """ + onlyDependencies: Boolean = false + + """ + Ordering options for users and organizations returned from the connection. + """ + orderBy: SponsorableOrder = {field: LOGIN, direction: ASC} + + """ + Optional organization username for whose dependencies should be checked. + Used when onlyDependencies = true. Omit to check your own dependencies. If + you are not an administrator of the organization, only dependencies from its + public repositories will be considered. + """ + orgLoginForDependencies: String + ): SponsorableItemConnection! + + """ + Look up a single Sponsors Listing + """ + sponsorsListing( + """ + Select the Sponsors listing which matches this slug + """ + slug: String! + ): SponsorsListing @deprecated(reason: "`Query.sponsorsListing` will be removed. Use `Sponsorable.sponsorsListing` instead. Removal on 2020-04-01 UTC.") + + """ + Look up a topic by name. + """ + topic( + """ + The topic's name. + """ + name: String! + ): Topic + + """ + Lookup a user by login. + """ + user( + """ + The user's login. + """ + login: String! + ): User + + """ + The currently authenticated user. + """ + viewer: User! +} + +""" +Represents the client's rate limit. +""" +type RateLimit { + """ + The point cost for the current query counting against the rate limit. + """ + cost: Int! + + """ + The maximum number of points the client is permitted to consume in a 60 minute window. + """ + limit: Int! + + """ + The maximum number of nodes this query may return + """ + nodeCount: Int! + + """ + The number of points remaining in the current rate limit window. + """ + remaining: Int! + + """ + The time at which the current rate limit window resets in UTC epoch seconds. + """ + resetAt: DateTime! + + """ + The number of points used in the current rate limit window. + """ + used: Int! +} + +""" +Represents a subject that can be reacted on. +""" +interface Reactable { + """ + Identifies the primary key from the database. + """ + databaseId: Int + id: ID! + + """ + A list of reactions grouped by content left on the subject. + """ + reactionGroups: [ReactionGroup!] + + """ + A list of Reactions left on the Issue. + """ + reactions( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Allows filtering Reactions by emoji. + """ + content: ReactionContent + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Allows specifying the order in which reactions are returned. + """ + orderBy: ReactionOrder + ): ReactionConnection! + + """ + Can user react to this subject + """ + viewerCanReact: Boolean! +} + +""" +The connection type for User. +""" +type ReactingUserConnection { + """ + A list of edges. + """ + edges: [ReactingUserEdge] + + """ + A list of nodes. + """ + nodes: [User] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +Represents a user that's made a reaction. +""" +type ReactingUserEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + node: User! + + """ + The moment when the user made the reaction. + """ + reactedAt: DateTime! +} + +""" +An emoji reaction to a particular piece of content. +""" +type Reaction implements Node { + """ + Identifies the emoji reaction. + """ + content: ReactionContent! + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + id: ID! + + """ + The reactable piece of content + """ + reactable: Reactable! + + """ + Identifies the user who created this reaction. + """ + user: User +} + +""" +A list of reactions that have been left on the subject. +""" +type ReactionConnection { + """ + A list of edges. + """ + edges: [ReactionEdge] + + """ + A list of nodes. + """ + nodes: [Reaction] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! + + """ + Whether or not the authenticated user has left a reaction on the subject. + """ + viewerHasReacted: Boolean! +} + +""" +Emojis that can be attached to Issues, Pull Requests and Comments. +""" +enum ReactionContent { + """ + Represents the `:confused:` emoji. + """ + CONFUSED + + """ + Represents the `:eyes:` emoji. + """ + EYES + + """ + Represents the `:heart:` emoji. + """ + HEART + + """ + Represents the `:hooray:` emoji. + """ + HOORAY + + """ + Represents the `:laugh:` emoji. + """ + LAUGH + + """ + Represents the `:rocket:` emoji. + """ + ROCKET + + """ + Represents the `:-1:` emoji. + """ + THUMBS_DOWN + + """ + Represents the `:+1:` emoji. + """ + THUMBS_UP +} + +""" +An edge in a connection. +""" +type ReactionEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Reaction +} + +""" +A group of emoji reactions to a particular piece of content. +""" +type ReactionGroup { + """ + Identifies the emoji reaction. + """ + content: ReactionContent! + + """ + Identifies when the reaction was created. + """ + createdAt: DateTime + + """ + The subject that was reacted to. + """ + subject: Reactable! + + """ + Users who have reacted to the reaction subject with the emotion represented by this reaction group + """ + users( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): ReactingUserConnection! + + """ + Whether or not the authenticated user has left a reaction on the subject. + """ + viewerHasReacted: Boolean! +} + +""" +Ways in which lists of reactions can be ordered upon return. +""" +input ReactionOrder { + """ + The direction in which to order reactions by the specified field. + """ + direction: OrderDirection! + + """ + The field in which to order reactions by. + """ + field: ReactionOrderField! +} + +""" +A list of fields that reactions can be ordered by. +""" +enum ReactionOrderField { + """ + Allows ordering a list of reactions by when they were created. + """ + CREATED_AT +} + +""" +Represents a 'ready_for_review' event on a given pull request. +""" +type ReadyForReviewEvent implements Node & UniformResourceLocatable { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! + + """ + PullRequest referenced by event. + """ + pullRequest: PullRequest! + + """ + The HTTP path for this ready for review event. + """ + resourcePath: URI! + + """ + The HTTP URL for this ready for review event. + """ + url: URI! +} + +""" +Represents a Git reference. +""" +type Ref implements Node { + """ + A list of pull requests with this ref as the head ref. + """ + associatedPullRequests( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + The base ref name to filter the pull requests by. + """ + baseRefName: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + The head ref name to filter the pull requests by. + """ + headRefName: String + + """ + A list of label names to filter the pull requests by. + """ + labels: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for pull requests returned from the connection. + """ + orderBy: IssueOrder + + """ + A list of states to filter the pull requests by. + """ + states: [PullRequestState!] + ): PullRequestConnection! + + """ + Branch protection rules for this ref + """ + branchProtectionRule: BranchProtectionRule + id: ID! + + """ + The ref name. + """ + name: String! + + """ + The ref's prefix, such as `refs/heads/` or `refs/tags/`. + """ + prefix: String! + + """ + Branch protection rules that are viewable by non-admins + """ + refUpdateRule: RefUpdateRule + + """ + The repository the ref belongs to. + """ + repository: Repository! + + """ + The object the ref points to. Returns null when object does not exist. + """ + target: GitObject +} + +""" +The connection type for Ref. +""" +type RefConnection { + """ + A list of edges. + """ + edges: [RefEdge] + + """ + A list of nodes. + """ + nodes: [Ref] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type RefEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Ref +} + +""" +Ways in which lists of git refs can be ordered upon return. +""" +input RefOrder { + """ + The direction in which to order refs by the specified field. + """ + direction: OrderDirection! + + """ + The field in which to order refs by. + """ + field: RefOrderField! +} + +""" +Properties by which ref connections can be ordered. +""" +enum RefOrderField { + """ + Order refs by their alphanumeric name + """ + ALPHABETICAL + + """ + Order refs by underlying commit date if the ref prefix is refs/tags/ + """ + TAG_COMMIT_DATE +} + +""" +A ref update +""" +input RefUpdate @preview(toggledBy: "update-refs-preview") { + """ + The value this ref should be updated to. + """ + afterOid: GitObjectID! + + """ + The value this ref needs to point to before the update. + """ + beforeOid: GitObjectID + + """ + Force a non fast-forward update. + """ + force: Boolean = false + + """ + The fully qualified name of the ref to be update. For example `refs/heads/branch-name` + """ + name: GitRefname! +} + +""" +A ref update rules for a viewer. +""" +type RefUpdateRule { + """ + Can this branch be deleted. + """ + allowsDeletions: Boolean! + + """ + Are force pushes allowed on this branch. + """ + allowsForcePushes: Boolean! + + """ + Identifies the protection rule pattern. + """ + pattern: String! + + """ + Number of approving reviews required to update matching branches. + """ + requiredApprovingReviewCount: Int + + """ + List of required status check contexts that must pass for commits to be accepted to matching branches. + """ + requiredStatusCheckContexts: [String] + + """ + Are reviews from code owners required to update matching branches. + """ + requiresCodeOwnerReviews: Boolean! + + """ + Are merge commits prohibited from being pushed to this branch. + """ + requiresLinearHistory: Boolean! + + """ + Are commits required to be signed. + """ + requiresSignatures: Boolean! + + """ + Is the viewer allowed to dismiss reviews. + """ + viewerAllowedToDismissReviews: Boolean! + + """ + Can the viewer push to the branch + """ + viewerCanPush: Boolean! +} + +""" +Represents a 'referenced' event on a given `ReferencedSubject`. +""" +type ReferencedEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the commit associated with the 'referenced' event. + """ + commit: Commit + + """ + Identifies the repository associated with the 'referenced' event. + """ + commitRepository: Repository! + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! + + """ + Reference originated in a different repository. + """ + isCrossRepository: Boolean! + + """ + Checks if the commit message itself references the subject. Can be false in the case of a commit comment reference. + """ + isDirectReference: Boolean! + + """ + Object referenced by event. + """ + subject: ReferencedSubject! +} + +""" +Any referencable object +""" +union ReferencedSubject = Issue | PullRequest + +""" +Autogenerated input type of RegenerateEnterpriseIdentityProviderRecoveryCodes +""" +input RegenerateEnterpriseIdentityProviderRecoveryCodesInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the enterprise on which to set an identity provider. + """ + enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) +} + +""" +Autogenerated return type of RegenerateEnterpriseIdentityProviderRecoveryCodes +""" +type RegenerateEnterpriseIdentityProviderRecoveryCodesPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The identity provider for the enterprise. + """ + identityProvider: EnterpriseIdentityProvider +} + +""" +Autogenerated input type of RegenerateVerifiableDomainToken +""" +input RegenerateVerifiableDomainTokenInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the verifiable domain to regenerate the verification token of. + """ + id: ID! @possibleTypes(concreteTypes: ["VerifiableDomain"]) +} + +""" +Autogenerated return type of RegenerateVerifiableDomainToken +""" +type RegenerateVerifiableDomainTokenPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The verification token that was generated. + """ + verificationToken: String +} + +""" +A release contains the content for a release. +""" +type Release implements Node & UniformResourceLocatable { + """ + The author of the release + """ + author: User + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + The description of the release. + """ + description: String + + """ + The description of this release rendered to HTML. + """ + descriptionHTML: HTML + id: ID! + + """ + Whether or not the release is a draft + """ + isDraft: Boolean! + + """ + Whether or not the release is the latest releast + """ + isLatest: Boolean! + + """ + Whether or not the release is a prerelease + """ + isPrerelease: Boolean! + + """ + The title of the release. + """ + name: String + + """ + Identifies the date and time when the release was created. + """ + publishedAt: DateTime + + """ + List of releases assets which are dependent on this release. + """ + releaseAssets( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + A list of names to filter the assets by. + """ + name: String + ): ReleaseAssetConnection! + + """ + The repository that the release belongs to. + """ + repository: Repository! + + """ + The HTTP path for this issue + """ + resourcePath: URI! + + """ + A description of the release, rendered to HTML without any links in it. + """ + shortDescriptionHTML( + """ + How many characters to return. + """ + limit: Int = 200 + ): HTML + + """ + The Git tag the release points to + """ + tag: Ref + + """ + The tag commit for this release. + """ + tagCommit: Commit + + """ + The name of the release's Git tag + """ + tagName: String! + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! + + """ + The HTTP URL for this issue + """ + url: URI! +} + +""" +A release asset contains the content for a release asset. +""" +type ReleaseAsset implements Node { + """ + The asset's content-type + """ + contentType: String! + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + The number of times this asset was downloaded + """ + downloadCount: Int! + + """ + Identifies the URL where you can download the release asset via the browser. + """ + downloadUrl: URI! + id: ID! + + """ + Identifies the title of the release asset. + """ + name: String! + + """ + Release that the asset is associated with + """ + release: Release + + """ + The size (in bytes) of the asset + """ + size: Int! + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! + + """ + The user that performed the upload + """ + uploadedBy: User! + + """ + Identifies the URL of the release asset. + """ + url: URI! +} + +""" +The connection type for ReleaseAsset. +""" +type ReleaseAssetConnection { + """ + A list of edges. + """ + edges: [ReleaseAssetEdge] + + """ + A list of nodes. + """ + nodes: [ReleaseAsset] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type ReleaseAssetEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: ReleaseAsset +} + +""" +The connection type for Release. +""" +type ReleaseConnection { + """ + A list of edges. + """ + edges: [ReleaseEdge] + + """ + A list of nodes. + """ + nodes: [Release] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type ReleaseEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Release +} + +""" +Ways in which lists of releases can be ordered upon return. +""" +input ReleaseOrder { + """ + The direction in which to order releases by the specified field. + """ + direction: OrderDirection! + + """ + The field in which to order releases by. + """ + field: ReleaseOrderField! +} + +""" +Properties by which release connections can be ordered. +""" +enum ReleaseOrderField { + """ + Order releases by creation time + """ + CREATED_AT + + """ + Order releases alphabetically by name + """ + NAME +} + +""" +Autogenerated input type of RemoveAssigneesFromAssignable +""" +input RemoveAssigneesFromAssignableInput { + """ + The id of the assignable object to remove assignees from. + """ + assignableId: ID! @possibleTypes(concreteTypes: ["Issue", "PullRequest"], abstractType: "Assignable") + + """ + The id of users to remove as assignees. + """ + assigneeIds: [ID!]! @possibleTypes(concreteTypes: ["User"]) + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String +} + +""" +Autogenerated return type of RemoveAssigneesFromAssignable +""" +type RemoveAssigneesFromAssignablePayload { + """ + The item that was unassigned. + """ + assignable: Assignable + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String +} + +""" +Autogenerated input type of RemoveEnterpriseAdmin +""" +input RemoveEnterpriseAdminInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The Enterprise ID from which to remove the administrator. + """ + enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) + + """ + The login of the user to remove as an administrator. + """ + login: String! +} + +""" +Autogenerated return type of RemoveEnterpriseAdmin +""" +type RemoveEnterpriseAdminPayload { + """ + The user who was removed as an administrator. + """ + admin: User + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The updated enterprise. + """ + enterprise: Enterprise + + """ + A message confirming the result of removing an administrator. + """ + message: String + + """ + The viewer performing the mutation. + """ + viewer: User +} + +""" +Autogenerated input type of RemoveEnterpriseIdentityProvider +""" +input RemoveEnterpriseIdentityProviderInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the enterprise from which to remove the identity provider. + """ + enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) +} + +""" +Autogenerated return type of RemoveEnterpriseIdentityProvider +""" +type RemoveEnterpriseIdentityProviderPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The identity provider that was removed from the enterprise. + """ + identityProvider: EnterpriseIdentityProvider +} + +""" +Autogenerated input type of RemoveEnterpriseOrganization +""" +input RemoveEnterpriseOrganizationInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the enterprise from which the organization should be removed. + """ + enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) + + """ + The ID of the organization to remove from the enterprise. + """ + organizationId: ID! @possibleTypes(concreteTypes: ["Organization"]) +} + +""" +Autogenerated return type of RemoveEnterpriseOrganization +""" +type RemoveEnterpriseOrganizationPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The updated enterprise. + """ + enterprise: Enterprise + + """ + The organization that was removed from the enterprise. + """ + organization: Organization + + """ + The viewer performing the mutation. + """ + viewer: User +} + +""" +Autogenerated input type of RemoveEnterpriseSupportEntitlement +""" +input RemoveEnterpriseSupportEntitlementInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the Enterprise which the admin belongs to. + """ + enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) + + """ + The login of a member who will lose the support entitlement. + """ + login: String! +} + +""" +Autogenerated return type of RemoveEnterpriseSupportEntitlement +""" +type RemoveEnterpriseSupportEntitlementPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + A message confirming the result of removing the support entitlement. + """ + message: String +} + +""" +Autogenerated input type of RemoveLabelsFromLabelable +""" +input RemoveLabelsFromLabelableInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ids of labels to remove. + """ + labelIds: [ID!]! @possibleTypes(concreteTypes: ["Label"]) + + """ + The id of the Labelable to remove labels from. + """ + labelableId: ID! @possibleTypes(concreteTypes: ["Issue", "PullRequest"], abstractType: "Labelable") +} + +""" +Autogenerated return type of RemoveLabelsFromLabelable +""" +type RemoveLabelsFromLabelablePayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The Labelable the labels were removed from. + """ + labelable: Labelable +} + +""" +Autogenerated input type of RemoveOutsideCollaborator +""" +input RemoveOutsideCollaboratorInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the organization to remove the outside collaborator from. + """ + organizationId: ID! @possibleTypes(concreteTypes: ["Organization"]) + + """ + The ID of the outside collaborator to remove. + """ + userId: ID! @possibleTypes(concreteTypes: ["User"]) +} + +""" +Autogenerated return type of RemoveOutsideCollaborator +""" +type RemoveOutsideCollaboratorPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The user that was removed as an outside collaborator. + """ + removedUser: User +} + +""" +Autogenerated input type of RemoveReaction +""" +input RemoveReactionInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The name of the emoji reaction to remove. + """ + content: ReactionContent! + + """ + The Node ID of the subject to modify. + """ + subjectId: ID! @possibleTypes(concreteTypes: ["CommitComment", "Issue", "IssueComment", "PullRequest", "PullRequestReview", "PullRequestReviewComment", "TeamDiscussion", "TeamDiscussionComment"], abstractType: "Reactable") +} + +""" +Autogenerated return type of RemoveReaction +""" +type RemoveReactionPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The reaction object. + """ + reaction: Reaction + + """ + The reactable subject. + """ + subject: Reactable +} + +""" +Autogenerated input type of RemoveStar +""" +input RemoveStarInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The Starrable ID to unstar. + """ + starrableId: ID! @possibleTypes(concreteTypes: ["Gist", "Repository", "Topic"], abstractType: "Starrable") +} + +""" +Autogenerated return type of RemoveStar +""" +type RemoveStarPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The starrable. + """ + starrable: Starrable +} + +""" +Represents a 'removed_from_project' event on a given issue or pull request. +""" +type RemovedFromProjectEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + id: ID! + + """ + Project referenced by event. + """ + project: Project @preview(toggledBy: "starfox-preview") + + """ + Column name referenced by this project event. + """ + projectColumnName: String! @preview(toggledBy: "starfox-preview") +} + +""" +Represents a 'renamed' event on a given issue or pull request +""" +type RenamedTitleEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Identifies the current title of the issue or pull request. + """ + currentTitle: String! + id: ID! + + """ + Identifies the previous title of the issue or pull request. + """ + previousTitle: String! + + """ + Subject that was renamed. + """ + subject: RenamedTitleSubject! +} + +""" +An object which has a renamable title +""" +union RenamedTitleSubject = Issue | PullRequest + +""" +Autogenerated input type of ReopenIssue +""" +input ReopenIssueInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + ID of the issue to be opened. + """ + issueId: ID! @possibleTypes(concreteTypes: ["Issue"]) +} + +""" +Autogenerated return type of ReopenIssue +""" +type ReopenIssuePayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The issue that was opened. + """ + issue: Issue +} + +""" +Autogenerated input type of ReopenPullRequest +""" +input ReopenPullRequestInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + ID of the pull request to be reopened. + """ + pullRequestId: ID! @possibleTypes(concreteTypes: ["PullRequest"]) +} + +""" +Autogenerated return type of ReopenPullRequest +""" +type ReopenPullRequestPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The pull request that was reopened. + """ + pullRequest: PullRequest +} + +""" +Represents a 'reopened' event on any `Closable`. +""" +type ReopenedEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Object that was reopened. + """ + closable: Closable! + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! +} + +""" +Audit log entry for a repo.access event. +""" +type RepoAccessAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The repository associated with the action + """ + repository: Repository + + """ + The name of the repository + """ + repositoryName: String + + """ + The HTTP path for the repository + """ + repositoryResourcePath: URI + + """ + The HTTP URL for the repository + """ + repositoryUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI + + """ + The visibility of the repository + """ + visibility: RepoAccessAuditEntryVisibility +} + +""" +The privacy of a repository +""" +enum RepoAccessAuditEntryVisibility { + """ + The repository is visible only to users in the same business. + """ + INTERNAL + + """ + The repository is visible only to those with explicit access. + """ + PRIVATE + + """ + The repository is visible to everyone. + """ + PUBLIC +} + +""" +Audit log entry for a repo.add_member event. +""" +type RepoAddMemberAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The repository associated with the action + """ + repository: Repository + + """ + The name of the repository + """ + repositoryName: String + + """ + The HTTP path for the repository + """ + repositoryResourcePath: URI + + """ + The HTTP URL for the repository + """ + repositoryUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI + + """ + The visibility of the repository + """ + visibility: RepoAddMemberAuditEntryVisibility +} + +""" +The privacy of a repository +""" +enum RepoAddMemberAuditEntryVisibility { + """ + The repository is visible only to users in the same business. + """ + INTERNAL + + """ + The repository is visible only to those with explicit access. + """ + PRIVATE + + """ + The repository is visible to everyone. + """ + PUBLIC +} + +""" +Audit log entry for a repo.add_topic event. +""" +type RepoAddTopicAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData & TopicAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The repository associated with the action + """ + repository: Repository + + """ + The name of the repository + """ + repositoryName: String + + """ + The HTTP path for the repository + """ + repositoryResourcePath: URI + + """ + The HTTP URL for the repository + """ + repositoryUrl: URI + + """ + The name of the topic added to the repository + """ + topic: Topic + + """ + The name of the topic added to the repository + """ + topicName: String + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a repo.archived event. +""" +type RepoArchivedAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The repository associated with the action + """ + repository: Repository + + """ + The name of the repository + """ + repositoryName: String + + """ + The HTTP path for the repository + """ + repositoryResourcePath: URI + + """ + The HTTP URL for the repository + """ + repositoryUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI + + """ + The visibility of the repository + """ + visibility: RepoArchivedAuditEntryVisibility +} + +""" +The privacy of a repository +""" +enum RepoArchivedAuditEntryVisibility { + """ + The repository is visible only to users in the same business. + """ + INTERNAL + + """ + The repository is visible only to those with explicit access. + """ + PRIVATE + + """ + The repository is visible to everyone. + """ + PUBLIC +} + +""" +Audit log entry for a repo.change_merge_setting event. +""" +type RepoChangeMergeSettingAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + Whether the change was to enable (true) or disable (false) the merge type + """ + isEnabled: Boolean + + """ + The merge method affected by the change + """ + mergeType: RepoChangeMergeSettingAuditEntryMergeType + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The repository associated with the action + """ + repository: Repository + + """ + The name of the repository + """ + repositoryName: String + + """ + The HTTP path for the repository + """ + repositoryResourcePath: URI + + """ + The HTTP URL for the repository + """ + repositoryUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +The merge options available for pull requests to this repository. +""" +enum RepoChangeMergeSettingAuditEntryMergeType { + """ + The pull request is added to the base branch in a merge commit. + """ + MERGE + + """ + Commits from the pull request are added onto the base branch individually without a merge commit. + """ + REBASE + + """ + The pull request's commits are squashed into a single commit before they are merged to the base branch. + """ + SQUASH +} + +""" +Audit log entry for a repo.config.disable_anonymous_git_access event. +""" +type RepoConfigDisableAnonymousGitAccessAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The repository associated with the action + """ + repository: Repository + + """ + The name of the repository + """ + repositoryName: String + + """ + The HTTP path for the repository + """ + repositoryResourcePath: URI + + """ + The HTTP URL for the repository + """ + repositoryUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a repo.config.disable_collaborators_only event. +""" +type RepoConfigDisableCollaboratorsOnlyAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The repository associated with the action + """ + repository: Repository + + """ + The name of the repository + """ + repositoryName: String + + """ + The HTTP path for the repository + """ + repositoryResourcePath: URI + + """ + The HTTP URL for the repository + """ + repositoryUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a repo.config.disable_contributors_only event. +""" +type RepoConfigDisableContributorsOnlyAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The repository associated with the action + """ + repository: Repository + + """ + The name of the repository + """ + repositoryName: String + + """ + The HTTP path for the repository + """ + repositoryResourcePath: URI + + """ + The HTTP URL for the repository + """ + repositoryUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a repo.config.disable_sockpuppet_disallowed event. +""" +type RepoConfigDisableSockpuppetDisallowedAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The repository associated with the action + """ + repository: Repository + + """ + The name of the repository + """ + repositoryName: String + + """ + The HTTP path for the repository + """ + repositoryResourcePath: URI + + """ + The HTTP URL for the repository + """ + repositoryUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a repo.config.enable_anonymous_git_access event. +""" +type RepoConfigEnableAnonymousGitAccessAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The repository associated with the action + """ + repository: Repository + + """ + The name of the repository + """ + repositoryName: String + + """ + The HTTP path for the repository + """ + repositoryResourcePath: URI + + """ + The HTTP URL for the repository + """ + repositoryUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a repo.config.enable_collaborators_only event. +""" +type RepoConfigEnableCollaboratorsOnlyAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The repository associated with the action + """ + repository: Repository + + """ + The name of the repository + """ + repositoryName: String + + """ + The HTTP path for the repository + """ + repositoryResourcePath: URI + + """ + The HTTP URL for the repository + """ + repositoryUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a repo.config.enable_contributors_only event. +""" +type RepoConfigEnableContributorsOnlyAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The repository associated with the action + """ + repository: Repository + + """ + The name of the repository + """ + repositoryName: String + + """ + The HTTP path for the repository + """ + repositoryResourcePath: URI + + """ + The HTTP URL for the repository + """ + repositoryUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a repo.config.enable_sockpuppet_disallowed event. +""" +type RepoConfigEnableSockpuppetDisallowedAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The repository associated with the action + """ + repository: Repository + + """ + The name of the repository + """ + repositoryName: String + + """ + The HTTP path for the repository + """ + repositoryResourcePath: URI + + """ + The HTTP URL for the repository + """ + repositoryUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a repo.config.lock_anonymous_git_access event. +""" +type RepoConfigLockAnonymousGitAccessAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The repository associated with the action + """ + repository: Repository + + """ + The name of the repository + """ + repositoryName: String + + """ + The HTTP path for the repository + """ + repositoryResourcePath: URI + + """ + The HTTP URL for the repository + """ + repositoryUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a repo.config.unlock_anonymous_git_access event. +""" +type RepoConfigUnlockAnonymousGitAccessAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The repository associated with the action + """ + repository: Repository + + """ + The name of the repository + """ + repositoryName: String + + """ + The HTTP path for the repository + """ + repositoryResourcePath: URI + + """ + The HTTP URL for the repository + """ + repositoryUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a repo.create event. +""" +type RepoCreateAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + + """ + The name of the parent repository for this forked repository. + """ + forkParentName: String + + """ + The name of the root repository for this network. + """ + forkSourceName: String + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The repository associated with the action + """ + repository: Repository + + """ + The name of the repository + """ + repositoryName: String + + """ + The HTTP path for the repository + """ + repositoryResourcePath: URI + + """ + The HTTP URL for the repository + """ + repositoryUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI + + """ + The visibility of the repository + """ + visibility: RepoCreateAuditEntryVisibility +} + +""" +The privacy of a repository +""" +enum RepoCreateAuditEntryVisibility { + """ + The repository is visible only to users in the same business. + """ + INTERNAL + + """ + The repository is visible only to those with explicit access. + """ + PRIVATE + + """ + The repository is visible to everyone. + """ + PUBLIC +} + +""" +Audit log entry for a repo.destroy event. +""" +type RepoDestroyAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The repository associated with the action + """ + repository: Repository + + """ + The name of the repository + """ + repositoryName: String + + """ + The HTTP path for the repository + """ + repositoryResourcePath: URI + + """ + The HTTP URL for the repository + """ + repositoryUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI + + """ + The visibility of the repository + """ + visibility: RepoDestroyAuditEntryVisibility +} + +""" +The privacy of a repository +""" +enum RepoDestroyAuditEntryVisibility { + """ + The repository is visible only to users in the same business. + """ + INTERNAL + + """ + The repository is visible only to those with explicit access. + """ + PRIVATE + + """ + The repository is visible to everyone. + """ + PUBLIC +} + +""" +Audit log entry for a repo.remove_member event. +""" +type RepoRemoveMemberAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The repository associated with the action + """ + repository: Repository + + """ + The name of the repository + """ + repositoryName: String + + """ + The HTTP path for the repository + """ + repositoryResourcePath: URI + + """ + The HTTP URL for the repository + """ + repositoryUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI + + """ + The visibility of the repository + """ + visibility: RepoRemoveMemberAuditEntryVisibility +} + +""" +The privacy of a repository +""" +enum RepoRemoveMemberAuditEntryVisibility { + """ + The repository is visible only to users in the same business. + """ + INTERNAL + + """ + The repository is visible only to those with explicit access. + """ + PRIVATE + + """ + The repository is visible to everyone. + """ + PUBLIC +} + +""" +Audit log entry for a repo.remove_topic event. +""" +type RepoRemoveTopicAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData & TopicAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The repository associated with the action + """ + repository: Repository + + """ + The name of the repository + """ + repositoryName: String + + """ + The HTTP path for the repository + """ + repositoryResourcePath: URI + + """ + The HTTP URL for the repository + """ + repositoryUrl: URI + + """ + The name of the topic added to the repository + """ + topic: Topic + + """ + The name of the topic added to the repository + """ + topicName: String + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +The reasons a piece of content can be reported or minimized. +""" +enum ReportedContentClassifiers { + """ + An abusive or harassing piece of content + """ + ABUSE + + """ + A duplicated piece of content + """ + DUPLICATE + + """ + An irrelevant piece of content + """ + OFF_TOPIC + + """ + An outdated piece of content + """ + OUTDATED + + """ + The content has been resolved + """ + RESOLVED + + """ + A spammy piece of content + """ + SPAM +} + +""" +A repository contains the content for a project. +""" +type Repository implements Node & PackageOwner & ProjectOwner & RepositoryInfo & Starrable & Subscribable & UniformResourceLocatable { + """ + A list of users that can be assigned to issues in this repository. + """ + assignableUsers( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Filters users with query on user name and login + """ + query: String + ): UserConnection! + + """ + A list of branch protection rules for this repository. + """ + branchProtectionRules( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): BranchProtectionRuleConnection! + + """ + Returns the code of conduct for this repository + """ + codeOfConduct: CodeOfConduct + + """ + A list of collaborators associated with the repository. + """ + collaborators( + """ + Collaborators affiliation level with a repository. + """ + affiliation: CollaboratorAffiliation + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Filters users with query on user name and login + """ + query: String + ): RepositoryCollaboratorConnection + + """ + A list of commit comments associated with the repository. + """ + commitComments( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): CommitCommentConnection! + + """ + Returns a list of contact links associated to the repository + """ + contactLinks: [RepositoryContactLink!] + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + + """ + The Ref associated with the repository's default branch. + """ + defaultBranchRef: Ref + + """ + Whether or not branches are automatically deleted when merged in this repository. + """ + deleteBranchOnMerge: Boolean! + + """ + A list of dependency manifests contained in the repository + """ + dependencyGraphManifests( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Cursor to paginate dependencies + """ + dependenciesAfter: String + + """ + Number of dependencies to fetch + """ + dependenciesFirst: Int + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Flag to scope to only manifests with dependencies + """ + withDependencies: Boolean + ): DependencyGraphManifestConnection @preview(toggledBy: "hawkgirl-preview") + + """ + A list of deploy keys that are on this repository. + """ + deployKeys( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): DeployKeyConnection! + + """ + Deployments associated with the repository + """ + deployments( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Environments to list deployments for + """ + environments: [String!] + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for deployments returned from the connection. + """ + orderBy: DeploymentOrder = {field: CREATED_AT, direction: ASC} + ): DeploymentConnection! + + """ + The description of the repository. + """ + description: String + + """ + The description of the repository rendered to HTML. + """ + descriptionHTML: HTML! + + """ + The number of kilobytes this repository occupies on disk. + """ + diskUsage: Int + + """ + Returns how many forks there are of this repository in the whole network. + """ + forkCount: Int! + + """ + A list of direct forked repositories. + """ + forks( + """ + Array of viewer's affiliation options for repositories returned from the + connection. For example, OWNER will include only repositories that the + current viewer owns. + """ + affiliations: [RepositoryAffiliation] + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + If non-null, filters repositories according to whether they have been locked + """ + isLocked: Boolean + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for repositories returned from the connection + """ + orderBy: RepositoryOrder + + """ + Array of owner's affiliation options for repositories returned from the + connection. For example, OWNER will include only repositories that the + organization or user being viewed owns. + """ + ownerAffiliations: [RepositoryAffiliation] = [OWNER, COLLABORATOR] + + """ + If non-null, filters repositories according to privacy + """ + privacy: RepositoryPrivacy + ): RepositoryConnection! + + """ + The funding links for this repository + """ + fundingLinks: [FundingLink!]! + + """ + Indicates if the repository has issues feature enabled. + """ + hasIssuesEnabled: Boolean! + + """ + Indicates if the repository has the Projects feature enabled. + """ + hasProjectsEnabled: Boolean! + + """ + Indicates if the repository has wiki feature enabled. + """ + hasWikiEnabled: Boolean! + + """ + The repository's URL. + """ + homepageUrl: URI + id: ID! + + """ + The interaction ability settings for this repository. + """ + interactionAbility: RepositoryInteractionAbility + + """ + Indicates if the repository is unmaintained. + """ + isArchived: Boolean! + + """ + Returns true if blank issue creation is allowed + """ + isBlankIssuesEnabled: Boolean! + + """ + Returns whether or not this repository disabled. + """ + isDisabled: Boolean! + + """ + Returns whether or not this repository is empty. + """ + isEmpty: Boolean! + + """ + Identifies if the repository is a fork. + """ + isFork: Boolean! + + """ + Indicates if a repository is either owned by an organization, or is a private fork of an organization repository. + """ + isInOrganization: Boolean! + + """ + Indicates if the repository has been locked or not. + """ + isLocked: Boolean! + + """ + Identifies if the repository is a mirror. + """ + isMirror: Boolean! + + """ + Identifies if the repository is private or internal. + """ + isPrivate: Boolean! + + """ + Returns true if this repository has a security policy + """ + isSecurityPolicyEnabled: Boolean + + """ + Identifies if the repository is a template that can be used to generate new repositories. + """ + isTemplate: Boolean! + + """ + Is this repository a user configuration repository? + """ + isUserConfigurationRepository: Boolean! + + """ + Returns a single issue from the current repository by number. + """ + issue( + """ + The number for the issue to be returned. + """ + number: Int! + ): Issue + + """ + Returns a single issue-like object from the current repository by number. + """ + issueOrPullRequest( + """ + The number for the issue to be returned. + """ + number: Int! + ): IssueOrPullRequest + + """ + Returns a list of issue templates associated to the repository + """ + issueTemplates: [IssueTemplate!] + + """ + A list of issues that have been opened in the repository. + """ + issues( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Filtering options for issues returned from the connection. + """ + filterBy: IssueFilters + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + A list of label names to filter the pull requests by. + """ + labels: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for issues returned from the connection. + """ + orderBy: IssueOrder + + """ + A list of states to filter the issues by. + """ + states: [IssueState!] + ): IssueConnection! + + """ + Returns a single label by name + """ + label( + """ + Label name + """ + name: String! + ): Label + + """ + A list of labels associated with the repository. + """ + labels( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for labels returned from the connection. + """ + orderBy: LabelOrder = {field: CREATED_AT, direction: ASC} + + """ + If provided, searches labels by name and description. + """ + query: String + ): LabelConnection + + """ + A list containing a breakdown of the language composition of the repository. + """ + languages( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Order for connection + """ + orderBy: LanguageOrder + ): LanguageConnection + + """ + Get the latest release for the repository if one exists. + """ + latestRelease: Release + + """ + The license associated with the repository + """ + licenseInfo: License + + """ + The reason the repository has been locked. + """ + lockReason: RepositoryLockReason + + """ + A list of Users that can be mentioned in the context of the repository. + """ + mentionableUsers( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Filters users with query on user name and login + """ + query: String + ): UserConnection! + + """ + Whether or not PRs are merged with a merge commit on this repository. + """ + mergeCommitAllowed: Boolean! + + """ + Returns a single milestone from the current repository by number. + """ + milestone( + """ + The number for the milestone to be returned. + """ + number: Int! + ): Milestone + + """ + A list of milestones associated with the repository. + """ + milestones( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for milestones. + """ + orderBy: MilestoneOrder + + """ + Filters milestones with a query on the title + """ + query: String + + """ + Filter by the state of the milestones. + """ + states: [MilestoneState!] + ): MilestoneConnection + + """ + The repository's original mirror URL. + """ + mirrorUrl: URI + + """ + The name of the repository. + """ + name: String! + + """ + The repository's name with owner. + """ + nameWithOwner: String! + + """ + A Git object in the repository + """ + object( + """ + A Git revision expression suitable for rev-parse + """ + expression: String + + """ + The Git object ID + """ + oid: GitObjectID + ): GitObject + + """ + The image used to represent this repository in Open Graph data. + """ + openGraphImageUrl: URI! + + """ + The User owner of the repository. + """ + owner: RepositoryOwner! + + """ + A list of packages under the owner. + """ + packages( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Find packages by their names. + """ + names: [String] + + """ + Ordering of the returned packages. + """ + orderBy: PackageOrder = {field: CREATED_AT, direction: DESC} + + """ + Filter registry package by type. + """ + packageType: PackageType + + """ + Find packages in a repository by ID. + """ + repositoryId: ID + ): PackageConnection! + + """ + The repository parent, if this is a fork. + """ + parent: Repository + + """ + A list of pinned issues for this repository. + """ + pinnedIssues( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): PinnedIssueConnection + + """ + The primary language of the repository's code. + """ + primaryLanguage: Language + + """ + Find project by number. + """ + project( + """ + The project number to find. + """ + number: Int! + ): Project + + """ + A list of projects under the owner. + """ + projects( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for projects returned from the connection + """ + orderBy: ProjectOrder + + """ + Query to search projects by, currently only searching by name. + """ + search: String + + """ + A list of states to filter the projects by. + """ + states: [ProjectState!] + ): ProjectConnection! + + """ + The HTTP path listing the repository's projects + """ + projectsResourcePath: URI! + + """ + The HTTP URL listing the repository's projects + """ + projectsUrl: URI! + + """ + Returns a single pull request from the current repository by number. + """ + pullRequest( + """ + The number for the pull request to be returned. + """ + number: Int! + ): PullRequest + + """ + A list of pull requests that have been opened in the repository. + """ + pullRequests( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + The base ref name to filter the pull requests by. + """ + baseRefName: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + The head ref name to filter the pull requests by. + """ + headRefName: String + + """ + A list of label names to filter the pull requests by. + """ + labels: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for pull requests returned from the connection. + """ + orderBy: IssueOrder + + """ + A list of states to filter the pull requests by. + """ + states: [PullRequestState!] + ): PullRequestConnection! + + """ + Identifies when the repository was last pushed to. + """ + pushedAt: DateTime + + """ + Whether or not rebase-merging is enabled on this repository. + """ + rebaseMergeAllowed: Boolean! + + """ + Fetch a given ref from the repository + """ + ref( + """ + The ref to retrieve. Fully qualified matches are checked in order + (`refs/heads/master`) before falling back onto checks for short name matches (`master`). + """ + qualifiedName: String! + ): Ref + + """ + Fetch a list of refs from the repository + """ + refs( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + DEPRECATED: use orderBy. The ordering direction. + """ + direction: OrderDirection + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for refs returned from the connection. + """ + orderBy: RefOrder + + """ + Filters refs with query on name + """ + query: String + + """ + A ref name prefix like `refs/heads/`, `refs/tags/`, etc. + """ + refPrefix: String! + ): RefConnection + + """ + Lookup a single release given various criteria. + """ + release( + """ + The name of the Tag the Release was created from + """ + tagName: String! + ): Release + + """ + List of releases which are dependent on this repository. + """ + releases( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Order for connection + """ + orderBy: ReleaseOrder + ): ReleaseConnection! + + """ + A list of applied repository-topic associations for this repository. + """ + repositoryTopics( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): RepositoryTopicConnection! + + """ + The HTTP path for this repository + """ + resourcePath: URI! + + """ + The security policy URL. + """ + securityPolicyUrl: URI + + """ + A description of the repository, rendered to HTML without any links in it. + """ + shortDescriptionHTML( + """ + How many characters to return. + """ + limit: Int = 200 + ): HTML! + + """ + Whether or not squash-merging is enabled on this repository. + """ + squashMergeAllowed: Boolean! + + """ + The SSH URL to clone this repository + """ + sshUrl: GitSSHRemote! + + """ + Returns a count of how many stargazers there are on this object + """ + stargazerCount: Int! + + """ + A list of users who have starred this starrable. + """ + stargazers( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Order for connection + """ + orderBy: StarOrder + ): StargazerConnection! + + """ + Returns a list of all submodules in this repository parsed from the + .gitmodules file as of the default branch's HEAD commit. + """ + submodules( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): SubmoduleConnection! + + """ + Temporary authentication token for cloning this repository. + """ + tempCloneToken: String + + """ + The repository from which this repository was generated, if any. + """ + templateRepository: Repository + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! + + """ + The HTTP URL for this repository + """ + url: URI! + + """ + Whether this repository has a custom image to use with Open Graph as opposed to being represented by the owner's avatar. + """ + usesCustomOpenGraphImage: Boolean! + + """ + Indicates whether the viewer has admin permissions on this repository. + """ + viewerCanAdminister: Boolean! + + """ + Can the current viewer create new projects on this owner. + """ + viewerCanCreateProjects: Boolean! + + """ + Check if the viewer is able to change their subscription status for the repository. + """ + viewerCanSubscribe: Boolean! + + """ + Indicates whether the viewer can update the topics of this repository. + """ + viewerCanUpdateTopics: Boolean! + + """ + The last commit email for the viewer. + """ + viewerDefaultCommitEmail: String + + """ + The last used merge method by the viewer or the default for the repository. + """ + viewerDefaultMergeMethod: PullRequestMergeMethod! + + """ + Returns a boolean indicating whether the viewing user has starred this starrable. + """ + viewerHasStarred: Boolean! + + """ + The users permission level on the repository. Will return null if authenticated as an GitHub App. + """ + viewerPermission: RepositoryPermission + + """ + A list of emails this viewer can commit with. + """ + viewerPossibleCommitEmails: [String!] + + """ + Identifies if the viewer is watching, not watching, or ignoring the subscribable entity. + """ + viewerSubscription: SubscriptionState + + """ + A list of vulnerability alerts that are on this repository. + """ + vulnerabilityAlerts( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): RepositoryVulnerabilityAlertConnection + + """ + A list of users watching the repository. + """ + watchers( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): UserConnection! +} + +""" +The affiliation of a user to a repository +""" +enum RepositoryAffiliation { + """ + Repositories that the user has been added to as a collaborator. + """ + COLLABORATOR + + """ + Repositories that the user has access to through being a member of an + organization. This includes every repository on every team that the user is on. + """ + ORGANIZATION_MEMBER + + """ + Repositories that are owned by the authenticated user. + """ + OWNER +} + +""" +Metadata for an audit entry with action repo.* +""" +interface RepositoryAuditEntryData { + """ + The repository associated with the action + """ + repository: Repository + + """ + The name of the repository + """ + repositoryName: String + + """ + The HTTP path for the repository + """ + repositoryResourcePath: URI + + """ + The HTTP URL for the repository + """ + repositoryUrl: URI +} + +""" +The connection type for User. +""" +type RepositoryCollaboratorConnection { + """ + A list of edges. + """ + edges: [RepositoryCollaboratorEdge] + + """ + A list of nodes. + """ + nodes: [User] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +Represents a user who is a collaborator of a repository. +""" +type RepositoryCollaboratorEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + node: User! + + """ + The permission the user has on the repository. + """ + permission: RepositoryPermission! + + """ + A list of sources for the user's access to the repository. + """ + permissionSources: [PermissionSource!] +} + +""" +A list of repositories owned by the subject. +""" +type RepositoryConnection { + """ + A list of edges. + """ + edges: [RepositoryEdge] + + """ + A list of nodes. + """ + nodes: [Repository] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! + + """ + The total size in kilobytes of all repositories in the connection. + """ + totalDiskUsage: Int! +} + +""" +A repository contact link. +""" +type RepositoryContactLink { + """ + The contact link purpose. + """ + about: String! + + """ + The contact link name. + """ + name: String! + + """ + The contact link URL. + """ + url: URI! +} + +""" +The reason a repository is listed as 'contributed'. +""" +enum RepositoryContributionType { + """ + Created a commit + """ + COMMIT + + """ + Created an issue + """ + ISSUE + + """ + Created a pull request + """ + PULL_REQUEST + + """ + Reviewed a pull request + """ + PULL_REQUEST_REVIEW + + """ + Created the repository + """ + REPOSITORY +} + +""" +An edge in a connection. +""" +type RepositoryEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Repository +} + +""" +A subset of repository info. +""" +interface RepositoryInfo { + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + The description of the repository. + """ + description: String + + """ + The description of the repository rendered to HTML. + """ + descriptionHTML: HTML! + + """ + Returns how many forks there are of this repository in the whole network. + """ + forkCount: Int! + + """ + Indicates if the repository has issues feature enabled. + """ + hasIssuesEnabled: Boolean! + + """ + Indicates if the repository has the Projects feature enabled. + """ + hasProjectsEnabled: Boolean! + + """ + Indicates if the repository has wiki feature enabled. + """ + hasWikiEnabled: Boolean! + + """ + The repository's URL. + """ + homepageUrl: URI + + """ + Indicates if the repository is unmaintained. + """ + isArchived: Boolean! + + """ + Identifies if the repository is a fork. + """ + isFork: Boolean! + + """ + Indicates if a repository is either owned by an organization, or is a private fork of an organization repository. + """ + isInOrganization: Boolean! + + """ + Indicates if the repository has been locked or not. + """ + isLocked: Boolean! + + """ + Identifies if the repository is a mirror. + """ + isMirror: Boolean! + + """ + Identifies if the repository is private or internal. + """ + isPrivate: Boolean! + + """ + Identifies if the repository is a template that can be used to generate new repositories. + """ + isTemplate: Boolean! + + """ + The license associated with the repository + """ + licenseInfo: License + + """ + The reason the repository has been locked. + """ + lockReason: RepositoryLockReason + + """ + The repository's original mirror URL. + """ + mirrorUrl: URI + + """ + The name of the repository. + """ + name: String! + + """ + The repository's name with owner. + """ + nameWithOwner: String! + + """ + The image used to represent this repository in Open Graph data. + """ + openGraphImageUrl: URI! + + """ + The User owner of the repository. + """ + owner: RepositoryOwner! + + """ + Identifies when the repository was last pushed to. + """ + pushedAt: DateTime + + """ + The HTTP path for this repository + """ + resourcePath: URI! + + """ + A description of the repository, rendered to HTML without any links in it. + """ + shortDescriptionHTML( + """ + How many characters to return. + """ + limit: Int = 200 + ): HTML! + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! + + """ + The HTTP URL for this repository + """ + url: URI! + + """ + Whether this repository has a custom image to use with Open Graph as opposed to being represented by the owner's avatar. + """ + usesCustomOpenGraphImage: Boolean! +} + +""" +Repository interaction limit that applies to this object. +""" +type RepositoryInteractionAbility { + """ + The time the currently active limit expires. + """ + expiresAt: DateTime + + """ + The current limit that is enabled on this object. + """ + limit: RepositoryInteractionLimit! + + """ + The origin of the currently active interaction limit. + """ + origin: RepositoryInteractionLimitOrigin! +} + +""" +A repository interaction limit. +""" +enum RepositoryInteractionLimit { + """ + Users that are not collaborators will not be able to interact with the repository. + """ + COLLABORATORS_ONLY + + """ + Users that have not previously committed to a repository’s default branch will be unable to interact with the repository. + """ + CONTRIBUTORS_ONLY + + """ + Users that have recently created their account will be unable to interact with the repository. + """ + EXISTING_USERS + + """ + No interaction limits are enabled. + """ + NO_LIMIT +} + +""" +The length for a repository interaction limit to be enabled for. +""" +enum RepositoryInteractionLimitExpiry { + """ + The interaction limit will expire after 1 day. + """ + ONE_DAY + + """ + The interaction limit will expire after 1 month. + """ + ONE_MONTH + + """ + The interaction limit will expire after 1 week. + """ + ONE_WEEK + + """ + The interaction limit will expire after 6 months. + """ + SIX_MONTHS + + """ + The interaction limit will expire after 3 days. + """ + THREE_DAYS +} + +""" +Indicates where an interaction limit is configured. +""" +enum RepositoryInteractionLimitOrigin { + """ + A limit that is configured at the organization level. + """ + ORGANIZATION + + """ + A limit that is configured at the repository level. + """ + REPOSITORY + + """ + A limit that is configured at the user-wide level. + """ + USER +} + +""" +An invitation for a user to be added to a repository. +""" +type RepositoryInvitation implements Node { + """ + The email address that received the invitation. + """ + email: String + id: ID! + + """ + The user who received the invitation. + """ + invitee: User + + """ + The user who created the invitation. + """ + inviter: User! + + """ + The permalink for this repository invitation. + """ + permalink: URI! + + """ + The permission granted on this repository by this invitation. + """ + permission: RepositoryPermission! + + """ + The Repository the user is invited to. + """ + repository: RepositoryInfo +} + +""" +The connection type for RepositoryInvitation. +""" +type RepositoryInvitationConnection { + """ + A list of edges. + """ + edges: [RepositoryInvitationEdge] + + """ + A list of nodes. + """ + nodes: [RepositoryInvitation] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type RepositoryInvitationEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: RepositoryInvitation +} + +""" +Ordering options for repository invitation connections. +""" +input RepositoryInvitationOrder { + """ + The ordering direction. + """ + direction: OrderDirection! + + """ + The field to order repository invitations by. + """ + field: RepositoryInvitationOrderField! +} + +""" +Properties by which repository invitation connections can be ordered. +""" +enum RepositoryInvitationOrderField { + """ + Order repository invitations by creation time + """ + CREATED_AT + + """ + Order repository invitations by invitee login + """ + INVITEE_LOGIN @deprecated(reason: "`INVITEE_LOGIN` is no longer a valid field value. Repository invitations can now be associated with an email, not only an invitee. Removal on 2020-10-01 UTC.") +} + +""" +The possible reasons a given repository could be in a locked state. +""" +enum RepositoryLockReason { + """ + The repository is locked due to a billing related reason. + """ + BILLING + + """ + The repository is locked due to a migration. + """ + MIGRATING + + """ + The repository is locked due to a move. + """ + MOVING + + """ + The repository is locked due to a rename. + """ + RENAME +} + +""" +Represents a object that belongs to a repository. +""" +interface RepositoryNode { + """ + The repository associated with this node. + """ + repository: Repository! +} + +""" +Ordering options for repository connections +""" +input RepositoryOrder { + """ + The ordering direction. + """ + direction: OrderDirection! + + """ + The field to order repositories by. + """ + field: RepositoryOrderField! +} + +""" +Properties by which repository connections can be ordered. +""" +enum RepositoryOrderField { + """ + Order repositories by creation time + """ + CREATED_AT + + """ + Order repositories by name + """ + NAME + + """ + Order repositories by push time + """ + PUSHED_AT + + """ + Order repositories by number of stargazers + """ + STARGAZERS + + """ + Order repositories by update time + """ + UPDATED_AT +} + +""" +Represents an owner of a Repository. +""" +interface RepositoryOwner { + """ + A URL pointing to the owner's public avatar. + """ + avatarUrl( + """ + The size of the resulting square image. + """ + size: Int + ): URI! + id: ID! + + """ + The username used to login. + """ + login: String! + + """ + A list of repositories that the user owns. + """ + repositories( + """ + Array of viewer's affiliation options for repositories returned from the + connection. For example, OWNER will include only repositories that the + current viewer owns. + """ + affiliations: [RepositoryAffiliation] + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + If non-null, filters repositories according to whether they are forks of another repository + """ + isFork: Boolean + + """ + If non-null, filters repositories according to whether they have been locked + """ + isLocked: Boolean + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for repositories returned from the connection + """ + orderBy: RepositoryOrder + + """ + Array of owner's affiliation options for repositories returned from the + connection. For example, OWNER will include only repositories that the + organization or user being viewed owns. + """ + ownerAffiliations: [RepositoryAffiliation] = [OWNER, COLLABORATOR] + + """ + If non-null, filters repositories according to privacy + """ + privacy: RepositoryPrivacy + ): RepositoryConnection! + + """ + Find Repository. + """ + repository( + """ + Name of Repository to find. + """ + name: String! + ): Repository + + """ + The HTTP URL for the owner. + """ + resourcePath: URI! + + """ + The HTTP URL for the owner. + """ + url: URI! +} + +""" +The access level to a repository +""" +enum RepositoryPermission { + """ + Can read, clone, and push to this repository. Can also manage issues, pull + requests, and repository settings, including adding collaborators + """ + ADMIN + + """ + Can read, clone, and push to this repository. They can also manage issues, pull requests, and some repository settings + """ + MAINTAIN + + """ + Can read and clone this repository. Can also open and comment on issues and pull requests + """ + READ + + """ + Can read and clone this repository. Can also manage issues and pull requests + """ + TRIAGE + + """ + Can read, clone, and push to this repository. Can also manage issues and pull requests + """ + WRITE +} + +""" +The privacy of a repository +""" +enum RepositoryPrivacy { + """ + Private + """ + PRIVATE + + """ + Public + """ + PUBLIC +} + +""" +A repository-topic connects a repository to a topic. +""" +type RepositoryTopic implements Node & UniformResourceLocatable { + id: ID! + + """ + The HTTP path for this repository-topic. + """ + resourcePath: URI! + + """ + The topic. + """ + topic: Topic! + + """ + The HTTP URL for this repository-topic. + """ + url: URI! +} + +""" +The connection type for RepositoryTopic. +""" +type RepositoryTopicConnection { + """ + A list of edges. + """ + edges: [RepositoryTopicEdge] + + """ + A list of nodes. + """ + nodes: [RepositoryTopic] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type RepositoryTopicEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: RepositoryTopic +} + +""" +The repository's visibility level. +""" +enum RepositoryVisibility { + """ + The repository is visible only to users in the same business. + """ + INTERNAL + + """ + The repository is visible only to those with explicit access. + """ + PRIVATE + + """ + The repository is visible to everyone. + """ + PUBLIC +} + +""" +Audit log entry for a repository_visibility_change.disable event. +""" +type RepositoryVisibilityChangeDisableAuditEntry implements AuditEntry & EnterpriseAuditEntryData & Node & OrganizationAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + + """ + The HTTP path for this enterprise. + """ + enterpriseResourcePath: URI + + """ + The slug of the enterprise. + """ + enterpriseSlug: String + + """ + The HTTP URL for this enterprise. + """ + enterpriseUrl: URI + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a repository_visibility_change.enable event. +""" +type RepositoryVisibilityChangeEnableAuditEntry implements AuditEntry & EnterpriseAuditEntryData & Node & OrganizationAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + + """ + The HTTP path for this enterprise. + """ + enterpriseResourcePath: URI + + """ + The slug of the enterprise. + """ + enterpriseSlug: String + + """ + The HTTP URL for this enterprise. + """ + enterpriseUrl: URI + id: ID! + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +A alert for a repository with an affected vulnerability. +""" +type RepositoryVulnerabilityAlert implements Node & RepositoryNode { + """ + When was the alert created? + """ + createdAt: DateTime! + + """ + The reason the alert was dismissed + """ + dismissReason: String + + """ + When was the alert dismissed? + """ + dismissedAt: DateTime + + """ + The user who dismissed the alert + """ + dismisser: User + id: ID! + + """ + The associated repository + """ + repository: Repository! + + """ + The associated security advisory + """ + securityAdvisory: SecurityAdvisory + + """ + The associated security vulnerability + """ + securityVulnerability: SecurityVulnerability + + """ + The vulnerable manifest filename + """ + vulnerableManifestFilename: String! + + """ + The vulnerable manifest path + """ + vulnerableManifestPath: String! + + """ + The vulnerable requirements + """ + vulnerableRequirements: String +} + +""" +The connection type for RepositoryVulnerabilityAlert. +""" +type RepositoryVulnerabilityAlertConnection { + """ + A list of edges. + """ + edges: [RepositoryVulnerabilityAlertEdge] + + """ + A list of nodes. + """ + nodes: [RepositoryVulnerabilityAlert] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type RepositoryVulnerabilityAlertEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: RepositoryVulnerabilityAlert +} + +""" +Autogenerated input type of RequestReviews +""" +input RequestReviewsInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The Node ID of the pull request to modify. + """ + pullRequestId: ID! @possibleTypes(concreteTypes: ["PullRequest"]) + + """ + The Node IDs of the team to request. + """ + teamIds: [ID!] @possibleTypes(concreteTypes: ["Team"]) + + """ + Add users to the set rather than replace. + """ + union: Boolean + + """ + The Node IDs of the user to request. + """ + userIds: [ID!] @possibleTypes(concreteTypes: ["User"]) +} + +""" +Autogenerated return type of RequestReviews +""" +type RequestReviewsPayload { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The pull request that is getting requests. + """ + pullRequest: PullRequest + + """ + The edge from the pull request to the requested reviewers. + """ + requestedReviewersEdge: UserEdge +} + +""" +The possible states that can be requested when creating a check run. +""" +enum RequestableCheckStatusState { + """ + The check suite or run has been completed. + """ + COMPLETED + + """ + The check suite or run is in progress. + """ + IN_PROGRESS + + """ + The check suite or run has been queued. + """ + QUEUED + + """ + The check suite or run is in waiting state. + """ + WAITING +} + +""" +Types that can be requested reviewers. +""" +union RequestedReviewer = Mannequin | Team | User + +""" +Represents a type that can be required by a pull request for merging. +""" +interface RequirableByPullRequest { + """ + Whether this is required to pass before merging for a specific pull request. + """ + isRequired( + """ + The id of the pull request this is required for + """ + pullRequestId: ID + + """ + The number of the pull request this is required for + """ + pullRequestNumber: Int + ): Boolean! +} + +""" +Autogenerated input type of RerequestCheckSuite +""" +input RerequestCheckSuiteInput { + """ + The Node ID of the check suite. + """ + checkSuiteId: ID! @possibleTypes(concreteTypes: ["CheckSuite"]) + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The Node ID of the repository. + """ + repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) +} + +""" +Autogenerated return type of RerequestCheckSuite +""" +type RerequestCheckSuitePayload { + """ + The requested check suite. + """ + checkSuite: CheckSuite + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String +} + +""" +Autogenerated input type of ResolveReviewThread +""" +input ResolveReviewThreadInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the thread to resolve + """ + threadId: ID! @possibleTypes(concreteTypes: ["PullRequestReviewThread"]) +} + +""" +Autogenerated return type of ResolveReviewThread +""" +type ResolveReviewThreadPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The thread to resolve. + """ + thread: PullRequestReviewThread +} + +""" +Represents a private contribution a user made on GitHub. +""" +type RestrictedContribution implements Contribution { + """ + Whether this contribution is associated with a record you do not have access to. For + example, your own 'first issue' contribution may have been made on a repository you can no + longer access. + """ + isRestricted: Boolean! + + """ + When this contribution was made. + """ + occurredAt: DateTime! + + """ + The HTTP path for this contribution. + """ + resourcePath: URI! + + """ + The HTTP URL for this contribution. + """ + url: URI! + + """ + The user who made this contribution. + """ + user: User! +} + +""" +A team or user who has the ability to dismiss a review on a protected branch. +""" +type ReviewDismissalAllowance implements Node { + """ + The actor that can dismiss. + """ + actor: ReviewDismissalAllowanceActor + + """ + Identifies the branch protection rule associated with the allowed user or team. + """ + branchProtectionRule: BranchProtectionRule + id: ID! +} + +""" +Types that can be an actor. +""" +union ReviewDismissalAllowanceActor = Team | User + +""" +The connection type for ReviewDismissalAllowance. +""" +type ReviewDismissalAllowanceConnection { + """ + A list of edges. + """ + edges: [ReviewDismissalAllowanceEdge] + + """ + A list of nodes. + """ + nodes: [ReviewDismissalAllowance] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type ReviewDismissalAllowanceEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: ReviewDismissalAllowance +} + +""" +Represents a 'review_dismissed' event on a given issue or pull request. +""" +type ReviewDismissedEvent implements Node & UniformResourceLocatable { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + + """ + Identifies the optional message associated with the 'review_dismissed' event. + """ + dismissalMessage: String + + """ + Identifies the optional message associated with the event, rendered to HTML. + """ + dismissalMessageHTML: String + id: ID! + + """ + Identifies the previous state of the review with the 'review_dismissed' event. + """ + previousReviewState: PullRequestReviewState! + + """ + PullRequest referenced by event. + """ + pullRequest: PullRequest! + + """ + Identifies the commit which caused the review to become stale. + """ + pullRequestCommit: PullRequestCommit + + """ + The HTTP path for this review dismissed event. + """ + resourcePath: URI! + + """ + Identifies the review associated with the 'review_dismissed' event. + """ + review: PullRequestReview + + """ + The HTTP URL for this review dismissed event. + """ + url: URI! +} + +""" +A request for a user to review a pull request. +""" +type ReviewRequest implements Node { + """ + Whether this request was created for a code owner + """ + asCodeOwner: Boolean! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + id: ID! + + """ + Identifies the pull request associated with this review request. + """ + pullRequest: PullRequest! + + """ + The reviewer that is requested. + """ + requestedReviewer: RequestedReviewer +} + +""" +The connection type for ReviewRequest. +""" +type ReviewRequestConnection { + """ + A list of edges. + """ + edges: [ReviewRequestEdge] + + """ + A list of nodes. + """ + nodes: [ReviewRequest] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type ReviewRequestEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: ReviewRequest +} + +""" +Represents an 'review_request_removed' event on a given pull request. +""" +type ReviewRequestRemovedEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! + + """ + PullRequest referenced by event. + """ + pullRequest: PullRequest! + + """ + Identifies the reviewer whose review request was removed. + """ + requestedReviewer: RequestedReviewer +} + +""" +Represents an 'review_requested' event on a given pull request. +""" +type ReviewRequestedEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! + + """ + PullRequest referenced by event. + """ + pullRequest: PullRequest! + + """ + Identifies the reviewer whose review was requested. + """ + requestedReviewer: RequestedReviewer +} + +""" +A hovercard context with a message describing the current code review state of the pull +request. +""" +type ReviewStatusHovercardContext implements HovercardContext { + """ + A string describing this context + """ + message: String! + + """ + An octicon to accompany this context + """ + octicon: String! + + """ + The current status of the pull request with respect to code review. + """ + reviewDecision: PullRequestReviewDecision +} + +""" +The possible digest algorithms used to sign SAML requests for an identity provider. +""" +enum SamlDigestAlgorithm { + """ + SHA1 + """ + SHA1 + + """ + SHA256 + """ + SHA256 + + """ + SHA384 + """ + SHA384 + + """ + SHA512 + """ + SHA512 +} + +""" +The possible signature algorithms used to sign SAML requests for a Identity Provider. +""" +enum SamlSignatureAlgorithm { + """ + RSA-SHA1 + """ + RSA_SHA1 + + """ + RSA-SHA256 + """ + RSA_SHA256 + + """ + RSA-SHA384 + """ + RSA_SHA384 + + """ + RSA-SHA512 + """ + RSA_SHA512 +} + +""" +A Saved Reply is text a user can use to reply quickly. +""" +type SavedReply implements Node { + """ + The body of the saved reply. + """ + body: String! + + """ + The saved reply body rendered to HTML. + """ + bodyHTML: HTML! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + id: ID! + + """ + The title of the saved reply. + """ + title: String! + + """ + The user that saved this reply. + """ + user: Actor +} + +""" +The connection type for SavedReply. +""" +type SavedReplyConnection { + """ + A list of edges. + """ + edges: [SavedReplyEdge] + + """ + A list of nodes. + """ + nodes: [SavedReply] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type SavedReplyEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: SavedReply +} + +""" +Ordering options for saved reply connections. +""" +input SavedReplyOrder { + """ + The ordering direction. + """ + direction: OrderDirection! + + """ + The field to order saved replies by. + """ + field: SavedReplyOrderField! +} + +""" +Properties by which saved reply connections can be ordered. +""" +enum SavedReplyOrderField { + """ + Order saved reply by when they were updated. + """ + UPDATED_AT +} + +""" +The results of a search. +""" +union SearchResultItem = App | Issue | MarketplaceListing | Organization | PullRequest | Repository | User + +""" +A list of results that matched against a search query. +""" +type SearchResultItemConnection { + """ + The number of pieces of code that matched the search query. + """ + codeCount: Int! + + """ + A list of edges. + """ + edges: [SearchResultItemEdge] + + """ + The number of issues that matched the search query. + """ + issueCount: Int! + + """ + A list of nodes. + """ + nodes: [SearchResultItem] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + The number of repositories that matched the search query. + """ + repositoryCount: Int! + + """ + The number of users that matched the search query. + """ + userCount: Int! + + """ + The number of wiki pages that matched the search query. + """ + wikiCount: Int! +} + +""" +An edge in a connection. +""" +type SearchResultItemEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: SearchResultItem + + """ + Text matches on the result found. + """ + textMatches: [TextMatch] +} + +""" +Represents the individual results of a search. +""" +enum SearchType { + """ + Returns results matching issues in repositories. + """ + ISSUE + + """ + Returns results matching repositories. + """ + REPOSITORY + + """ + Returns results matching users and organizations on GitHub. + """ + USER +} + +""" +A GitHub Security Advisory +""" +type SecurityAdvisory implements Node { + """ + The CVSS associated with this advisory + """ + cvss: CVSS! + + """ + CWEs associated with this Advisory + """ + cwes( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): CWEConnection! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + + """ + This is a long plaintext description of the advisory + """ + description: String! + + """ + The GitHub Security Advisory ID + """ + ghsaId: String! + id: ID! + + """ + A list of identifiers for this advisory + """ + identifiers: [SecurityAdvisoryIdentifier!]! + + """ + The permalink for the advisory's dependabot alerts page + """ + notificationsPermalink: URI + + """ + The organization that originated the advisory + """ + origin: String! + + """ + The permalink for the advisory + """ + permalink: URI + + """ + When the advisory was published + """ + publishedAt: DateTime! + + """ + A list of references for this advisory + """ + references: [SecurityAdvisoryReference!]! + + """ + The severity of the advisory + """ + severity: SecurityAdvisorySeverity! + + """ + A short plaintext summary of the advisory + """ + summary: String! + + """ + When the advisory was last updated + """ + updatedAt: DateTime! + + """ + Vulnerabilities associated with this Advisory + """ + vulnerabilities( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + An ecosystem to filter vulnerabilities by. + """ + ecosystem: SecurityAdvisoryEcosystem + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for the returned topics. + """ + orderBy: SecurityVulnerabilityOrder = {field: UPDATED_AT, direction: DESC} + + """ + A package name to filter vulnerabilities by. + """ + package: String + + """ + A list of severities to filter vulnerabilities by. + """ + severities: [SecurityAdvisorySeverity!] + ): SecurityVulnerabilityConnection! + + """ + When the advisory was withdrawn, if it has been withdrawn + """ + withdrawnAt: DateTime +} + +""" +The connection type for SecurityAdvisory. +""" +type SecurityAdvisoryConnection { + """ + A list of edges. + """ + edges: [SecurityAdvisoryEdge] + + """ + A list of nodes. + """ + nodes: [SecurityAdvisory] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +The possible ecosystems of a security vulnerability's package. +""" +enum SecurityAdvisoryEcosystem { + """ + PHP packages hosted at packagist.org + """ + COMPOSER + + """ + Java artifacts hosted at the Maven central repository + """ + MAVEN + + """ + JavaScript packages hosted at npmjs.com + """ + NPM + + """ + .NET packages hosted at the NuGet Gallery + """ + NUGET + + """ + Python packages hosted at PyPI.org + """ + PIP + + """ + Ruby gems hosted at RubyGems.org + """ + RUBYGEMS +} + +""" +An edge in a connection. +""" +type SecurityAdvisoryEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: SecurityAdvisory +} + +""" +A GitHub Security Advisory Identifier +""" +type SecurityAdvisoryIdentifier { + """ + The identifier type, e.g. GHSA, CVE + """ + type: String! + + """ + The identifier + """ + value: String! +} + +""" +An advisory identifier to filter results on. +""" +input SecurityAdvisoryIdentifierFilter { + """ + The identifier type. + """ + type: SecurityAdvisoryIdentifierType! + + """ + The identifier string. Supports exact or partial matching. + """ + value: String! +} + +""" +Identifier formats available for advisories. +""" +enum SecurityAdvisoryIdentifierType { + """ + Common Vulnerabilities and Exposures Identifier. + """ + CVE + + """ + GitHub Security Advisory ID. + """ + GHSA +} + +""" +Ordering options for security advisory connections +""" +input SecurityAdvisoryOrder { + """ + The ordering direction. + """ + direction: OrderDirection! + + """ + The field to order security advisories by. + """ + field: SecurityAdvisoryOrderField! +} + +""" +Properties by which security advisory connections can be ordered. +""" +enum SecurityAdvisoryOrderField { + """ + Order advisories by publication time + """ + PUBLISHED_AT + + """ + Order advisories by update time + """ + UPDATED_AT +} + +""" +An individual package +""" +type SecurityAdvisoryPackage { + """ + The ecosystem the package belongs to, e.g. RUBYGEMS, NPM + """ + ecosystem: SecurityAdvisoryEcosystem! + + """ + The package name + """ + name: String! +} + +""" +An individual package version +""" +type SecurityAdvisoryPackageVersion { + """ + The package name or version + """ + identifier: String! +} + +""" +A GitHub Security Advisory Reference +""" +type SecurityAdvisoryReference { + """ + A publicly accessible reference + """ + url: URI! +} + +""" +Severity of the vulnerability. +""" +enum SecurityAdvisorySeverity { + """ + Critical. + """ + CRITICAL + + """ + High. + """ + HIGH + + """ + Low. + """ + LOW + + """ + Moderate. + """ + MODERATE +} + +""" +An individual vulnerability within an Advisory +""" +type SecurityVulnerability { + """ + The Advisory associated with this Vulnerability + """ + advisory: SecurityAdvisory! + + """ + The first version containing a fix for the vulnerability + """ + firstPatchedVersion: SecurityAdvisoryPackageVersion + + """ + A description of the vulnerable package + """ + package: SecurityAdvisoryPackage! + + """ + The severity of the vulnerability within this package + """ + severity: SecurityAdvisorySeverity! + + """ + When the vulnerability was last updated + """ + updatedAt: DateTime! + + """ + A string that describes the vulnerable package versions. + This string follows a basic syntax with a few forms. + + `= 0.2.0` denotes a single vulnerable version. + + `<= 1.0.8` denotes a version range up to and including the specified version + + `< 0.1.11` denotes a version range up to, but excluding, the specified version + + `>= 4.3.0, < 4.3.5` denotes a version range with a known minimum and maximum version. + + `>= 0.0.1` denotes a version range with a known minimum, but no known maximum + """ + vulnerableVersionRange: String! +} + +""" +The connection type for SecurityVulnerability. +""" +type SecurityVulnerabilityConnection { + """ + A list of edges. + """ + edges: [SecurityVulnerabilityEdge] + + """ + A list of nodes. + """ + nodes: [SecurityVulnerability] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type SecurityVulnerabilityEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: SecurityVulnerability +} + +""" +Ordering options for security vulnerability connections +""" +input SecurityVulnerabilityOrder { + """ + The ordering direction. + """ + direction: OrderDirection! + + """ + The field to order security vulnerabilities by. + """ + field: SecurityVulnerabilityOrderField! +} + +""" +Properties by which security vulnerability connections can be ordered. +""" +enum SecurityVulnerabilityOrderField { + """ + Order vulnerability by update time + """ + UPDATED_AT +} + +""" +Autogenerated input type of SetEnterpriseIdentityProvider +""" +input SetEnterpriseIdentityProviderInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The digest algorithm used to sign SAML requests for the identity provider. + """ + digestMethod: SamlDigestAlgorithm! + + """ + The ID of the enterprise on which to set an identity provider. + """ + enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) + + """ + The x509 certificate used by the identity provider to sign assertions and responses. + """ + idpCertificate: String! + + """ + The Issuer Entity ID for the SAML identity provider + """ + issuer: String + + """ + The signature algorithm used to sign SAML requests for the identity provider. + """ + signatureMethod: SamlSignatureAlgorithm! + + """ + The URL endpoint for the identity provider's SAML SSO. + """ + ssoUrl: URI! +} + +""" +Autogenerated return type of SetEnterpriseIdentityProvider +""" +type SetEnterpriseIdentityProviderPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The identity provider for the enterprise. + """ + identityProvider: EnterpriseIdentityProvider +} + +""" +Autogenerated input type of SetOrganizationInteractionLimit +""" +input SetOrganizationInteractionLimitInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + When this limit should expire. + """ + expiry: RepositoryInteractionLimitExpiry + + """ + The limit to set. + """ + limit: RepositoryInteractionLimit! + + """ + The ID of the organization to set a limit for. + """ + organizationId: ID! @possibleTypes(concreteTypes: ["Organization"]) +} + +""" +Autogenerated return type of SetOrganizationInteractionLimit +""" +type SetOrganizationInteractionLimitPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The organization that the interaction limit was set for. + """ + organization: Organization +} + +""" +Autogenerated input type of SetRepositoryInteractionLimit +""" +input SetRepositoryInteractionLimitInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + When this limit should expire. + """ + expiry: RepositoryInteractionLimitExpiry + + """ + The limit to set. + """ + limit: RepositoryInteractionLimit! + + """ + The ID of the repository to set a limit for. + """ + repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) +} + +""" +Autogenerated return type of SetRepositoryInteractionLimit +""" +type SetRepositoryInteractionLimitPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The repository that the interaction limit was set for. + """ + repository: Repository +} + +""" +Autogenerated input type of SetUserInteractionLimit +""" +input SetUserInteractionLimitInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + When this limit should expire. + """ + expiry: RepositoryInteractionLimitExpiry + + """ + The limit to set. + """ + limit: RepositoryInteractionLimit! + + """ + The ID of the user to set a limit for. + """ + userId: ID! @possibleTypes(concreteTypes: ["User"]) +} + +""" +Autogenerated return type of SetUserInteractionLimit +""" +type SetUserInteractionLimitPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The user that the interaction limit was set for. + """ + user: User +} + +""" +Represents an S/MIME signature on a Commit or Tag. +""" +type SmimeSignature implements GitSignature { + """ + Email used to sign this object. + """ + email: String! + + """ + True if the signature is valid and verified by GitHub. + """ + isValid: Boolean! + + """ + Payload for GPG signing object. Raw ODB object without the signature header. + """ + payload: String! + + """ + ASCII-armored signature header from object. + """ + signature: String! + + """ + GitHub user corresponding to the email signing this commit. + """ + signer: User + + """ + The state of this signature. `VALID` if signature is valid and verified by + GitHub, otherwise represents reason why signature is considered invalid. + """ + state: GitSignatureState! + + """ + True if the signature was made with GitHub's signing key. + """ + wasSignedByGitHub: Boolean! +} + +""" +Entities that can sponsor others via GitHub Sponsors +""" +union Sponsor = Organization | User + +""" +Entities that can be sponsored through GitHub Sponsors +""" +interface Sponsorable { + """ + True if this user/organization has a GitHub Sponsors listing. + """ + hasSponsorsListing: Boolean! + + """ + Check if the given account is sponsoring this user/organization. + """ + isSponsoredBy( + """ + The target account's login. + """ + accountLogin: String! + ): Boolean! + + """ + True if the viewer is sponsored by this user/organization. + """ + isSponsoringViewer: Boolean! + + """ + The GitHub Sponsors listing for this user or organization. + """ + sponsorsListing: SponsorsListing + + """ + The viewer's sponsorship of this entity. + """ + sponsorshipForViewerAsSponsor: Sponsorship + + """ + This object's sponsorships as the maintainer. + """ + sponsorshipsAsMaintainer( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Whether or not to include private sponsorships in the result set + """ + includePrivate: Boolean = false + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for sponsorships returned from this connection. If left + blank, the sponsorships will be ordered based on relevancy to the viewer. + """ + orderBy: SponsorshipOrder + ): SponsorshipConnection! + + """ + This object's sponsorships as the sponsor. + """ + sponsorshipsAsSponsor( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for sponsorships returned from this connection. If left + blank, the sponsorships will be ordered based on relevancy to the viewer. + """ + orderBy: SponsorshipOrder + ): SponsorshipConnection! + + """ + Whether or not the viewer is able to sponsor this user/organization. + """ + viewerCanSponsor: Boolean! + + """ + True if the viewer is sponsoring this user/organization. + """ + viewerIsSponsoring: Boolean! +} + +""" +Entities that can be sponsored via GitHub Sponsors +""" +union SponsorableItem = Organization | User + +""" +The connection type for SponsorableItem. +""" +type SponsorableItemConnection { + """ + A list of edges. + """ + edges: [SponsorableItemEdge] + + """ + A list of nodes. + """ + nodes: [SponsorableItem] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type SponsorableItemEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: SponsorableItem +} + +""" +Ordering options for connections to get sponsorable entities for GitHub Sponsors. +""" +input SponsorableOrder { + """ + The ordering direction. + """ + direction: OrderDirection! + + """ + The field to order sponsorable entities by. + """ + field: SponsorableOrderField! +} + +""" +Properties by which sponsorable connections can be ordered. +""" +enum SponsorableOrderField { + """ + Order sponsorable entities by login (username). + """ + LOGIN +} + +""" +A goal associated with a GitHub Sponsors listing, representing a target the sponsored maintainer would like to attain. +""" +type SponsorsGoal { + """ + A description of the goal from the maintainer. + """ + description: String + + """ + What the objective of this goal is. + """ + kind: SponsorsGoalKind! + + """ + The percentage representing how complete this goal is, between 0-100. + """ + percentComplete: Int! + + """ + What the goal amount is. Represents a dollar amount for monthly sponsorship + amount goals. Represents a count of unique sponsors for total sponsors count goals. + """ + targetValue: Int! + + """ + A brief summary of the kind and target value of this goal. + """ + title: String! +} + +""" +The different kinds of goals a GitHub Sponsors member can have. +""" +enum SponsorsGoalKind { + """ + The goal is about getting a certain dollar amount from sponsorships each month. + """ + MONTHLY_SPONSORSHIP_AMOUNT + + """ + The goal is about reaching a certain number of sponsors. + """ + TOTAL_SPONSORS_COUNT +} + +""" +A GitHub Sponsors listing. +""" +type SponsorsListing implements Node { + """ + The current goal the maintainer is trying to reach with GitHub Sponsors, if any. + """ + activeGoal: SponsorsGoal + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + The full description of the listing. + """ + fullDescription: String! + + """ + The full description of the listing rendered to HTML. + """ + fullDescriptionHTML: HTML! + id: ID! + + """ + The listing's full name. + """ + name: String! + + """ + The short description of the listing. + """ + shortDescription: String! + + """ + The short name of the listing. + """ + slug: String! + + """ + The published tiers for this GitHub Sponsors listing. + """ + tiers( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for Sponsors tiers returned from the connection. + """ + orderBy: SponsorsTierOrder = {field: MONTHLY_PRICE_IN_CENTS, direction: ASC} + ): SponsorsTierConnection +} + +""" +A GitHub Sponsors tier associated with a GitHub Sponsors listing. +""" +type SponsorsTier implements Node { + """ + SponsorsTier information only visible to users that can administer the associated Sponsors listing. + """ + adminInfo: SponsorsTierAdminInfo + + """ + Get a different tier for this tier's maintainer that is at the same frequency + as this tier but with a lesser cost. Returns the published tier with the + monthly price closest to this tier's without going over. + """ + closestLesserValueTier: SponsorsTier + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + The description of the tier. + """ + description: String! + + """ + The tier description rendered to HTML + """ + descriptionHTML: HTML! + id: ID! + + """ + Whether this tier was chosen at checkout time by the sponsor rather than + defined ahead of time by the maintainer who manages the Sponsors listing. + """ + isCustomAmount: Boolean! + + """ + Whether this tier is only for use with one-time sponsorships. + """ + isOneTime: Boolean! + + """ + How much this tier costs per month in cents. + """ + monthlyPriceInCents: Int! + + """ + How much this tier costs per month in dollars. + """ + monthlyPriceInDollars: Int! + + """ + The name of the tier. + """ + name: String! + + """ + The sponsors listing that this tier belongs to. + """ + sponsorsListing: SponsorsListing! + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! +} + +""" +SponsorsTier information only visible to users that can administer the associated Sponsors listing. +""" +type SponsorsTierAdminInfo { + """ + The sponsorships associated with this tier. + """ + sponsorships( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Whether or not to include private sponsorships in the result set + """ + includePrivate: Boolean = false + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for sponsorships returned from this connection. If left + blank, the sponsorships will be ordered based on relevancy to the viewer. + """ + orderBy: SponsorshipOrder + ): SponsorshipConnection! +} + +""" +The connection type for SponsorsTier. +""" +type SponsorsTierConnection { + """ + A list of edges. + """ + edges: [SponsorsTierEdge] + + """ + A list of nodes. + """ + nodes: [SponsorsTier] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type SponsorsTierEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: SponsorsTier +} + +""" +Ordering options for Sponsors tiers connections. +""" +input SponsorsTierOrder { + """ + The ordering direction. + """ + direction: OrderDirection! + + """ + The field to order tiers by. + """ + field: SponsorsTierOrderField! +} + +""" +Properties by which Sponsors tiers connections can be ordered. +""" +enum SponsorsTierOrderField { + """ + Order tiers by creation time. + """ + CREATED_AT + + """ + Order tiers by their monthly price in cents + """ + MONTHLY_PRICE_IN_CENTS +} + +""" +A sponsorship relationship between a sponsor and a maintainer +""" +type Sponsorship implements Node { + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! + + """ + Whether this sponsorship represents a one-time payment versus a recurring sponsorship. + """ + isOneTimePayment: Boolean! + + """ + The entity that is being sponsored + """ + maintainer: User! @deprecated(reason: "`Sponsorship.maintainer` will be removed. Use `Sponsorship.sponsorable` instead. Removal on 2020-04-01 UTC.") + + """ + The privacy level for this sponsorship. + """ + privacyLevel: SponsorshipPrivacy! + + """ + The user that is sponsoring. Returns null if the sponsorship is private or if sponsor is not a user. + """ + sponsor: User @deprecated(reason: "`Sponsorship.sponsor` will be removed. Use `Sponsorship.sponsorEntity` instead. Removal on 2020-10-01 UTC.") + + """ + The user or organization that is sponsoring, if you have permission to view them. + """ + sponsorEntity: Sponsor + + """ + The entity that is being sponsored + """ + sponsorable: Sponsorable! + + """ + The associated sponsorship tier + """ + tier: SponsorsTier +} + +""" +The connection type for Sponsorship. +""" +type SponsorshipConnection { + """ + A list of edges. + """ + edges: [SponsorshipEdge] + + """ + A list of nodes. + """ + nodes: [Sponsorship] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type SponsorshipEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Sponsorship +} + +""" +Ordering options for sponsorship connections. +""" +input SponsorshipOrder { + """ + The ordering direction. + """ + direction: OrderDirection! + + """ + The field to order sponsorship by. + """ + field: SponsorshipOrderField! +} + +""" +Properties by which sponsorship connections can be ordered. +""" +enum SponsorshipOrderField { + """ + Order sponsorship by creation time. + """ + CREATED_AT +} + +""" +The privacy of a sponsorship +""" +enum SponsorshipPrivacy { + """ + Private + """ + PRIVATE + + """ + Public + """ + PUBLIC +} + +""" +Ways in which star connections can be ordered. +""" +input StarOrder { + """ + The direction in which to order nodes. + """ + direction: OrderDirection! + + """ + The field in which to order nodes by. + """ + field: StarOrderField! +} + +""" +Properties by which star connections can be ordered. +""" +enum StarOrderField { + """ + Allows ordering a list of stars by when they were created. + """ + STARRED_AT +} + +""" +The connection type for User. +""" +type StargazerConnection { + """ + A list of edges. + """ + edges: [StargazerEdge] + + """ + A list of nodes. + """ + nodes: [User] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +Represents a user that's starred a repository. +""" +type StargazerEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + node: User! + + """ + Identifies when the item was starred. + """ + starredAt: DateTime! +} + +""" +Things that can be starred. +""" +interface Starrable { + id: ID! + + """ + Returns a count of how many stargazers there are on this object + """ + stargazerCount: Int! + + """ + A list of users who have starred this starrable. + """ + stargazers( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Order for connection + """ + orderBy: StarOrder + ): StargazerConnection! + + """ + Returns a boolean indicating whether the viewing user has starred this starrable. + """ + viewerHasStarred: Boolean! +} + +""" +The connection type for Repository. +""" +type StarredRepositoryConnection { + """ + A list of edges. + """ + edges: [StarredRepositoryEdge] + + """ + Is the list of stars for this user truncated? This is true for users that have many stars. + """ + isOverLimit: Boolean! + + """ + A list of nodes. + """ + nodes: [Repository] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +Represents a starred repository. +""" +type StarredRepositoryEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + node: Repository! + + """ + Identifies when the item was starred. + """ + starredAt: DateTime! +} + +""" +Represents a commit status. +""" +type Status implements Node { + """ + A list of status contexts and check runs for this commit. + """ + combinedContexts( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): StatusCheckRollupContextConnection! + + """ + The commit this status is attached to. + """ + commit: Commit + + """ + Looks up an individual status context by context name. + """ + context( + """ + The context name. + """ + name: String! + ): StatusContext + + """ + The individual status contexts for this commit. + """ + contexts: [StatusContext!]! + id: ID! + + """ + The combined commit status. + """ + state: StatusState! +} + +""" +Represents the rollup for both the check runs and status for a commit. +""" +type StatusCheckRollup implements Node { + """ + The commit the status and check runs are attached to. + """ + commit: Commit + + """ + A list of status contexts and check runs for this commit. + """ + contexts( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): StatusCheckRollupContextConnection! + id: ID! + + """ + The combined status for the commit. + """ + state: StatusState! +} + +""" +Types that can be inside a StatusCheckRollup context. +""" +union StatusCheckRollupContext = CheckRun | StatusContext + +""" +The connection type for StatusCheckRollupContext. +""" +type StatusCheckRollupContextConnection { + """ + A list of edges. + """ + edges: [StatusCheckRollupContextEdge] + + """ + A list of nodes. + """ + nodes: [StatusCheckRollupContext] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type StatusCheckRollupContextEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: StatusCheckRollupContext +} + +""" +Represents an individual commit status context +""" +type StatusContext implements Node & RequirableByPullRequest { + """ + The avatar of the OAuth application or the user that created the status + """ + avatarUrl( + """ + The size of the resulting square image. + """ + size: Int = 40 + ): URI + + """ + This commit this status context is attached to. + """ + commit: Commit + + """ + The name of this status context. + """ + context: String! + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + The actor who created this status context. + """ + creator: Actor + + """ + The description for this status context. + """ + description: String + id: ID! + + """ + Whether this is required to pass before merging for a specific pull request. + """ + isRequired( + """ + The id of the pull request this is required for + """ + pullRequestId: ID + + """ + The number of the pull request this is required for + """ + pullRequestNumber: Int + ): Boolean! + + """ + The state of this status context. + """ + state: StatusState! + + """ + The URL for this status context. + """ + targetUrl: URI +} + +""" +The possible commit status states. +""" +enum StatusState { + """ + Status is errored. + """ + ERROR + + """ + Status is expected. + """ + EXPECTED + + """ + Status is failing. + """ + FAILURE + + """ + Status is pending. + """ + PENDING + + """ + Status is successful. + """ + SUCCESS +} + +""" +Autogenerated input type of SubmitPullRequestReview +""" +input SubmitPullRequestReviewInput { + """ + The text field to set on the Pull Request Review. + """ + body: String + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The event to send to the Pull Request Review. + """ + event: PullRequestReviewEvent! + + """ + The Pull Request ID to submit any pending reviews. + """ + pullRequestId: ID @possibleTypes(concreteTypes: ["PullRequest"]) + + """ + The Pull Request Review ID to submit. + """ + pullRequestReviewId: ID @possibleTypes(concreteTypes: ["PullRequestReview"]) +} + +""" +Autogenerated return type of SubmitPullRequestReview +""" +type SubmitPullRequestReviewPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The submitted pull request review. + """ + pullRequestReview: PullRequestReview +} + +""" +A pointer to a repository at a specific revision embedded inside another repository. +""" +type Submodule { + """ + The branch of the upstream submodule for tracking updates + """ + branch: String + + """ + The git URL of the submodule repository + """ + gitUrl: URI! + + """ + The name of the submodule in .gitmodules + """ + name: String! + + """ + The path in the superproject that this submodule is located in + """ + path: String! + + """ + The commit revision of the subproject repository being tracked by the submodule + """ + subprojectCommitOid: GitObjectID +} + +""" +The connection type for Submodule. +""" +type SubmoduleConnection { + """ + A list of edges. + """ + edges: [SubmoduleEdge] + + """ + A list of nodes. + """ + nodes: [Submodule] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type SubmoduleEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Submodule +} + +""" +Entities that can be subscribed to for web and email notifications. +""" +interface Subscribable { + id: ID! + + """ + Check if the viewer is able to change their subscription status for the repository. + """ + viewerCanSubscribe: Boolean! + + """ + Identifies if the viewer is watching, not watching, or ignoring the subscribable entity. + """ + viewerSubscription: SubscriptionState +} + +""" +Represents a 'subscribed' event on a given `Subscribable`. +""" +type SubscribedEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! + + """ + Object referenced by event. + """ + subscribable: Subscribable! +} + +""" +The possible states of a subscription. +""" +enum SubscriptionState { + """ + The User is never notified. + """ + IGNORED + + """ + The User is notified of all conversations. + """ + SUBSCRIBED + + """ + The User is only notified when participating or @mentioned. + """ + UNSUBSCRIBED +} + +""" +A suggestion to review a pull request based on a user's commit history and review comments. +""" +type SuggestedReviewer { + """ + Is this suggestion based on past commits? + """ + isAuthor: Boolean! + + """ + Is this suggestion based on past review comments? + """ + isCommenter: Boolean! + + """ + Identifies the user suggested to review the pull request. + """ + reviewer: User! +} + +""" +Represents a Git tag. +""" +type Tag implements GitObject & Node { + """ + An abbreviated version of the Git object ID + """ + abbreviatedOid: String! + + """ + The HTTP path for this Git object + """ + commitResourcePath: URI! + + """ + The HTTP URL for this Git object + """ + commitUrl: URI! + id: ID! + + """ + The Git tag message. + """ + message: String + + """ + The Git tag name. + """ + name: String! + + """ + The Git object ID + """ + oid: GitObjectID! + + """ + The Repository the Git object belongs to + """ + repository: Repository! + + """ + Details about the tag author. + """ + tagger: GitActor + + """ + The Git object the tag points to. + """ + target: GitObject! +} + +""" +A team of users in an organization. +""" +type Team implements MemberStatusable & Node & Subscribable { + """ + A list of teams that are ancestors of this team. + """ + ancestors( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): TeamConnection! + + """ + A URL pointing to the team's avatar. + """ + avatarUrl( + """ + The size in pixels of the resulting square image. + """ + size: Int = 400 + ): URI + + """ + List of child teams belonging to this team + """ + childTeams( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Whether to list immediate child teams or all descendant child teams. + """ + immediateOnly: Boolean = true + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Order for connection + """ + orderBy: TeamOrder + + """ + User logins to filter by + """ + userLogins: [String!] + ): TeamConnection! + + """ + The slug corresponding to the organization and team. + """ + combinedSlug: String! + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + + """ + The description of the team. + """ + description: String + + """ + Find a team discussion by its number. + """ + discussion( + """ + The sequence number of the discussion to find. + """ + number: Int! + ): TeamDiscussion + + """ + A list of team discussions. + """ + discussions( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + If provided, filters discussions according to whether or not they are pinned. + """ + isPinned: Boolean + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Order for connection + """ + orderBy: TeamDiscussionOrder + ): TeamDiscussionConnection! + + """ + The HTTP path for team discussions + """ + discussionsResourcePath: URI! + + """ + The HTTP URL for team discussions + """ + discussionsUrl: URI! + + """ + The HTTP path for editing this team + """ + editTeamResourcePath: URI! + + """ + The HTTP URL for editing this team + """ + editTeamUrl: URI! + id: ID! + + """ + A list of pending invitations for users to this team + """ + invitations( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): OrganizationInvitationConnection + + """ + Get the status messages members of this entity have set that are either public or visible only to the organization. + """ + memberStatuses( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for user statuses returned from the connection. + """ + orderBy: UserStatusOrder = {field: UPDATED_AT, direction: DESC} + ): UserStatusConnection! + + """ + A list of users who are members of this team. + """ + members( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Filter by membership type + """ + membership: TeamMembershipType = ALL + + """ + Order for the connection. + """ + orderBy: TeamMemberOrder + + """ + The search string to look for. + """ + query: String + + """ + Filter by team member role + """ + role: TeamMemberRole + ): TeamMemberConnection! + + """ + The HTTP path for the team' members + """ + membersResourcePath: URI! + + """ + The HTTP URL for the team' members + """ + membersUrl: URI! + + """ + The name of the team. + """ + name: String! + + """ + The HTTP path creating a new team + """ + newTeamResourcePath: URI! + + """ + The HTTP URL creating a new team + """ + newTeamUrl: URI! + + """ + The organization that owns this team. + """ + organization: Organization! + + """ + The parent team of the team. + """ + parentTeam: Team + + """ + The level of privacy the team has. + """ + privacy: TeamPrivacy! + + """ + A list of repositories this team has access to. + """ + repositories( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Order for the connection. + """ + orderBy: TeamRepositoryOrder + + """ + The search string to look for. + """ + query: String + ): TeamRepositoryConnection! + + """ + The HTTP path for this team's repositories + """ + repositoriesResourcePath: URI! + + """ + The HTTP URL for this team's repositories + """ + repositoriesUrl: URI! + + """ + The HTTP path for this team + """ + resourcePath: URI! + + """ + What algorithm is used for review assignment for this team + """ + reviewRequestDelegationAlgorithm: TeamReviewAssignmentAlgorithm @preview(toggledBy: "stone-crop-preview") + + """ + True if review assignment is enabled for this team + """ + reviewRequestDelegationEnabled: Boolean! @preview(toggledBy: "stone-crop-preview") + + """ + How many team members are required for review assignment for this team + """ + reviewRequestDelegationMemberCount: Int @preview(toggledBy: "stone-crop-preview") + + """ + When assigning team members via delegation, whether the entire team should be notified as well. + """ + reviewRequestDelegationNotifyTeam: Boolean! @preview(toggledBy: "stone-crop-preview") + + """ + The slug corresponding to the team. + """ + slug: String! + + """ + The HTTP path for this team's teams + """ + teamsResourcePath: URI! + + """ + The HTTP URL for this team's teams + """ + teamsUrl: URI! + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! + + """ + The HTTP URL for this team + """ + url: URI! + + """ + Team is adminable by the viewer. + """ + viewerCanAdminister: Boolean! + + """ + Check if the viewer is able to change their subscription status for the repository. + """ + viewerCanSubscribe: Boolean! + + """ + Identifies if the viewer is watching, not watching, or ignoring the subscribable entity. + """ + viewerSubscription: SubscriptionState +} + +""" +Audit log entry for a team.add_member event. +""" +type TeamAddMemberAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & TeamAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + Whether the team was mapped to an LDAP Group. + """ + isLdapMapped: Boolean + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The team associated with the action + """ + team: Team + + """ + The name of the team + """ + teamName: String + + """ + The HTTP path for this team + """ + teamResourcePath: URI + + """ + The HTTP URL for this team + """ + teamUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a team.add_repository event. +""" +type TeamAddRepositoryAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData & TeamAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + Whether the team was mapped to an LDAP Group. + """ + isLdapMapped: Boolean + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The repository associated with the action + """ + repository: Repository + + """ + The name of the repository + """ + repositoryName: String + + """ + The HTTP path for the repository + """ + repositoryResourcePath: URI + + """ + The HTTP URL for the repository + """ + repositoryUrl: URI + + """ + The team associated with the action + """ + team: Team + + """ + The name of the team + """ + teamName: String + + """ + The HTTP path for this team + """ + teamResourcePath: URI + + """ + The HTTP URL for this team + """ + teamUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Metadata for an audit entry with action team.* +""" +interface TeamAuditEntryData { + """ + The team associated with the action + """ + team: Team + + """ + The name of the team + """ + teamName: String + + """ + The HTTP path for this team + """ + teamResourcePath: URI + + """ + The HTTP URL for this team + """ + teamUrl: URI +} + +""" +Audit log entry for a team.change_parent_team event. +""" +type TeamChangeParentTeamAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & TeamAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + Whether the team was mapped to an LDAP Group. + """ + isLdapMapped: Boolean + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The new parent team. + """ + parentTeam: Team + + """ + The name of the new parent team + """ + parentTeamName: String + + """ + The name of the former parent team + """ + parentTeamNameWas: String + + """ + The HTTP path for the parent team + """ + parentTeamResourcePath: URI + + """ + The HTTP URL for the parent team + """ + parentTeamUrl: URI + + """ + The former parent team. + """ + parentTeamWas: Team + + """ + The HTTP path for the previous parent team + """ + parentTeamWasResourcePath: URI + + """ + The HTTP URL for the previous parent team + """ + parentTeamWasUrl: URI + + """ + The team associated with the action + """ + team: Team + + """ + The name of the team + """ + teamName: String + + """ + The HTTP path for this team + """ + teamResourcePath: URI + + """ + The HTTP URL for this team + """ + teamUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +The connection type for Team. +""" +type TeamConnection { + """ + A list of edges. + """ + edges: [TeamEdge] + + """ + A list of nodes. + """ + nodes: [Team] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +A team discussion. +""" +type TeamDiscussion implements Comment & Deletable & Node & Reactable & Subscribable & UniformResourceLocatable & Updatable & UpdatableComment { + """ + The actor who authored the comment. + """ + author: Actor + + """ + Author's association with the discussion's team. + """ + authorAssociation: CommentAuthorAssociation! + + """ + The body as Markdown. + """ + body: String! + + """ + The body rendered to HTML. + """ + bodyHTML: HTML! + + """ + The body rendered to text. + """ + bodyText: String! + + """ + Identifies the discussion body hash. + """ + bodyVersion: String! + + """ + A list of comments on this discussion. + """ + comments( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + When provided, filters the connection such that results begin with the comment with this number. + """ + fromComment: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Order for connection + """ + orderBy: TeamDiscussionCommentOrder + ): TeamDiscussionCommentConnection! + + """ + The HTTP path for discussion comments + """ + commentsResourcePath: URI! + + """ + The HTTP URL for discussion comments + """ + commentsUrl: URI! + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Check if this comment was created via an email reply. + """ + createdViaEmail: Boolean! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + + """ + The actor who edited the comment. + """ + editor: Actor + id: ID! + + """ + Check if this comment was edited and includes an edit with the creation data + """ + includesCreatedEdit: Boolean! + + """ + Whether or not the discussion is pinned. + """ + isPinned: Boolean! + + """ + Whether or not the discussion is only visible to team members and org admins. + """ + isPrivate: Boolean! + + """ + The moment the editor made the last edit + """ + lastEditedAt: DateTime + + """ + Identifies the discussion within its team. + """ + number: Int! + + """ + Identifies when the comment was published at. + """ + publishedAt: DateTime + + """ + A list of reactions grouped by content left on the subject. + """ + reactionGroups: [ReactionGroup!] + + """ + A list of Reactions left on the Issue. + """ + reactions( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Allows filtering Reactions by emoji. + """ + content: ReactionContent + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Allows specifying the order in which reactions are returned. + """ + orderBy: ReactionOrder + ): ReactionConnection! + + """ + The HTTP path for this discussion + """ + resourcePath: URI! + + """ + The team that defines the context of this discussion. + """ + team: Team! + + """ + The title of the discussion + """ + title: String! + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! + + """ + The HTTP URL for this discussion + """ + url: URI! + + """ + A list of edits to this content. + """ + userContentEdits( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): UserContentEditConnection + + """ + Check if the current viewer can delete this object. + """ + viewerCanDelete: Boolean! + + """ + Whether or not the current viewer can pin this discussion. + """ + viewerCanPin: Boolean! + + """ + Can user react to this subject + """ + viewerCanReact: Boolean! + + """ + Check if the viewer is able to change their subscription status for the repository. + """ + viewerCanSubscribe: Boolean! + + """ + Check if the current viewer can update this object. + """ + viewerCanUpdate: Boolean! + + """ + Reasons why the current viewer can not update this comment. + """ + viewerCannotUpdateReasons: [CommentCannotUpdateReason!]! + + """ + Did the viewer author this comment. + """ + viewerDidAuthor: Boolean! + + """ + Identifies if the viewer is watching, not watching, or ignoring the subscribable entity. + """ + viewerSubscription: SubscriptionState +} + +""" +A comment on a team discussion. +""" +type TeamDiscussionComment implements Comment & Deletable & Node & Reactable & UniformResourceLocatable & Updatable & UpdatableComment { + """ + The actor who authored the comment. + """ + author: Actor + + """ + Author's association with the comment's team. + """ + authorAssociation: CommentAuthorAssociation! + + """ + The body as Markdown. + """ + body: String! + + """ + The body rendered to HTML. + """ + bodyHTML: HTML! + + """ + The body rendered to text. + """ + bodyText: String! + + """ + The current version of the body content. + """ + bodyVersion: String! + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Check if this comment was created via an email reply. + """ + createdViaEmail: Boolean! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + + """ + The discussion this comment is about. + """ + discussion: TeamDiscussion! + + """ + The actor who edited the comment. + """ + editor: Actor + id: ID! + + """ + Check if this comment was edited and includes an edit with the creation data + """ + includesCreatedEdit: Boolean! + + """ + The moment the editor made the last edit + """ + lastEditedAt: DateTime + + """ + Identifies the comment number. + """ + number: Int! + + """ + Identifies when the comment was published at. + """ + publishedAt: DateTime + + """ + A list of reactions grouped by content left on the subject. + """ + reactionGroups: [ReactionGroup!] + + """ + A list of Reactions left on the Issue. + """ + reactions( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Allows filtering Reactions by emoji. + """ + content: ReactionContent + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Allows specifying the order in which reactions are returned. + """ + orderBy: ReactionOrder + ): ReactionConnection! + + """ + The HTTP path for this comment + """ + resourcePath: URI! + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! + + """ + The HTTP URL for this comment + """ + url: URI! + + """ + A list of edits to this content. + """ + userContentEdits( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): UserContentEditConnection + + """ + Check if the current viewer can delete this object. + """ + viewerCanDelete: Boolean! + + """ + Can user react to this subject + """ + viewerCanReact: Boolean! + + """ + Check if the current viewer can update this object. + """ + viewerCanUpdate: Boolean! + + """ + Reasons why the current viewer can not update this comment. + """ + viewerCannotUpdateReasons: [CommentCannotUpdateReason!]! + + """ + Did the viewer author this comment. + """ + viewerDidAuthor: Boolean! +} + +""" +The connection type for TeamDiscussionComment. +""" +type TeamDiscussionCommentConnection { + """ + A list of edges. + """ + edges: [TeamDiscussionCommentEdge] + + """ + A list of nodes. + """ + nodes: [TeamDiscussionComment] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type TeamDiscussionCommentEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: TeamDiscussionComment +} + +""" +Ways in which team discussion comment connections can be ordered. +""" +input TeamDiscussionCommentOrder { + """ + The direction in which to order nodes. + """ + direction: OrderDirection! + + """ + The field by which to order nodes. + """ + field: TeamDiscussionCommentOrderField! +} + +""" +Properties by which team discussion comment connections can be ordered. +""" +enum TeamDiscussionCommentOrderField { + """ + Allows sequential ordering of team discussion comments (which is equivalent to chronological ordering). + """ + NUMBER +} + +""" +The connection type for TeamDiscussion. +""" +type TeamDiscussionConnection { + """ + A list of edges. + """ + edges: [TeamDiscussionEdge] + + """ + A list of nodes. + """ + nodes: [TeamDiscussion] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type TeamDiscussionEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: TeamDiscussion +} + +""" +Ways in which team discussion connections can be ordered. +""" +input TeamDiscussionOrder { + """ + The direction in which to order nodes. + """ + direction: OrderDirection! + + """ + The field by which to order nodes. + """ + field: TeamDiscussionOrderField! +} + +""" +Properties by which team discussion connections can be ordered. +""" +enum TeamDiscussionOrderField { + """ + Allows chronological ordering of team discussions. + """ + CREATED_AT +} + +""" +An edge in a connection. +""" +type TeamEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Team +} + +""" +The connection type for User. +""" +type TeamMemberConnection { + """ + A list of edges. + """ + edges: [TeamMemberEdge] + + """ + A list of nodes. + """ + nodes: [User] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +Represents a user who is a member of a team. +""" +type TeamMemberEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The HTTP path to the organization's member access page. + """ + memberAccessResourcePath: URI! + + """ + The HTTP URL to the organization's member access page. + """ + memberAccessUrl: URI! + node: User! + + """ + The role the member has on the team. + """ + role: TeamMemberRole! +} + +""" +Ordering options for team member connections +""" +input TeamMemberOrder { + """ + The ordering direction. + """ + direction: OrderDirection! + + """ + The field to order team members by. + """ + field: TeamMemberOrderField! +} + +""" +Properties by which team member connections can be ordered. +""" +enum TeamMemberOrderField { + """ + Order team members by creation time + """ + CREATED_AT + + """ + Order team members by login + """ + LOGIN +} + +""" +The possible team member roles; either 'maintainer' or 'member'. +""" +enum TeamMemberRole { + """ + A team maintainer has permission to add and remove team members. + """ + MAINTAINER + + """ + A team member has no administrative permissions on the team. + """ + MEMBER +} + +""" +Defines which types of team members are included in the returned list. Can be one of IMMEDIATE, CHILD_TEAM or ALL. +""" +enum TeamMembershipType { + """ + Includes immediate and child team members for the team. + """ + ALL + + """ + Includes only child team members for the team. + """ + CHILD_TEAM + + """ + Includes only immediate members of the team. + """ + IMMEDIATE +} + +""" +Ways in which team connections can be ordered. +""" +input TeamOrder { + """ + The direction in which to order nodes. + """ + direction: OrderDirection! + + """ + The field in which to order nodes by. + """ + field: TeamOrderField! +} + +""" +Properties by which team connections can be ordered. +""" +enum TeamOrderField { + """ + Allows ordering a list of teams by name. + """ + NAME +} + +""" +The possible team privacy values. +""" +enum TeamPrivacy { + """ + A secret team can only be seen by its members. + """ + SECRET + + """ + A visible team can be seen and @mentioned by every member of the organization. + """ + VISIBLE +} + +""" +Audit log entry for a team.remove_member event. +""" +type TeamRemoveMemberAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & TeamAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + Whether the team was mapped to an LDAP Group. + """ + isLdapMapped: Boolean + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The team associated with the action + """ + team: Team + + """ + The name of the team + """ + teamName: String + + """ + The HTTP path for this team + """ + teamResourcePath: URI + + """ + The HTTP URL for this team + """ + teamUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +Audit log entry for a team.remove_repository event. +""" +type TeamRemoveRepositoryAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData & TeamAuditEntryData { + """ + The action name + """ + action: String! + + """ + The user who initiated the action + """ + actor: AuditEntryActor + + """ + The IP address of the actor + """ + actorIp: String + + """ + A readable representation of the actor's location + """ + actorLocation: ActorLocation + + """ + The username of the user who initiated the action + """ + actorLogin: String + + """ + The HTTP path for the actor. + """ + actorResourcePath: URI + + """ + The HTTP URL for the actor. + """ + actorUrl: URI + + """ + The time the action was initiated + """ + createdAt: PreciseDateTime! + id: ID! + + """ + Whether the team was mapped to an LDAP Group. + """ + isLdapMapped: Boolean + + """ + The corresponding operation type for the action + """ + operationType: OperationType + + """ + The Organization associated with the Audit Entry. + """ + organization: Organization + + """ + The name of the Organization. + """ + organizationName: String + + """ + The HTTP path for the organization + """ + organizationResourcePath: URI + + """ + The HTTP URL for the organization + """ + organizationUrl: URI + + """ + The repository associated with the action + """ + repository: Repository + + """ + The name of the repository + """ + repositoryName: String + + """ + The HTTP path for the repository + """ + repositoryResourcePath: URI + + """ + The HTTP URL for the repository + """ + repositoryUrl: URI + + """ + The team associated with the action + """ + team: Team + + """ + The name of the team + """ + teamName: String + + """ + The HTTP path for this team + """ + teamResourcePath: URI + + """ + The HTTP URL for this team + """ + teamUrl: URI + + """ + The user affected by the action + """ + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """ + The HTTP path for the user. + """ + userResourcePath: URI + + """ + The HTTP URL for the user. + """ + userUrl: URI +} + +""" +The connection type for Repository. +""" +type TeamRepositoryConnection { + """ + A list of edges. + """ + edges: [TeamRepositoryEdge] + + """ + A list of nodes. + """ + nodes: [Repository] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +Represents a team repository. +""" +type TeamRepositoryEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + node: Repository! + + """ + The permission level the team has on the repository + """ + permission: RepositoryPermission! +} + +""" +Ordering options for team repository connections +""" +input TeamRepositoryOrder { + """ + The ordering direction. + """ + direction: OrderDirection! + + """ + The field to order repositories by. + """ + field: TeamRepositoryOrderField! +} + +""" +Properties by which team repository connections can be ordered. +""" +enum TeamRepositoryOrderField { + """ + Order repositories by creation time + """ + CREATED_AT + + """ + Order repositories by name + """ + NAME + + """ + Order repositories by permission + """ + PERMISSION + + """ + Order repositories by push time + """ + PUSHED_AT + + """ + Order repositories by number of stargazers + """ + STARGAZERS + + """ + Order repositories by update time + """ + UPDATED_AT +} + +""" +The possible team review assignment algorithms +""" +enum TeamReviewAssignmentAlgorithm @preview(toggledBy: "stone-crop-preview") { + """ + Balance review load across the entire team + """ + LOAD_BALANCE + + """ + Alternate reviews between each team member + """ + ROUND_ROBIN +} + +""" +The role of a user on a team. +""" +enum TeamRole { + """ + User has admin rights on the team. + """ + ADMIN + + """ + User is a member of the team. + """ + MEMBER +} + +""" +A text match within a search result. +""" +type TextMatch { + """ + The specific text fragment within the property matched on. + """ + fragment: String! + + """ + Highlights within the matched fragment. + """ + highlights: [TextMatchHighlight!]! + + """ + The property matched on. + """ + property: String! +} + +""" +Represents a single highlight in a search result match. +""" +type TextMatchHighlight { + """ + The indice in the fragment where the matched text begins. + """ + beginIndice: Int! + + """ + The indice in the fragment where the matched text ends. + """ + endIndice: Int! + + """ + The text matched. + """ + text: String! +} + +""" +A topic aggregates entities that are related to a subject. +""" +type Topic implements Node & Starrable { + id: ID! + + """ + The topic's name. + """ + name: String! + + """ + A list of related topics, including aliases of this topic, sorted with the most relevant + first. Returns up to 10 Topics. + """ + relatedTopics( + """ + How many topics to return. + """ + first: Int = 3 + ): [Topic!]! + + """ + Returns a count of how many stargazers there are on this object + """ + stargazerCount: Int! + + """ + A list of users who have starred this starrable. + """ + stargazers( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Order for connection + """ + orderBy: StarOrder + ): StargazerConnection! + + """ + Returns a boolean indicating whether the viewing user has starred this starrable. + """ + viewerHasStarred: Boolean! +} + +""" +Metadata for an audit entry with a topic. +""" +interface TopicAuditEntryData { + """ + The name of the topic added to the repository + """ + topic: Topic + + """ + The name of the topic added to the repository + """ + topicName: String +} + +""" +Reason that the suggested topic is declined. +""" +enum TopicSuggestionDeclineReason { + """ + The suggested topic is not relevant to the repository. + """ + NOT_RELEVANT + + """ + The viewer does not like the suggested topic. + """ + PERSONAL_PREFERENCE + + """ + The suggested topic is too general for the repository. + """ + TOO_GENERAL + + """ + The suggested topic is too specific for the repository (e.g. #ruby-on-rails-version-4-2-1). + """ + TOO_SPECIFIC +} + +""" +Autogenerated input type of TransferIssue +""" +input TransferIssueInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The Node ID of the issue to be transferred + """ + issueId: ID! @possibleTypes(concreteTypes: ["Issue"]) + + """ + The Node ID of the repository the issue should be transferred to + """ + repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) +} + +""" +Autogenerated return type of TransferIssue +""" +type TransferIssuePayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The issue that was transferred + """ + issue: Issue +} + +""" +Represents a 'transferred' event on a given issue or pull request. +""" +type TransferredEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + The repository this came from + """ + fromRepository: Repository + id: ID! + + """ + Identifies the issue associated with the event. + """ + issue: Issue! +} + +""" +Represents a Git tree. +""" +type Tree implements GitObject & Node { + """ + An abbreviated version of the Git object ID + """ + abbreviatedOid: String! + + """ + The HTTP path for this Git object + """ + commitResourcePath: URI! + + """ + The HTTP URL for this Git object + """ + commitUrl: URI! + + """ + A list of tree entries. + """ + entries: [TreeEntry!] + id: ID! + + """ + The Git object ID + """ + oid: GitObjectID! + + """ + The Repository the Git object belongs to + """ + repository: Repository! +} + +""" +Represents a Git tree entry. +""" +type TreeEntry { + """ + The extension of the file + """ + extension: String + + """ + Whether or not this tree entry is generated + """ + isGenerated: Boolean! + + """ + Entry file mode. + """ + mode: Int! + + """ + Entry file name. + """ + name: String! + + """ + Entry file object. + """ + object: GitObject + + """ + Entry file Git object ID. + """ + oid: GitObjectID! + + """ + The full path of the file. + """ + path: String + + """ + The Repository the tree entry belongs to + """ + repository: Repository! + + """ + If the TreeEntry is for a directory occupied by a submodule project, this returns the corresponding submodule + """ + submodule: Submodule + + """ + Entry file type. + """ + type: String! +} + +""" +An RFC 3986, RFC 3987, and RFC 6570 (level 4) compliant URI string. +""" +scalar URI + +""" +Autogenerated input type of UnarchiveRepository +""" +input UnarchiveRepositoryInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the repository to unarchive. + """ + repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) +} + +""" +Autogenerated return type of UnarchiveRepository +""" +type UnarchiveRepositoryPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The repository that was unarchived. + """ + repository: Repository +} + +""" +Represents an 'unassigned' event on any assignable object. +""" +type UnassignedEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the assignable associated with the event. + """ + assignable: Assignable! + + """ + Identifies the user or mannequin that was unassigned. + """ + assignee: Assignee + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! + + """ + Identifies the subject (user) who was unassigned. + """ + user: User @deprecated(reason: "Assignees can now be mannequins. Use the `assignee` field instead. Removal on 2020-01-01 UTC.") +} + +""" +Autogenerated input type of UnfollowUser +""" +input UnfollowUserInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + ID of the user to unfollow. + """ + userId: ID! @possibleTypes(concreteTypes: ["User"]) +} + +""" +Autogenerated return type of UnfollowUser +""" +type UnfollowUserPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The user that was unfollowed. + """ + user: User +} + +""" +Represents a type that can be retrieved by a URL. +""" +interface UniformResourceLocatable { + """ + The HTML path to this resource. + """ + resourcePath: URI! + + """ + The URL to this resource. + """ + url: URI! +} + +""" +Represents an unknown signature on a Commit or Tag. +""" +type UnknownSignature implements GitSignature { + """ + Email used to sign this object. + """ + email: String! + + """ + True if the signature is valid and verified by GitHub. + """ + isValid: Boolean! + + """ + Payload for GPG signing object. Raw ODB object without the signature header. + """ + payload: String! + + """ + ASCII-armored signature header from object. + """ + signature: String! + + """ + GitHub user corresponding to the email signing this commit. + """ + signer: User + + """ + The state of this signature. `VALID` if signature is valid and verified by + GitHub, otherwise represents reason why signature is considered invalid. + """ + state: GitSignatureState! + + """ + True if the signature was made with GitHub's signing key. + """ + wasSignedByGitHub: Boolean! +} + +""" +Represents an 'unlabeled' event on a given issue or pull request. +""" +type UnlabeledEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! + + """ + Identifies the label associated with the 'unlabeled' event. + """ + label: Label! + + """ + Identifies the `Labelable` associated with the event. + """ + labelable: Labelable! +} + +""" +Autogenerated input type of UnlinkRepositoryFromProject +""" +input UnlinkRepositoryFromProjectInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the Project linked to the Repository. + """ + projectId: ID! @possibleTypes(concreteTypes: ["Project"]) + + """ + The ID of the Repository linked to the Project. + """ + repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) +} + +""" +Autogenerated return type of UnlinkRepositoryFromProject +""" +type UnlinkRepositoryFromProjectPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The linked Project. + """ + project: Project + + """ + The linked Repository. + """ + repository: Repository +} + +""" +Autogenerated input type of UnlockLockable +""" +input UnlockLockableInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + ID of the item to be unlocked. + """ + lockableId: ID! @possibleTypes(concreteTypes: ["Issue", "PullRequest"], abstractType: "Lockable") +} + +""" +Autogenerated return type of UnlockLockable +""" +type UnlockLockablePayload { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The item that was unlocked. + """ + unlockedRecord: Lockable +} + +""" +Represents an 'unlocked' event on a given issue or pull request. +""" +type UnlockedEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! + + """ + Object that was unlocked. + """ + lockable: Lockable! +} + +""" +Autogenerated input type of UnmarkFileAsViewed +""" +input UnmarkFileAsViewedInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The path of the file to mark as unviewed + """ + path: String! + + """ + The Node ID of the pull request. + """ + pullRequestId: ID! @possibleTypes(concreteTypes: ["PullRequest"]) +} + +""" +Autogenerated return type of UnmarkFileAsViewed +""" +type UnmarkFileAsViewedPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The updated pull request. + """ + pullRequest: PullRequest +} + +""" +Autogenerated input type of UnmarkIssueAsDuplicate +""" +input UnmarkIssueAsDuplicateInput { + """ + ID of the issue or pull request currently considered canonical/authoritative/original. + """ + canonicalId: ID! @possibleTypes(concreteTypes: ["Issue", "PullRequest"], abstractType: "IssueOrPullRequest") + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + ID of the issue or pull request currently marked as a duplicate. + """ + duplicateId: ID! @possibleTypes(concreteTypes: ["Issue", "PullRequest"], abstractType: "IssueOrPullRequest") +} + +""" +Autogenerated return type of UnmarkIssueAsDuplicate +""" +type UnmarkIssueAsDuplicatePayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The issue or pull request that was marked as a duplicate. + """ + duplicate: IssueOrPullRequest +} + +""" +Represents an 'unmarked_as_duplicate' event on a given issue or pull request. +""" +type UnmarkedAsDuplicateEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + The authoritative issue or pull request which has been duplicated by another. + """ + canonical: IssueOrPullRequest + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + The issue or pull request which has been marked as a duplicate of another. + """ + duplicate: IssueOrPullRequest + id: ID! + + """ + Canonical and duplicate belong to different repositories. + """ + isCrossRepository: Boolean! +} + +""" +Autogenerated input type of UnminimizeComment +""" +input UnminimizeCommentInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The Node ID of the subject to modify. + """ + subjectId: ID! @possibleTypes(concreteTypes: ["CommitComment", "GistComment", "IssueComment", "PullRequestReviewComment"], abstractType: "Minimizable") +} + +""" +Autogenerated return type of UnminimizeComment +""" +type UnminimizeCommentPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The comment that was unminimized. + """ + unminimizedComment: Minimizable +} + +""" +Autogenerated input type of UnpinIssue +""" +input UnpinIssueInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the issue to be unpinned + """ + issueId: ID! @possibleTypes(concreteTypes: ["Issue"]) +} + +""" +Autogenerated return type of UnpinIssue +""" +type UnpinIssuePayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The issue that was unpinned + """ + issue: Issue +} + +""" +Represents an 'unpinned' event on a given issue or pull request. +""" +type UnpinnedEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! + + """ + Identifies the issue associated with the event. + """ + issue: Issue! +} + +""" +Autogenerated input type of UnresolveReviewThread +""" +input UnresolveReviewThreadInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the thread to unresolve + """ + threadId: ID! @possibleTypes(concreteTypes: ["PullRequestReviewThread"]) +} + +""" +Autogenerated return type of UnresolveReviewThread +""" +type UnresolveReviewThreadPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The thread to resolve. + """ + thread: PullRequestReviewThread +} + +""" +Represents an 'unsubscribed' event on a given `Subscribable`. +""" +type UnsubscribedEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! + + """ + Object referenced by event. + """ + subscribable: Subscribable! +} + +""" +Entities that can be updated. +""" +interface Updatable { + """ + Check if the current viewer can update this object. + """ + viewerCanUpdate: Boolean! +} + +""" +Comments that can be updated. +""" +interface UpdatableComment { + """ + Reasons why the current viewer can not update this comment. + """ + viewerCannotUpdateReasons: [CommentCannotUpdateReason!]! +} + +""" +Autogenerated input type of UpdateBranchProtectionRule +""" +input UpdateBranchProtectionRuleInput { + """ + Can this branch be deleted. + """ + allowsDeletions: Boolean + + """ + Are force pushes allowed on this branch. + """ + allowsForcePushes: Boolean + + """ + The global relay id of the branch protection rule to be updated. + """ + branchProtectionRuleId: ID! @possibleTypes(concreteTypes: ["BranchProtectionRule"]) + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + Will new commits pushed to matching branches dismiss pull request review approvals. + """ + dismissesStaleReviews: Boolean + + """ + Can admins overwrite branch protection. + """ + isAdminEnforced: Boolean + + """ + The glob-like pattern used to determine matching branches. + """ + pattern: String + + """ + A list of User, Team or App IDs allowed to push to matching branches. + """ + pushActorIds: [ID!] + + """ + Number of approving reviews required to update matching branches. + """ + requiredApprovingReviewCount: Int + + """ + List of required status check contexts that must pass for commits to be accepted to matching branches. + """ + requiredStatusCheckContexts: [String!] + + """ + Are approving reviews required to update matching branches. + """ + requiresApprovingReviews: Boolean + + """ + Are reviews from code owners required to update matching branches. + """ + requiresCodeOwnerReviews: Boolean + + """ + Are commits required to be signed. + """ + requiresCommitSignatures: Boolean + + """ + Are merge commits prohibited from being pushed to this branch. + """ + requiresLinearHistory: Boolean + + """ + Are status checks required to update matching branches. + """ + requiresStatusChecks: Boolean + + """ + Are branches required to be up to date before merging. + """ + requiresStrictStatusChecks: Boolean + + """ + Is pushing to matching branches restricted. + """ + restrictsPushes: Boolean + + """ + Is dismissal of pull request reviews restricted. + """ + restrictsReviewDismissals: Boolean + + """ + A list of User or Team IDs allowed to dismiss reviews on pull requests targeting matching branches. + """ + reviewDismissalActorIds: [ID!] +} + +""" +Autogenerated return type of UpdateBranchProtectionRule +""" +type UpdateBranchProtectionRulePayload { + """ + The newly created BranchProtectionRule. + """ + branchProtectionRule: BranchProtectionRule + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String +} + +""" +Autogenerated input type of UpdateCheckRun +""" +input UpdateCheckRunInput { + """ + Possible further actions the integrator can perform, which a user may trigger. + """ + actions: [CheckRunAction!] + + """ + The node of the check. + """ + checkRunId: ID! @possibleTypes(concreteTypes: ["CheckRun"]) + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The time that the check run finished. + """ + completedAt: DateTime + + """ + The final conclusion of the check. + """ + conclusion: CheckConclusionState + + """ + The URL of the integrator's site that has the full details of the check. + """ + detailsUrl: URI + + """ + A reference for the run on the integrator's system. + """ + externalId: String + + """ + The name of the check. + """ + name: String + + """ + Descriptive details about the run. + """ + output: CheckRunOutput + + """ + The node ID of the repository. + """ + repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) + + """ + The time that the check run began. + """ + startedAt: DateTime + + """ + The current status. + """ + status: RequestableCheckStatusState +} + +""" +Autogenerated return type of UpdateCheckRun +""" +type UpdateCheckRunPayload { + """ + The updated check run. + """ + checkRun: CheckRun + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String +} + +""" +Autogenerated input type of UpdateCheckSuitePreferences +""" +input UpdateCheckSuitePreferencesInput { + """ + The check suite preferences to modify. + """ + autoTriggerPreferences: [CheckSuiteAutoTriggerPreference!]! + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The Node ID of the repository. + """ + repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) +} + +""" +Autogenerated return type of UpdateCheckSuitePreferences +""" +type UpdateCheckSuitePreferencesPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The updated repository. + """ + repository: Repository +} + +""" +Autogenerated input type of UpdateEnterpriseAdministratorRole +""" +input UpdateEnterpriseAdministratorRoleInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the Enterprise which the admin belongs to. + """ + enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) + + """ + The login of a administrator whose role is being changed. + """ + login: String! + + """ + The new role for the Enterprise administrator. + """ + role: EnterpriseAdministratorRole! +} + +""" +Autogenerated return type of UpdateEnterpriseAdministratorRole +""" +type UpdateEnterpriseAdministratorRolePayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + A message confirming the result of changing the administrator's role. + """ + message: String +} + +""" +Autogenerated input type of UpdateEnterpriseAllowPrivateRepositoryForkingSetting +""" +input UpdateEnterpriseAllowPrivateRepositoryForkingSettingInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the enterprise on which to set the allow private repository forking setting. + """ + enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) + + """ + The value for the allow private repository forking setting on the enterprise. + """ + settingValue: EnterpriseEnabledDisabledSettingValue! +} + +""" +Autogenerated return type of UpdateEnterpriseAllowPrivateRepositoryForkingSetting +""" +type UpdateEnterpriseAllowPrivateRepositoryForkingSettingPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The enterprise with the updated allow private repository forking setting. + """ + enterprise: Enterprise + + """ + A message confirming the result of updating the allow private repository forking setting. + """ + message: String +} + +""" +Autogenerated input type of UpdateEnterpriseDefaultRepositoryPermissionSetting +""" +input UpdateEnterpriseDefaultRepositoryPermissionSettingInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the enterprise on which to set the default repository permission setting. + """ + enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) + + """ + The value for the default repository permission setting on the enterprise. + """ + settingValue: EnterpriseDefaultRepositoryPermissionSettingValue! +} + +""" +Autogenerated return type of UpdateEnterpriseDefaultRepositoryPermissionSetting +""" +type UpdateEnterpriseDefaultRepositoryPermissionSettingPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The enterprise with the updated default repository permission setting. + """ + enterprise: Enterprise + + """ + A message confirming the result of updating the default repository permission setting. + """ + message: String +} + +""" +Autogenerated input type of UpdateEnterpriseMembersCanChangeRepositoryVisibilitySetting +""" +input UpdateEnterpriseMembersCanChangeRepositoryVisibilitySettingInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the enterprise on which to set the members can change repository visibility setting. + """ + enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) + + """ + The value for the members can change repository visibility setting on the enterprise. + """ + settingValue: EnterpriseEnabledDisabledSettingValue! +} + +""" +Autogenerated return type of UpdateEnterpriseMembersCanChangeRepositoryVisibilitySetting +""" +type UpdateEnterpriseMembersCanChangeRepositoryVisibilitySettingPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The enterprise with the updated members can change repository visibility setting. + """ + enterprise: Enterprise + + """ + A message confirming the result of updating the members can change repository visibility setting. + """ + message: String +} + +""" +Autogenerated input type of UpdateEnterpriseMembersCanCreateRepositoriesSetting +""" +input UpdateEnterpriseMembersCanCreateRepositoriesSettingInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the enterprise on which to set the members can create repositories setting. + """ + enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) + + """ + Allow members to create internal repositories. Defaults to current value. + """ + membersCanCreateInternalRepositories: Boolean + + """ + Allow members to create private repositories. Defaults to current value. + """ + membersCanCreatePrivateRepositories: Boolean + + """ + Allow members to create public repositories. Defaults to current value. + """ + membersCanCreatePublicRepositories: Boolean + + """ + When false, allow member organizations to set their own repository creation member privileges. + """ + membersCanCreateRepositoriesPolicyEnabled: Boolean + + """ + Value for the members can create repositories setting on the enterprise. This + or the granular public/private/internal allowed fields (but not both) must be provided. + """ + settingValue: EnterpriseMembersCanCreateRepositoriesSettingValue +} + +""" +Autogenerated return type of UpdateEnterpriseMembersCanCreateRepositoriesSetting +""" +type UpdateEnterpriseMembersCanCreateRepositoriesSettingPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The enterprise with the updated members can create repositories setting. + """ + enterprise: Enterprise + + """ + A message confirming the result of updating the members can create repositories setting. + """ + message: String +} + +""" +Autogenerated input type of UpdateEnterpriseMembersCanDeleteIssuesSetting +""" +input UpdateEnterpriseMembersCanDeleteIssuesSettingInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the enterprise on which to set the members can delete issues setting. + """ + enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) + + """ + The value for the members can delete issues setting on the enterprise. + """ + settingValue: EnterpriseEnabledDisabledSettingValue! +} + +""" +Autogenerated return type of UpdateEnterpriseMembersCanDeleteIssuesSetting +""" +type UpdateEnterpriseMembersCanDeleteIssuesSettingPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The enterprise with the updated members can delete issues setting. + """ + enterprise: Enterprise + + """ + A message confirming the result of updating the members can delete issues setting. + """ + message: String +} + +""" +Autogenerated input type of UpdateEnterpriseMembersCanDeleteRepositoriesSetting +""" +input UpdateEnterpriseMembersCanDeleteRepositoriesSettingInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the enterprise on which to set the members can delete repositories setting. + """ + enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) + + """ + The value for the members can delete repositories setting on the enterprise. + """ + settingValue: EnterpriseEnabledDisabledSettingValue! +} + +""" +Autogenerated return type of UpdateEnterpriseMembersCanDeleteRepositoriesSetting +""" +type UpdateEnterpriseMembersCanDeleteRepositoriesSettingPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The enterprise with the updated members can delete repositories setting. + """ + enterprise: Enterprise + + """ + A message confirming the result of updating the members can delete repositories setting. + """ + message: String +} + +""" +Autogenerated input type of UpdateEnterpriseMembersCanInviteCollaboratorsSetting +""" +input UpdateEnterpriseMembersCanInviteCollaboratorsSettingInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the enterprise on which to set the members can invite collaborators setting. + """ + enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) + + """ + The value for the members can invite collaborators setting on the enterprise. + """ + settingValue: EnterpriseEnabledDisabledSettingValue! +} + +""" +Autogenerated return type of UpdateEnterpriseMembersCanInviteCollaboratorsSetting +""" +type UpdateEnterpriseMembersCanInviteCollaboratorsSettingPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The enterprise with the updated members can invite collaborators setting. + """ + enterprise: Enterprise + + """ + A message confirming the result of updating the members can invite collaborators setting. + """ + message: String +} + +""" +Autogenerated input type of UpdateEnterpriseMembersCanMakePurchasesSetting +""" +input UpdateEnterpriseMembersCanMakePurchasesSettingInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the enterprise on which to set the members can make purchases setting. + """ + enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) + + """ + The value for the members can make purchases setting on the enterprise. + """ + settingValue: EnterpriseMembersCanMakePurchasesSettingValue! +} + +""" +Autogenerated return type of UpdateEnterpriseMembersCanMakePurchasesSetting +""" +type UpdateEnterpriseMembersCanMakePurchasesSettingPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The enterprise with the updated members can make purchases setting. + """ + enterprise: Enterprise + + """ + A message confirming the result of updating the members can make purchases setting. + """ + message: String +} + +""" +Autogenerated input type of UpdateEnterpriseMembersCanUpdateProtectedBranchesSetting +""" +input UpdateEnterpriseMembersCanUpdateProtectedBranchesSettingInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the enterprise on which to set the members can update protected branches setting. + """ + enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) + + """ + The value for the members can update protected branches setting on the enterprise. + """ + settingValue: EnterpriseEnabledDisabledSettingValue! +} + +""" +Autogenerated return type of UpdateEnterpriseMembersCanUpdateProtectedBranchesSetting +""" +type UpdateEnterpriseMembersCanUpdateProtectedBranchesSettingPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The enterprise with the updated members can update protected branches setting. + """ + enterprise: Enterprise + + """ + A message confirming the result of updating the members can update protected branches setting. + """ + message: String +} + +""" +Autogenerated input type of UpdateEnterpriseMembersCanViewDependencyInsightsSetting +""" +input UpdateEnterpriseMembersCanViewDependencyInsightsSettingInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the enterprise on which to set the members can view dependency insights setting. + """ + enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) + + """ + The value for the members can view dependency insights setting on the enterprise. + """ + settingValue: EnterpriseEnabledDisabledSettingValue! +} + +""" +Autogenerated return type of UpdateEnterpriseMembersCanViewDependencyInsightsSetting +""" +type UpdateEnterpriseMembersCanViewDependencyInsightsSettingPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The enterprise with the updated members can view dependency insights setting. + """ + enterprise: Enterprise + + """ + A message confirming the result of updating the members can view dependency insights setting. + """ + message: String +} + +""" +Autogenerated input type of UpdateEnterpriseOrganizationProjectsSetting +""" +input UpdateEnterpriseOrganizationProjectsSettingInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the enterprise on which to set the organization projects setting. + """ + enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) + + """ + The value for the organization projects setting on the enterprise. + """ + settingValue: EnterpriseEnabledDisabledSettingValue! +} + +""" +Autogenerated return type of UpdateEnterpriseOrganizationProjectsSetting +""" +type UpdateEnterpriseOrganizationProjectsSettingPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The enterprise with the updated organization projects setting. + """ + enterprise: Enterprise + + """ + A message confirming the result of updating the organization projects setting. + """ + message: String +} + +""" +Autogenerated input type of UpdateEnterpriseProfile +""" +input UpdateEnterpriseProfileInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The description of the enterprise. + """ + description: String + + """ + The Enterprise ID to update. + """ + enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) + + """ + The location of the enterprise. + """ + location: String + + """ + The name of the enterprise. + """ + name: String + + """ + The URL of the enterprise's website. + """ + websiteUrl: String +} + +""" +Autogenerated return type of UpdateEnterpriseProfile +""" +type UpdateEnterpriseProfilePayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The updated enterprise. + """ + enterprise: Enterprise +} + +""" +Autogenerated input type of UpdateEnterpriseRepositoryProjectsSetting +""" +input UpdateEnterpriseRepositoryProjectsSettingInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the enterprise on which to set the repository projects setting. + """ + enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) + + """ + The value for the repository projects setting on the enterprise. + """ + settingValue: EnterpriseEnabledDisabledSettingValue! +} + +""" +Autogenerated return type of UpdateEnterpriseRepositoryProjectsSetting +""" +type UpdateEnterpriseRepositoryProjectsSettingPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The enterprise with the updated repository projects setting. + """ + enterprise: Enterprise + + """ + A message confirming the result of updating the repository projects setting. + """ + message: String +} + +""" +Autogenerated input type of UpdateEnterpriseTeamDiscussionsSetting +""" +input UpdateEnterpriseTeamDiscussionsSettingInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the enterprise on which to set the team discussions setting. + """ + enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) + + """ + The value for the team discussions setting on the enterprise. + """ + settingValue: EnterpriseEnabledDisabledSettingValue! +} + +""" +Autogenerated return type of UpdateEnterpriseTeamDiscussionsSetting +""" +type UpdateEnterpriseTeamDiscussionsSettingPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The enterprise with the updated team discussions setting. + """ + enterprise: Enterprise + + """ + A message confirming the result of updating the team discussions setting. + """ + message: String +} + +""" +Autogenerated input type of UpdateEnterpriseTwoFactorAuthenticationRequiredSetting +""" +input UpdateEnterpriseTwoFactorAuthenticationRequiredSettingInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the enterprise on which to set the two factor authentication required setting. + """ + enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) + + """ + The value for the two factor authentication required setting on the enterprise. + """ + settingValue: EnterpriseEnabledSettingValue! +} + +""" +Autogenerated return type of UpdateEnterpriseTwoFactorAuthenticationRequiredSetting +""" +type UpdateEnterpriseTwoFactorAuthenticationRequiredSettingPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The enterprise with the updated two factor authentication required setting. + """ + enterprise: Enterprise + + """ + A message confirming the result of updating the two factor authentication required setting. + """ + message: String +} + +""" +Autogenerated input type of UpdateIpAllowListEnabledSetting +""" +input UpdateIpAllowListEnabledSettingInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the owner on which to set the IP allow list enabled setting. + """ + ownerId: ID! @possibleTypes(concreteTypes: ["Enterprise", "Organization"], abstractType: "IpAllowListOwner") + + """ + The value for the IP allow list enabled setting. + """ + settingValue: IpAllowListEnabledSettingValue! +} + +""" +Autogenerated return type of UpdateIpAllowListEnabledSetting +""" +type UpdateIpAllowListEnabledSettingPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The IP allow list owner on which the setting was updated. + """ + owner: IpAllowListOwner +} + +""" +Autogenerated input type of UpdateIpAllowListEntry +""" +input UpdateIpAllowListEntryInput { + """ + An IP address or range of addresses in CIDR notation. + """ + allowListValue: String! + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the IP allow list entry to update. + """ + ipAllowListEntryId: ID! @possibleTypes(concreteTypes: ["IpAllowListEntry"]) + + """ + Whether the IP allow list entry is active when an IP allow list is enabled. + """ + isActive: Boolean! + + """ + An optional name for the IP allow list entry. + """ + name: String +} + +""" +Autogenerated return type of UpdateIpAllowListEntry +""" +type UpdateIpAllowListEntryPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The IP allow list entry that was updated. + """ + ipAllowListEntry: IpAllowListEntry +} + +""" +Autogenerated input type of UpdateIssueComment +""" +input UpdateIssueCommentInput { + """ + The updated text of the comment. + """ + body: String! + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the IssueComment to modify. + """ + id: ID! @possibleTypes(concreteTypes: ["IssueComment"]) +} + +""" +Autogenerated return type of UpdateIssueComment +""" +type UpdateIssueCommentPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The updated comment. + """ + issueComment: IssueComment +} + +""" +Autogenerated input type of UpdateIssue +""" +input UpdateIssueInput { + """ + An array of Node IDs of users for this issue. + """ + assigneeIds: [ID!] @possibleTypes(concreteTypes: ["User"]) + + """ + The body for the issue description. + """ + body: String + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the Issue to modify. + """ + id: ID! @possibleTypes(concreteTypes: ["Issue"]) + + """ + An array of Node IDs of labels for this issue. + """ + labelIds: [ID!] @possibleTypes(concreteTypes: ["Label"]) + + """ + The Node ID of the milestone for this issue. + """ + milestoneId: ID @possibleTypes(concreteTypes: ["Milestone"]) + + """ + An array of Node IDs for projects associated with this issue. + """ + projectIds: [ID!] + + """ + The desired issue state. + """ + state: IssueState + + """ + The title for the issue. + """ + title: String +} + +""" +Autogenerated return type of UpdateIssue +""" +type UpdateIssuePayload { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The issue. + """ + issue: Issue +} + +""" +Autogenerated input type of UpdateLabel +""" +input UpdateLabelInput @preview(toggledBy: "bane-preview") { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + A 6 character hex code, without the leading #, identifying the updated color of the label. + """ + color: String + + """ + A brief description of the label, such as its purpose. + """ + description: String + + """ + The Node ID of the label to be updated. + """ + id: ID! @possibleTypes(concreteTypes: ["Label"]) + + """ + The updated name of the label. + """ + name: String +} + +""" +Autogenerated return type of UpdateLabel +""" +type UpdateLabelPayload @preview(toggledBy: "bane-preview") { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The updated label. + """ + label: Label +} + +""" +Autogenerated input type of UpdateNotificationRestrictionSetting +""" +input UpdateNotificationRestrictionSettingInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the owner on which to set the restrict notifications setting. + """ + ownerId: ID! @possibleTypes(concreteTypes: ["Enterprise", "Organization"], abstractType: "VerifiableDomainOwner") + + """ + The value for the restrict notifications setting. + """ + settingValue: NotificationRestrictionSettingValue! +} + +""" +Autogenerated return type of UpdateNotificationRestrictionSetting +""" +type UpdateNotificationRestrictionSettingPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The owner on which the setting was updated. + """ + owner: VerifiableDomainOwner +} + +""" +Autogenerated input type of UpdateProjectCard +""" +input UpdateProjectCardInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + Whether or not the ProjectCard should be archived + """ + isArchived: Boolean + + """ + The note of ProjectCard. + """ + note: String + + """ + The ProjectCard ID to update. + """ + projectCardId: ID! @possibleTypes(concreteTypes: ["ProjectCard"]) +} + +""" +Autogenerated return type of UpdateProjectCard +""" +type UpdateProjectCardPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The updated ProjectCard. + """ + projectCard: ProjectCard +} + +""" +Autogenerated input type of UpdateProjectColumn +""" +input UpdateProjectColumnInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The name of project column. + """ + name: String! + + """ + The ProjectColumn ID to update. + """ + projectColumnId: ID! @possibleTypes(concreteTypes: ["ProjectColumn"]) +} + +""" +Autogenerated return type of UpdateProjectColumn +""" +type UpdateProjectColumnPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The updated project column. + """ + projectColumn: ProjectColumn +} + +""" +Autogenerated input type of UpdateProject +""" +input UpdateProjectInput { + """ + The description of project. + """ + body: String + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The name of project. + """ + name: String + + """ + The Project ID to update. + """ + projectId: ID! @possibleTypes(concreteTypes: ["Project"]) + + """ + Whether the project is public or not. + """ + public: Boolean + + """ + Whether the project is open or closed. + """ + state: ProjectState +} + +""" +Autogenerated return type of UpdateProject +""" +type UpdateProjectPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The updated project. + """ + project: Project +} + +""" +Autogenerated input type of UpdatePullRequest +""" +input UpdatePullRequestInput { + """ + An array of Node IDs of users for this pull request. + """ + assigneeIds: [ID!] @possibleTypes(concreteTypes: ["User"]) + + """ + The name of the branch you want your changes pulled into. This should be an existing branch + on the current repository. + """ + baseRefName: String + + """ + The contents of the pull request. + """ + body: String + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + An array of Node IDs of labels for this pull request. + """ + labelIds: [ID!] @possibleTypes(concreteTypes: ["Label"]) + + """ + Indicates whether maintainers can modify the pull request. + """ + maintainerCanModify: Boolean + + """ + The Node ID of the milestone for this pull request. + """ + milestoneId: ID @possibleTypes(concreteTypes: ["Milestone"]) + + """ + An array of Node IDs for projects associated with this pull request. + """ + projectIds: [ID!] + + """ + The Node ID of the pull request. + """ + pullRequestId: ID! @possibleTypes(concreteTypes: ["PullRequest"]) + + """ + The target state of the pull request. + """ + state: PullRequestUpdateState + + """ + The title of the pull request. + """ + title: String +} + +""" +Autogenerated return type of UpdatePullRequest +""" +type UpdatePullRequestPayload { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The updated pull request. + """ + pullRequest: PullRequest +} + +""" +Autogenerated input type of UpdatePullRequestReviewComment +""" +input UpdatePullRequestReviewCommentInput { + """ + The text of the comment. + """ + body: String! + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The Node ID of the comment to modify. + """ + pullRequestReviewCommentId: ID! @possibleTypes(concreteTypes: ["PullRequestReviewComment"]) +} + +""" +Autogenerated return type of UpdatePullRequestReviewComment +""" +type UpdatePullRequestReviewCommentPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The updated comment. + """ + pullRequestReviewComment: PullRequestReviewComment +} + +""" +Autogenerated input type of UpdatePullRequestReview +""" +input UpdatePullRequestReviewInput { + """ + The contents of the pull request review body. + """ + body: String! + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The Node ID of the pull request review to modify. + """ + pullRequestReviewId: ID! @possibleTypes(concreteTypes: ["PullRequestReview"]) +} + +""" +Autogenerated return type of UpdatePullRequestReview +""" +type UpdatePullRequestReviewPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The updated pull request review. + """ + pullRequestReview: PullRequestReview +} + +""" +Autogenerated input type of UpdateRef +""" +input UpdateRefInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + Permit updates of branch Refs that are not fast-forwards? + """ + force: Boolean = false + + """ + The GitObjectID that the Ref shall be updated to target. + """ + oid: GitObjectID! + + """ + The Node ID of the Ref to be updated. + """ + refId: ID! @possibleTypes(concreteTypes: ["Ref"]) +} + +""" +Autogenerated return type of UpdateRef +""" +type UpdateRefPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The updated Ref. + """ + ref: Ref +} + +""" +Autogenerated input type of UpdateRefs +""" +input UpdateRefsInput @preview(toggledBy: "update-refs-preview") { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + A list of ref updates. + """ + refUpdates: [RefUpdate!]! + + """ + The Node ID of the repository. + """ + repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) +} + +""" +Autogenerated return type of UpdateRefs +""" +type UpdateRefsPayload @preview(toggledBy: "update-refs-preview") { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String +} + +""" +Autogenerated input type of UpdateRepository +""" +input UpdateRepositoryInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + A new description for the repository. Pass an empty string to erase the existing description. + """ + description: String + + """ + Indicates if the repository should have the issues feature enabled. + """ + hasIssuesEnabled: Boolean + + """ + Indicates if the repository should have the project boards feature enabled. + """ + hasProjectsEnabled: Boolean + + """ + Indicates if the repository should have the wiki feature enabled. + """ + hasWikiEnabled: Boolean + + """ + The URL for a web page about this repository. Pass an empty string to erase the existing URL. + """ + homepageUrl: URI + + """ + The new name of the repository. + """ + name: String + + """ + The ID of the repository to update. + """ + repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) + + """ + Whether this repository should be marked as a template such that anyone who + can access it can create new repositories with the same files and directory structure. + """ + template: Boolean +} + +""" +Autogenerated return type of UpdateRepository +""" +type UpdateRepositoryPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The updated repository. + """ + repository: Repository +} + +""" +Autogenerated input type of UpdateSubscription +""" +input UpdateSubscriptionInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The new state of the subscription. + """ + state: SubscriptionState! + + """ + The Node ID of the subscribable object to modify. + """ + subscribableId: ID! @possibleTypes(concreteTypes: ["Commit", "Issue", "PullRequest", "Repository", "Team", "TeamDiscussion"], abstractType: "Subscribable") +} + +""" +Autogenerated return type of UpdateSubscription +""" +type UpdateSubscriptionPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The input subscribable entity. + """ + subscribable: Subscribable +} + +""" +Autogenerated input type of UpdateTeamDiscussionComment +""" +input UpdateTeamDiscussionCommentInput { + """ + The updated text of the comment. + """ + body: String! + + """ + The current version of the body content. + """ + bodyVersion: String + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the comment to modify. + """ + id: ID! @possibleTypes(concreteTypes: ["TeamDiscussionComment"]) +} + +""" +Autogenerated return type of UpdateTeamDiscussionComment +""" +type UpdateTeamDiscussionCommentPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The updated comment. + """ + teamDiscussionComment: TeamDiscussionComment +} + +""" +Autogenerated input type of UpdateTeamDiscussion +""" +input UpdateTeamDiscussionInput { + """ + The updated text of the discussion. + """ + body: String + + """ + The current version of the body content. If provided, this update operation + will be rejected if the given version does not match the latest version on the server. + """ + bodyVersion: String + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The Node ID of the discussion to modify. + """ + id: ID! @possibleTypes(concreteTypes: ["TeamDiscussion"]) + + """ + If provided, sets the pinned state of the updated discussion. + """ + pinned: Boolean + + """ + The updated title of the discussion. + """ + title: String +} + +""" +Autogenerated return type of UpdateTeamDiscussion +""" +type UpdateTeamDiscussionPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The updated discussion. + """ + teamDiscussion: TeamDiscussion +} + +""" +Autogenerated input type of UpdateTeamReviewAssignment +""" +input UpdateTeamReviewAssignmentInput @preview(toggledBy: "stone-crop-preview") { + """ + The algorithm to use for review assignment + """ + algorithm: TeamReviewAssignmentAlgorithm = ROUND_ROBIN + + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + Turn on or off review assignment + """ + enabled: Boolean! + + """ + An array of team member IDs to exclude + """ + excludedTeamMemberIds: [ID!] @possibleTypes(concreteTypes: ["User"]) + + """ + The Node ID of the team to update review assignments of + """ + id: ID! @possibleTypes(concreteTypes: ["Team"]) + + """ + Notify the entire team of the PR if it is delegated + """ + notifyTeam: Boolean = true + + """ + The number of team members to assign + """ + teamMemberCount: Int = 1 +} + +""" +Autogenerated return type of UpdateTeamReviewAssignment +""" +type UpdateTeamReviewAssignmentPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The team that was modified + """ + team: Team +} + +""" +Autogenerated input type of UpdateTopics +""" +input UpdateTopicsInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The Node ID of the repository. + """ + repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) + + """ + An array of topic names. + """ + topicNames: [String!]! +} + +""" +Autogenerated return type of UpdateTopics +""" +type UpdateTopicsPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + Names of the provided topics that are not valid. + """ + invalidTopicNames: [String!] + + """ + The updated repository. + """ + repository: Repository +} + +""" +A user is an individual's account on GitHub that owns repositories and can make new content. +""" +type User implements Actor & Node & PackageOwner & ProfileOwner & ProjectOwner & RepositoryOwner & Sponsorable & UniformResourceLocatable { + """ + Determine if this repository owner has any items that can be pinned to their profile. + """ + anyPinnableItems( + """ + Filter to only a particular kind of pinnable item. + """ + type: PinnableItemType + ): Boolean! + + """ + A URL pointing to the user's public avatar. + """ + avatarUrl( + """ + The size of the resulting square image. + """ + size: Int + ): URI! + + """ + The user's public profile bio. + """ + bio: String + + """ + The user's public profile bio as HTML. + """ + bioHTML: HTML! + + """ + A list of commit comments made by this user. + """ + commitComments( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): CommitCommentConnection! + + """ + The user's public profile company. + """ + company: String + + """ + The user's public profile company as HTML. + """ + companyHTML: HTML! + + """ + The collection of contributions this user has made to different repositories. + """ + contributionsCollection( + """ + Only contributions made at this time or later will be counted. If omitted, defaults to a year ago. + """ + from: DateTime + + """ + The ID of the organization used to filter contributions. + """ + organizationID: ID + + """ + Only contributions made before and up to and including this time will be + counted. If omitted, defaults to the current time. + """ + to: DateTime + ): ContributionsCollection! + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + + """ + The user's publicly visible profile email. + """ + email: String! + + """ + A list of users the given user is followed by. + """ + followers( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): FollowerConnection! + + """ + A list of users the given user is following. + """ + following( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): FollowingConnection! + + """ + Find gist by repo name. + """ + gist( + """ + The gist name to find. + """ + name: String! + ): Gist + + """ + A list of gist comments made by this user. + """ + gistComments( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): GistCommentConnection! + + """ + A list of the Gists the user has created. + """ + gists( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for gists returned from the connection + """ + orderBy: GistOrder + + """ + Filters Gists according to privacy. + """ + privacy: GistPrivacy + ): GistConnection! + + """ + True if this user/organization has a GitHub Sponsors listing. + """ + hasSponsorsListing: Boolean! + + """ + The hovercard information for this user in a given context + """ + hovercard( + """ + The ID of the subject to get the hovercard in the context of + """ + primarySubjectId: ID + ): Hovercard! + id: ID! + + """ + The interaction ability settings for this user. + """ + interactionAbility: RepositoryInteractionAbility + + """ + Whether or not this user is a participant in the GitHub Security Bug Bounty. + """ + isBountyHunter: Boolean! + + """ + Whether or not this user is a participant in the GitHub Campus Experts Program. + """ + isCampusExpert: Boolean! + + """ + Whether or not this user is a GitHub Developer Program member. + """ + isDeveloperProgramMember: Boolean! + + """ + Whether or not this user is a GitHub employee. + """ + isEmployee: Boolean! + + """ + Whether or not this user is a member of the GitHub Stars Program. + """ + isGitHubStar: Boolean! + + """ + Whether or not the user has marked themselves as for hire. + """ + isHireable: Boolean! + + """ + Whether or not this user is a site administrator. + """ + isSiteAdmin: Boolean! + + """ + Check if the given account is sponsoring this user/organization. + """ + isSponsoredBy( + """ + The target account's login. + """ + accountLogin: String! + ): Boolean! + + """ + True if the viewer is sponsored by this user/organization. + """ + isSponsoringViewer: Boolean! + + """ + Whether or not this user is the viewing user. + """ + isViewer: Boolean! + + """ + A list of issue comments made by this user. + """ + issueComments( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for issue comments returned from the connection. + """ + orderBy: IssueCommentOrder + ): IssueCommentConnection! + + """ + A list of issues associated with this user. + """ + issues( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Filtering options for issues returned from the connection. + """ + filterBy: IssueFilters + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + A list of label names to filter the pull requests by. + """ + labels: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for issues returned from the connection. + """ + orderBy: IssueOrder + + """ + A list of states to filter the issues by. + """ + states: [IssueState!] + ): IssueConnection! + + """ + Showcases a selection of repositories and gists that the profile owner has + either curated or that have been selected automatically based on popularity. + """ + itemShowcase: ProfileItemShowcase! + + """ + The user's public profile location. + """ + location: String + + """ + The username used to login. + """ + login: String! + + """ + The user's public profile name. + """ + name: String + + """ + Find an organization by its login that the user belongs to. + """ + organization( + """ + The login of the organization to find. + """ + login: String! + ): Organization + + """ + Verified email addresses that match verified domains for a specified organization the user is a member of. + """ + organizationVerifiedDomainEmails( + """ + The login of the organization to match verified domains from. + """ + login: String! + ): [String!]! + + """ + A list of organizations the user belongs to. + """ + organizations( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): OrganizationConnection! + + """ + A list of packages under the owner. + """ + packages( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Find packages by their names. + """ + names: [String] + + """ + Ordering of the returned packages. + """ + orderBy: PackageOrder = {field: CREATED_AT, direction: DESC} + + """ + Filter registry package by type. + """ + packageType: PackageType + + """ + Find packages in a repository by ID. + """ + repositoryId: ID + ): PackageConnection! + + """ + A list of repositories and gists this profile owner can pin to their profile. + """ + pinnableItems( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Filter the types of pinnable items that are returned. + """ + types: [PinnableItemType!] + ): PinnableItemConnection! + + """ + A list of repositories and gists this profile owner has pinned to their profile + """ + pinnedItems( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Filter the types of pinned items that are returned. + """ + types: [PinnableItemType!] + ): PinnableItemConnection! + + """ + Returns how many more items this profile owner can pin to their profile. + """ + pinnedItemsRemaining: Int! + + """ + Find project by number. + """ + project( + """ + The project number to find. + """ + number: Int! + ): Project + + """ + A list of projects under the owner. + """ + projects( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for projects returned from the connection + """ + orderBy: ProjectOrder + + """ + Query to search projects by, currently only searching by name. + """ + search: String + + """ + A list of states to filter the projects by. + """ + states: [ProjectState!] + ): ProjectConnection! + + """ + The HTTP path listing user's projects + """ + projectsResourcePath: URI! + + """ + The HTTP URL listing user's projects + """ + projectsUrl: URI! + + """ + A list of public keys associated with this user. + """ + publicKeys( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): PublicKeyConnection! + + """ + A list of pull requests associated with this user. + """ + pullRequests( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + The base ref name to filter the pull requests by. + """ + baseRefName: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + The head ref name to filter the pull requests by. + """ + headRefName: String + + """ + A list of label names to filter the pull requests by. + """ + labels: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for pull requests returned from the connection. + """ + orderBy: IssueOrder + + """ + A list of states to filter the pull requests by. + """ + states: [PullRequestState!] + ): PullRequestConnection! + + """ + A list of repositories that the user owns. + """ + repositories( + """ + Array of viewer's affiliation options for repositories returned from the + connection. For example, OWNER will include only repositories that the + current viewer owns. + """ + affiliations: [RepositoryAffiliation] + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + If non-null, filters repositories according to whether they are forks of another repository + """ + isFork: Boolean + + """ + If non-null, filters repositories according to whether they have been locked + """ + isLocked: Boolean + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for repositories returned from the connection + """ + orderBy: RepositoryOrder + + """ + Array of owner's affiliation options for repositories returned from the + connection. For example, OWNER will include only repositories that the + organization or user being viewed owns. + """ + ownerAffiliations: [RepositoryAffiliation] = [OWNER, COLLABORATOR] + + """ + If non-null, filters repositories according to privacy + """ + privacy: RepositoryPrivacy + ): RepositoryConnection! + + """ + A list of repositories that the user recently contributed to. + """ + repositoriesContributedTo( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + If non-null, include only the specified types of contributions. The + GitHub.com UI uses [COMMIT, ISSUE, PULL_REQUEST, REPOSITORY] + """ + contributionTypes: [RepositoryContributionType] + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + If true, include user repositories + """ + includeUserRepositories: Boolean + + """ + If non-null, filters repositories according to whether they have been locked + """ + isLocked: Boolean + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for repositories returned from the connection + """ + orderBy: RepositoryOrder + + """ + If non-null, filters repositories according to privacy + """ + privacy: RepositoryPrivacy + ): RepositoryConnection! + + """ + Find Repository. + """ + repository( + """ + Name of Repository to find. + """ + name: String! + ): Repository + + """ + The HTTP path for this user + """ + resourcePath: URI! + + """ + Replies this user has saved + """ + savedReplies( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + The field to order saved replies by. + """ + orderBy: SavedReplyOrder = {field: UPDATED_AT, direction: DESC} + ): SavedReplyConnection + + """ + The GitHub Sponsors listing for this user or organization. + """ + sponsorsListing: SponsorsListing + + """ + The viewer's sponsorship of this entity. + """ + sponsorshipForViewerAsSponsor: Sponsorship + + """ + This object's sponsorships as the maintainer. + """ + sponsorshipsAsMaintainer( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Whether or not to include private sponsorships in the result set + """ + includePrivate: Boolean = false + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for sponsorships returned from this connection. If left + blank, the sponsorships will be ordered based on relevancy to the viewer. + """ + orderBy: SponsorshipOrder + ): SponsorshipConnection! + + """ + This object's sponsorships as the sponsor. + """ + sponsorshipsAsSponsor( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for sponsorships returned from this connection. If left + blank, the sponsorships will be ordered based on relevancy to the viewer. + """ + orderBy: SponsorshipOrder + ): SponsorshipConnection! + + """ + Repositories the user has starred. + """ + starredRepositories( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Order for connection + """ + orderBy: StarOrder + + """ + Filters starred repositories to only return repositories owned by the viewer. + """ + ownedByViewer: Boolean + ): StarredRepositoryConnection! + + """ + The user's description of what they're currently doing. + """ + status: UserStatus + + """ + Repositories the user has contributed to, ordered by contribution rank, plus repositories the user has created + """ + topRepositories( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for repositories returned from the connection + """ + orderBy: RepositoryOrder! + + """ + How far back in time to fetch contributed repositories + """ + since: DateTime + ): RepositoryConnection! + + """ + The user's Twitter username. + """ + twitterUsername: String + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! + + """ + The HTTP URL for this user + """ + url: URI! + + """ + Can the viewer pin repositories and gists to the profile? + """ + viewerCanChangePinnedItems: Boolean! + + """ + Can the current viewer create new projects on this owner. + """ + viewerCanCreateProjects: Boolean! + + """ + Whether or not the viewer is able to follow the user. + """ + viewerCanFollow: Boolean! + + """ + Whether or not the viewer is able to sponsor this user/organization. + """ + viewerCanSponsor: Boolean! + + """ + Whether or not this user is followed by the viewer. + """ + viewerIsFollowing: Boolean! + + """ + True if the viewer is sponsoring this user/organization. + """ + viewerIsSponsoring: Boolean! + + """ + A list of repositories the given user is watching. + """ + watching( + """ + Affiliation options for repositories returned from the connection. If none + specified, the results will include repositories for which the current + viewer is an owner or collaborator, or member. + """ + affiliations: [RepositoryAffiliation] + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + If non-null, filters repositories according to whether they have been locked + """ + isLocked: Boolean + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for repositories returned from the connection + """ + orderBy: RepositoryOrder + + """ + Array of owner's affiliation options for repositories returned from the + connection. For example, OWNER will include only repositories that the + organization or user being viewed owns. + """ + ownerAffiliations: [RepositoryAffiliation] = [OWNER, COLLABORATOR] + + """ + If non-null, filters repositories according to privacy + """ + privacy: RepositoryPrivacy + ): RepositoryConnection! + + """ + A URL pointing to the user's public website/blog. + """ + websiteUrl: URI +} + +""" +The possible durations that a user can be blocked for. +""" +enum UserBlockDuration { + """ + The user was blocked for 1 day + """ + ONE_DAY + + """ + The user was blocked for 30 days + """ + ONE_MONTH + + """ + The user was blocked for 7 days + """ + ONE_WEEK + + """ + The user was blocked permanently + """ + PERMANENT + + """ + The user was blocked for 3 days + """ + THREE_DAYS +} + +""" +Represents a 'user_blocked' event on a given user. +""" +type UserBlockedEvent implements Node { + """ + Identifies the actor who performed the event. + """ + actor: Actor + + """ + Number of days that the user was blocked for. + """ + blockDuration: UserBlockDuration! + + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + id: ID! + + """ + The user who was blocked. + """ + subject: User +} + +""" +The connection type for User. +""" +type UserConnection { + """ + A list of edges. + """ + edges: [UserEdge] + + """ + A list of nodes. + """ + nodes: [User] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edit on user content +""" +type UserContentEdit implements Node { + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Identifies the date and time when the object was deleted. + """ + deletedAt: DateTime + + """ + The actor who deleted this content + """ + deletedBy: Actor + + """ + A summary of the changes for this edit + """ + diff: String + + """ + When this content was edited + """ + editedAt: DateTime! + + """ + The actor who edited this content + """ + editor: Actor + id: ID! + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! +} + +""" +A list of edits to content. +""" +type UserContentEditConnection { + """ + A list of edges. + """ + edges: [UserContentEditEdge] + + """ + A list of nodes. + """ + nodes: [UserContentEdit] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type UserContentEditEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: UserContentEdit +} + +""" +Represents a user. +""" +type UserEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: User +} + +""" +Email attributes from External Identity +""" +type UserEmailMetadata { + """ + Boolean to identify primary emails + """ + primary: Boolean + + """ + Type of email + """ + type: String + + """ + Email id + """ + value: String! +} + +""" +The user's description of what they're currently doing. +""" +type UserStatus implements Node { + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + An emoji summarizing the user's status. + """ + emoji: String + + """ + The status emoji as HTML. + """ + emojiHTML: HTML + + """ + If set, the status will not be shown after this date. + """ + expiresAt: DateTime + + """ + ID of the object. + """ + id: ID! + + """ + Whether this status indicates the user is not fully available on GitHub. + """ + indicatesLimitedAvailability: Boolean! + + """ + A brief message describing what the user is doing. + """ + message: String + + """ + The organization whose members can see this status. If null, this status is publicly visible. + """ + organization: Organization + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! + + """ + The user who has this status. + """ + user: User! +} + +""" +The connection type for UserStatus. +""" +type UserStatusConnection { + """ + A list of edges. + """ + edges: [UserStatusEdge] + + """ + A list of nodes. + """ + nodes: [UserStatus] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type UserStatusEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: UserStatus +} + +""" +Ordering options for user status connections. +""" +input UserStatusOrder { + """ + The ordering direction. + """ + direction: OrderDirection! + + """ + The field to order user statuses by. + """ + field: UserStatusOrderField! +} + +""" +Properties by which user status connections can be ordered. +""" +enum UserStatusOrderField { + """ + Order user statuses by when they were updated. + """ + UPDATED_AT +} + +""" +A domain that can be verified for an organization or an enterprise. +""" +type VerifiableDomain implements Node { + """ + Identifies the date and time when the object was created. + """ + createdAt: DateTime! + + """ + Identifies the primary key from the database. + """ + databaseId: Int + + """ + The DNS host name that should be used for verification. + """ + dnsHostName: URI + + """ + The unicode encoded domain. + """ + domain: URI! + + """ + Whether a TXT record for verification with the expected host name was found. + """ + hasFoundHostName: Boolean! + + """ + Whether a TXT record for verification with the expected verification token was found. + """ + hasFoundVerificationToken: Boolean! + id: ID! + + """ + Whether this domain is required to exist for an organization or enterprise policy to be enforced. + """ + isRequiredForPolicyEnforcement: Boolean! + + """ + Whether or not the domain is verified. + """ + isVerified: Boolean! + + """ + The owner of the domain. + """ + owner: VerifiableDomainOwner! + + """ + The punycode encoded domain. + """ + punycodeEncodedDomain: URI! + + """ + The time that the current verification token will expire. + """ + tokenExpirationTime: DateTime + + """ + Identifies the date and time when the object was last updated. + """ + updatedAt: DateTime! + + """ + The current verification token for the domain. + """ + verificationToken: String +} + +""" +The connection type for VerifiableDomain. +""" +type VerifiableDomainConnection { + """ + A list of edges. + """ + edges: [VerifiableDomainEdge] + + """ + A list of nodes. + """ + nodes: [VerifiableDomain] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type VerifiableDomainEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: VerifiableDomain +} + +""" +Ordering options for verifiable domain connections. +""" +input VerifiableDomainOrder { + """ + The ordering direction. + """ + direction: OrderDirection! + + """ + The field to order verifiable domains by. + """ + field: VerifiableDomainOrderField! +} + +""" +Properties by which verifiable domain connections can be ordered. +""" +enum VerifiableDomainOrderField { + """ + Order verifiable domains by their creation date. + """ + CREATED_AT + + """ + Order verifiable domains by the domain name. + """ + DOMAIN +} + +""" +Types that can own a verifiable domain. +""" +union VerifiableDomainOwner = Enterprise | Organization + +""" +Autogenerated input type of VerifyVerifiableDomain +""" +input VerifyVerifiableDomainInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The ID of the verifiable domain to verify. + """ + id: ID! @possibleTypes(concreteTypes: ["VerifiableDomain"]) +} + +""" +Autogenerated return type of VerifyVerifiableDomain +""" +type VerifyVerifiableDomainPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The verifiable domain that was verified. + """ + domain: VerifiableDomain +} + +""" +A hovercard context with a message describing how the viewer is related. +""" +type ViewerHovercardContext implements HovercardContext { + """ + A string describing this context + """ + message: String! + + """ + An octicon to accompany this context + """ + octicon: String! + + """ + Identifies the user who is related to this context. + """ + viewer: User! +} + +""" +A valid x509 certificate string +""" +scalar X509Certificate + +""" +The root query for implementing GraphQL subscriptions. +""" +type Subscription { + count: Int! +} \ No newline at end of file From 55f09a8fcca3c8c6ab9d4641c9c49c93b8001c10 Mon Sep 17 00:00:00 2001 From: matthieu4294967296moineau Date: Mon, 4 Sep 2023 11:32:44 +0200 Subject: [PATCH 09/35] rename --- .golangci.yml | 4 ++-- {exampleWebSocket => exampleSubscription}/README.md | 0 {exampleWebSocket => exampleSubscription}/generated.go | 0 {exampleWebSocket => exampleSubscription}/genqlient.graphql | 0 {exampleWebSocket => exampleSubscription}/genqlient.yaml | 0 {exampleWebSocket => exampleSubscription}/main.go | 0 {exampleWebSocket => exampleSubscription}/schema.graphql | 0 7 files changed, 2 insertions(+), 2 deletions(-) rename {exampleWebSocket => exampleSubscription}/README.md (100%) rename {exampleWebSocket => exampleSubscription}/generated.go (100%) rename {exampleWebSocket => exampleSubscription}/genqlient.graphql (100%) rename {exampleWebSocket => exampleSubscription}/genqlient.yaml (100%) rename {exampleWebSocket => exampleSubscription}/main.go (100%) rename {exampleWebSocket => exampleSubscription}/schema.graphql (100%) diff --git a/.golangci.yml b/.golangci.yml index 8b660f1a..3c294267 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -92,7 +92,7 @@ issues: # Ok to use fmt.Print in the examples, and in the CLI entrypoint. - linters: - forbidigo - path: ^example/|^exampleWebSocket/|^generate/main\.go$ + path: ^example/|^exampleSubscription/|^generate/main\.go$ - linters: - errcheck @@ -109,5 +109,5 @@ issues: - linters: - govet # Only a big deal for runtime code. - path: ^generate/|^example/|^exampleWebSocket/ + path: ^generate/|^example/|^exampleSubscription/ text: "^fieldalignment: struct with \\d+ pointer bytes could be \\d+$" diff --git a/exampleWebSocket/README.md b/exampleSubscription/README.md similarity index 100% rename from exampleWebSocket/README.md rename to exampleSubscription/README.md diff --git a/exampleWebSocket/generated.go b/exampleSubscription/generated.go similarity index 100% rename from exampleWebSocket/generated.go rename to exampleSubscription/generated.go diff --git a/exampleWebSocket/genqlient.graphql b/exampleSubscription/genqlient.graphql similarity index 100% rename from exampleWebSocket/genqlient.graphql rename to exampleSubscription/genqlient.graphql diff --git a/exampleWebSocket/genqlient.yaml b/exampleSubscription/genqlient.yaml similarity index 100% rename from exampleWebSocket/genqlient.yaml rename to exampleSubscription/genqlient.yaml diff --git a/exampleWebSocket/main.go b/exampleSubscription/main.go similarity index 100% rename from exampleWebSocket/main.go rename to exampleSubscription/main.go diff --git a/exampleWebSocket/schema.graphql b/exampleSubscription/schema.graphql similarity index 100% rename from exampleWebSocket/schema.graphql rename to exampleSubscription/schema.graphql From 80914849fc64439a41cbbf97e8450db327fc8333 Mon Sep 17 00:00:00 2001 From: matthieu4294967296moineau Date: Mon, 4 Sep 2023 13:55:42 +0200 Subject: [PATCH 10/35] defer close --- exampleSubscription/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exampleSubscription/main.go b/exampleSubscription/main.go index 7b035098..4ec516dd 100644 --- a/exampleSubscription/main.go +++ b/exampleSubscription/main.go @@ -49,6 +49,7 @@ func main() { if err != nil { return } + defer graphqlClient.CloseWebSocket() for loop := true; loop; { select { case msg, more := <-respChan: @@ -69,7 +70,6 @@ func main() { loop = false } } - graphqlClient.CloseWebSocket() } //go:generate go run github.com/Khan/genqlient genqlient.yaml From 34c3cd5bdb38a3fb74ad9a9954b1e61bbf1a9ebf Mon Sep 17 00:00:00 2001 From: matthieu4294967296moineau Date: Tue, 12 Sep 2023 11:55:31 +0200 Subject: [PATCH 11/35] change doc generation for operations using {{.Type}} --- example/generated.go | 4 ++-- exampleSubscription/generated.go | 2 +- generate/operation.go.tmpl | 2 +- internal/integration/generated.go | 32 +++++++++++++++---------------- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/example/generated.go b/example/generated.go index fc2b3e3e..7866a746 100644 --- a/example/generated.go +++ b/example/generated.go @@ -69,7 +69,7 @@ func (v *getViewerViewerUser) GetMyName() string { return v.MyName } // GetCreatedAt returns getViewerViewerUser.CreatedAt, and is useful for accessing the field via an interface. func (v *getViewerViewerUser) GetCreatedAt() time.Time { return v.CreatedAt } -// The query, mutation or subscription executed by getUser. +// The query executed by getUser. const getUser_Operation = ` query getUser ($Login: String!) { user(login: $Login) { @@ -106,7 +106,7 @@ func getUser( return data_, err_ } -// The query, mutation or subscription executed by getViewer. +// The query executed by getViewer. const getViewer_Operation = ` query getViewer { viewer { diff --git a/exampleSubscription/generated.go b/exampleSubscription/generated.go index 6297ed5a..42ec984f 100644 --- a/exampleSubscription/generated.go +++ b/exampleSubscription/generated.go @@ -17,7 +17,7 @@ type countResponse struct { // GetCount returns countResponse.Count, and is useful for accessing the field via an interface. func (v *countResponse) GetCount() int { return v.Count } -// The query, mutation or subscription executed by count. +// The subscription executed by count. const count_Operation = ` subscription count { count diff --git a/generate/operation.go.tmpl b/generate/operation.go.tmpl index 54af5a11..9f85cdf7 100644 --- a/generate/operation.go.tmpl +++ b/generate/operation.go.tmpl @@ -1,4 +1,4 @@ -// The query, mutation or subscription executed by {{.Name}}. +// The {{.Type}} executed by {{.Name}}. const {{.Name}}_Operation = `{{$.Body}}` {{.Doc}} diff --git a/internal/integration/generated.go b/internal/integration/generated.go index a55833f0..64f68bf1 100644 --- a/internal/integration/generated.go +++ b/internal/integration/generated.go @@ -3086,7 +3086,7 @@ type simpleQueryResponse struct { // GetMe returns simpleQueryResponse.Me, and is useful for accessing the field via an interface. func (v *simpleQueryResponse) GetMe() simpleQueryMeUser { return v.Me } -// The query, mutation or subscription executed by count. +// The subscription executed by count. const count_Operation = ` subscription count { count @@ -3151,7 +3151,7 @@ func countForwardData(dataChan_ chan countWsResponse, respChan_ chan json.RawMes } } -// The query, mutation or subscription executed by createUser. +// The mutation executed by createUser. const createUser_Operation = ` mutation createUser ($user: NewUser!) { createUser(input: $user) { @@ -3187,7 +3187,7 @@ func createUser( return data_, resp_.Extensions, err_ } -// The query, mutation or subscription executed by failingQuery. +// The query executed by failingQuery. const failingQuery_Operation = ` query failingQuery { fail @@ -3219,7 +3219,7 @@ func failingQuery( return data_, resp_.Extensions, err_ } -// The query, mutation or subscription executed by queryWithCustomMarshal. +// The query executed by queryWithCustomMarshal. const queryWithCustomMarshal_Operation = ` query queryWithCustomMarshal ($date: Date!) { usersBornOn(date: $date) { @@ -3256,7 +3256,7 @@ func queryWithCustomMarshal( return data_, resp_.Extensions, err_ } -// The query, mutation or subscription executed by queryWithCustomMarshalOptional. +// The query executed by queryWithCustomMarshalOptional. const queryWithCustomMarshalOptional_Operation = ` query queryWithCustomMarshalOptional ($date: Date, $id: ID) { userSearch(birthdate: $date, id: $id) { @@ -3295,7 +3295,7 @@ func queryWithCustomMarshalOptional( return data_, resp_.Extensions, err_ } -// The query, mutation or subscription executed by queryWithCustomMarshalSlice. +// The query executed by queryWithCustomMarshalSlice. const queryWithCustomMarshalSlice_Operation = ` query queryWithCustomMarshalSlice ($dates: [Date!]!) { usersBornOnDates(dates: $dates) { @@ -3332,7 +3332,7 @@ func queryWithCustomMarshalSlice( return data_, resp_.Extensions, err_ } -// The query, mutation or subscription executed by queryWithFlatten. +// The query executed by queryWithFlatten. const queryWithFlatten_Operation = ` query queryWithFlatten ($ids: [ID!]!) { ... QueryFragment @@ -3403,7 +3403,7 @@ func queryWithFlatten( return data_, resp_.Extensions, err_ } -// The query, mutation or subscription executed by queryWithFragments. +// The query executed by queryWithFragments. const queryWithFragments_Operation = ` query queryWithFragments ($ids: [ID!]!) { beings(ids: $ids) { @@ -3468,7 +3468,7 @@ func queryWithFragments( return data_, resp_.Extensions, err_ } -// The query, mutation or subscription executed by queryWithInterfaceListField. +// The query executed by queryWithInterfaceListField. const queryWithInterfaceListField_Operation = ` query queryWithInterfaceListField ($ids: [ID!]!) { beings(ids: $ids) { @@ -3505,7 +3505,7 @@ func queryWithInterfaceListField( return data_, resp_.Extensions, err_ } -// The query, mutation or subscription executed by queryWithInterfaceListPointerField. +// The query executed by queryWithInterfaceListPointerField. const queryWithInterfaceListPointerField_Operation = ` query queryWithInterfaceListPointerField ($ids: [ID!]!) { beings(ids: $ids) { @@ -3542,7 +3542,7 @@ func queryWithInterfaceListPointerField( return data_, resp_.Extensions, err_ } -// The query, mutation or subscription executed by queryWithInterfaceNoFragments. +// The query executed by queryWithInterfaceNoFragments. const queryWithInterfaceNoFragments_Operation = ` query queryWithInterfaceNoFragments ($id: ID!) { being(id: $id) { @@ -3583,7 +3583,7 @@ func queryWithInterfaceNoFragments( return data_, resp_.Extensions, err_ } -// The query, mutation or subscription executed by queryWithNamedFragments. +// The query executed by queryWithNamedFragments. const queryWithNamedFragments_Operation = ` query queryWithNamedFragments ($ids: [ID!]!) { beings(ids: $ids) { @@ -3648,7 +3648,7 @@ func queryWithNamedFragments( return data_, resp_.Extensions, err_ } -// The query, mutation or subscription executed by queryWithOmitempty. +// The query executed by queryWithOmitempty. const queryWithOmitempty_Operation = ` query queryWithOmitempty ($id: ID) { user(id: $id) { @@ -3685,7 +3685,7 @@ func queryWithOmitempty( return data_, resp_.Extensions, err_ } -// The query, mutation or subscription executed by queryWithVariables. +// The query executed by queryWithVariables. const queryWithVariables_Operation = ` query queryWithVariables ($id: ID!) { user(id: $id) { @@ -3722,7 +3722,7 @@ func queryWithVariables( return data_, resp_.Extensions, err_ } -// The query, mutation or subscription executed by simpleQuery. +// The query executed by simpleQuery. const simpleQuery_Operation = ` query simpleQuery { me { @@ -3755,7 +3755,7 @@ func simpleQuery( return data_, resp_.Extensions, err_ } -// The query, mutation or subscription executed by simpleQueryExt. +// The query executed by simpleQueryExt. const simpleQueryExt_Operation = ` query simpleQueryExt { me { From 2196d655ebfe527d2289a87997de650750bbb209 Mon Sep 17 00:00:00 2001 From: matthieu4294967296moineau Date: Tue, 12 Sep 2023 14:39:25 +0200 Subject: [PATCH 12/35] generate doc for subscriptions in go --- exampleSubscription/generated.go | 2 -- generate/generate.go | 3 +++ generate/operation.go.tmpl | 7 ------- internal/integration/generated.go | 2 -- 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/exampleSubscription/generated.go b/exampleSubscription/generated.go index 42ec984f..83cf5e89 100644 --- a/exampleSubscription/generated.go +++ b/exampleSubscription/generated.go @@ -24,8 +24,6 @@ subscription count { } ` -// count -// // To close the connection, use [graphql.Client.CloseWebSocket()] func count( ctx_ context.Context, diff --git a/generate/generate.go b/generate/generate.go index 1b416a27..429ede16 100644 --- a/generate/generate.go +++ b/generate/generate.go @@ -281,6 +281,9 @@ func (g *generator) addOperation(op *ast.OperationDefinition) error { if len(commentLines) > 0 { docComment = "// " + strings.ReplaceAll(commentLines, "\n", "\n// ") } + if op.Operation == ast.Subscription { + docComment += "\n// To close the connection, use [graphql.Client.CloseWebSocket()]" + } // If the filename is a pseudo-filename filename.go:startline, just // put the filename in the export; we don't figure out the line offset diff --git a/generate/operation.go.tmpl b/generate/operation.go.tmpl index 9f85cdf7..8d947d58 100644 --- a/generate/operation.go.tmpl +++ b/generate/operation.go.tmpl @@ -2,13 +2,6 @@ const {{.Name}}_Operation = `{{$.Body}}` {{.Doc}} -{{if eq .Type "subscription"}} -{{if eq .Doc ""}} -// {{.Name}} -{{end -}} -// -// To close the connection, use [graphql.Client.CloseWebSocket()] -{{end -}} func {{.Name}}( {{if ne .Config.ContextType "-" -}} ctx_ {{ref .Config.ContextType}}, diff --git a/internal/integration/generated.go b/internal/integration/generated.go index 64f68bf1..177ae054 100644 --- a/internal/integration/generated.go +++ b/internal/integration/generated.go @@ -3093,8 +3093,6 @@ subscription count { } ` -// count -// // To close the connection, use [graphql.Client.CloseWebSocket()] func count( ctx_ context.Context, From b1468fd320f25caac94583870ed9eeb0800ab4d1 Mon Sep 17 00:00:00 2001 From: matthieu4294967296moineau Date: Tue, 12 Sep 2023 15:07:57 +0200 Subject: [PATCH 13/35] renamed var to err_; regenerated all tests --- example/generated.go | 6 +-- exampleSubscription/generated.go | 3 +- generate/operation.go.tmpl | 3 +- ....graphql-ComplexInlineFragments.graphql.go | 5 +- ...s.graphql-ComplexNamedFragments.graphql.go | 5 +- ...ovariantInterfaceImplementation.graphql.go | 5 +- ...omMarshal.graphql-CustomMarshal.graphql.go | 5 +- ...lice.graphql-CustomMarshalSlice.graphql.go | 5 +- ...erate-DateTime.graphql-DateTime.graphql.go | 5 +- ...nterface.graphql-EmptyInterface.graphql.go | 5 +- ...enerate-Flatten.graphql-Flatten.graphql.go | 5 +- ...tGenerate-Hasura.graphql-Hasura.graphql.go | 5 +- ...ate-InputEnum.graphql-InputEnum.graphql.go | 5 +- ...InputObject.graphql-InputObject.graphql.go | 5 +- ...ield.graphql-InterfaceListField.graphql.go | 5 +- ...nterfaceListOfListsOfListsField.graphql.go | 5 +- ...esting.graphql-InterfaceNesting.graphql.go | 5 +- ...ts.graphql-InterfaceNoFragments.graphql.go | 5 +- ...ate-ListInput.graphql-ListInput.graphql.go | 5 +- ...ists.graphql-ListOfListsOfLists.graphql.go | 5 +- ...ives.graphql-MultipleDirectives.graphql.go | 5 +- ...-MutationArgsWithCollidingNames.graphql.go | 5 +- ...ate-Omitempty.graphql-Omitempty.graphql.go | 5 +- ...erate-Pointers.graphql-Pointers.graphql.go | 5 +- ...rsInline.graphql-PointersInline.graphql.go | 5 +- ...enerate-Pokemon.graphql-Pokemon.graphql.go | 5 +- ...ithAlias.graphql-QueryWithAlias.graphql.go | 5 +- ...as.graphql-QueryWithDoubleAlias.graphql.go | 5 +- ...ithEnums.graphql-QueryWithEnums.graphql.go | 5 +- ...hSlices.graphql-QueryWithSlices.graphql.go | 5 +- ...tructs.graphql-QueryWithStructs.graphql.go | 5 +- ...ate-Recursion.graphql-Recursion.graphql.go | 5 +- ...nt.graphql-SimpleInlineFragment.graphql.go | 5 +- ...SimpleInput.graphql-SimpleInput.graphql.go | 5 +- ...Mutation.graphql-SimpleMutation.graphql.go | 5 +- ...ent.graphql-SimpleNamedFragment.graphql.go | 5 +- ...SimpleQuery.graphql-SimpleQuery.graphql.go | 5 +- ...e.graphql-SimpleQueryNoOverride.graphql.go | 5 +- ...leQueryWithPointerFalseOverride.graphql.go | 5 +- ...tion.graphql-SimpleSubscription.graphql.go | 7 +-- ...ructOption.graphql-StructOption.graphql.go | 5 +- ...erate-TypeName.graphql-TypeName.graphql.go | 5 +- ...ate-TypeNames.graphql-TypeNames.graphql.go | 5 +- ...gments.graphql-UnionNoFragments.graphql.go | 5 +- ...EnumTwice.graphql-UsesEnumTwice.graphql.go | 5 +- ...e-unexported.graphql-unexported.graphql.go | 5 +- ...ClientGetter-testdata-queries-generated.go | 5 +- ...ustomContext-testdata-queries-generated.go | 5 +- ...terNoContext-testdata-queries-generated.go | 5 +- ...ustomContext-testdata-queries-generated.go | 5 +- ...extWithAlias-testdata-queries-generated.go | 5 +- ...efaultConfig-testdata-queries-generated.go | 5 +- ...RawCasingAll-testdata-queries-generated.go | 5 +- ...singSpecific-testdata-queries-generated.go | 5 +- ...rtOperations-testdata-queries-generated.go | 5 +- ...g-Extensions-testdata-queries-generated.go | 5 +- ...ig-NoContext-testdata-queries-generated.go | 5 +- ...ionalGeneric-testdata-queries-generated.go | 10 ++-- ...ionalPointer-testdata-queries-generated.go | 20 ++++---- ...ptionalValue-testdata-queries-generated.go | 10 ++-- ...kageBindings-testdata-queries-generated.go | 5 +- ...fig-PackageName-testdata-queries-myfile.go | 5 +- ...ctReferences-testdata-queries-generated.go | 10 ++-- ...ionalPointer-testdata-queries-generated.go | 10 ++-- ...ubpackage-testdata-queries-mypkg-myfile.go | 5 +- ...ageConfig-testdata-queries-mypkg-myfile.go | 5 +- internal/integration/generated.go | 48 +++++++------------ 67 files changed, 160 insertions(+), 252 deletions(-) diff --git a/example/generated.go b/example/generated.go index 7866a746..838e901d 100644 --- a/example/generated.go +++ b/example/generated.go @@ -84,7 +84,7 @@ func getUser( ctx_ context.Context, client_ graphql.Client, Login string, -) (data_ *getUserResponse, err error) { +) (data_ *getUserResponse, err_ error) { req_ := &graphql.Request{ OpName: "getUser", Query: getUser_Operation, @@ -92,7 +92,6 @@ func getUser( Login: Login, }, } - var err_ error data_ = &getUserResponse{} resp_ := &graphql.Response{Data: data_} @@ -119,12 +118,11 @@ query getViewer { func getViewer( ctx_ context.Context, client_ graphql.Client, -) (data_ *getViewerResponse, err error) { +) (data_ *getViewerResponse, err_ error) { req_ := &graphql.Request{ OpName: "getViewer", Query: getViewer_Operation, } - var err_ error data_ = &getViewerResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/exampleSubscription/generated.go b/exampleSubscription/generated.go index 83cf5e89..12ae5a21 100644 --- a/exampleSubscription/generated.go +++ b/exampleSubscription/generated.go @@ -28,12 +28,11 @@ subscription count { func count( ctx_ context.Context, client_ graphql.Client, -) (dataChan_ chan countWsResponse, errChan_ chan error, err error) { +) (dataChan_ chan countWsResponse, errChan_ chan error, err_ error) { req_ := &graphql.Request{ OpName: "count", Query: count_Operation, } - var err_ error dataChan_ = make(chan countWsResponse, 1) respChan_ := make(chan json.RawMessage, 1) diff --git a/generate/operation.go.tmpl b/generate/operation.go.tmpl index 8d947d58..cc0d2e5e 100644 --- a/generate/operation.go.tmpl +++ b/generate/operation.go.tmpl @@ -15,7 +15,7 @@ func {{.Name}}( {{.GraphQLName}} {{.GoType.Reference}}, {{end -}} {{end -}} -) ({{if eq .Type "subscription"}}dataChan_ chan {{.Name}}WsResponse, errChan_ chan error,{{else}}data_ *{{.ResponseName}}, {{if .Config.Extensions -}}ext_ map[string]interface{},{{end}}{{end}} err error) { +) ({{if eq .Type "subscription"}}dataChan_ chan {{.Name}}WsResponse, errChan_ chan error,{{else}}data_ *{{.ResponseName}}, {{if .Config.Extensions -}}ext_ map[string]interface{},{{end}}{{end}} err_ error) { req_ := &graphql.Request{ OpName: "{{.Name}}", Query: {{.Name}}_Operation, @@ -27,7 +27,6 @@ func {{.Name}}( }, {{end -}} } - var err_ error {{if .Config.ClientGetter -}} var client_ graphql.Client diff --git a/generate/testdata/snapshots/TestGenerate-ComplexInlineFragments.graphql-ComplexInlineFragments.graphql.go b/generate/testdata/snapshots/TestGenerate-ComplexInlineFragments.graphql-ComplexInlineFragments.graphql.go index b6fac09b..d976d156 100644 --- a/generate/testdata/snapshots/TestGenerate-ComplexInlineFragments.graphql-ComplexInlineFragments.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-ComplexInlineFragments.graphql-ComplexInlineFragments.graphql.go @@ -1340,7 +1340,7 @@ func (v *ComplexInlineFragmentsRootTopic) GetSchoolGrade() string { return v.Sch // GetName returns ComplexInlineFragmentsRootTopic.Name, and is useful for accessing the field via an interface. func (v *ComplexInlineFragmentsRootTopic) GetName() string { return v.Name } -// The query, mutation or subscription executed by ComplexInlineFragments. +// The query executed by ComplexInlineFragments. const ComplexInlineFragments_Operation = ` query ComplexInlineFragments { root { @@ -1436,12 +1436,11 @@ query ComplexInlineFragments { // interfaces yet. func ComplexInlineFragments( client_ graphql.Client, -) (data_ *ComplexInlineFragmentsResponse, err error) { +) (data_ *ComplexInlineFragmentsResponse, err_ error) { req_ := &graphql.Request{ OpName: "ComplexInlineFragments", Query: ComplexInlineFragments_Operation, } - var err_ error data_ = &ComplexInlineFragmentsResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-ComplexNamedFragments.graphql-ComplexNamedFragments.graphql.go b/generate/testdata/snapshots/TestGenerate-ComplexNamedFragments.graphql-ComplexNamedFragments.graphql.go index 019923dd..5f1c633b 100644 --- a/generate/testdata/snapshots/TestGenerate-ComplexNamedFragments.graphql-ComplexNamedFragments.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-ComplexNamedFragments.graphql-ComplexNamedFragments.graphql.go @@ -1739,7 +1739,7 @@ type VideoFieldsThumbnail struct { // GetId returns VideoFieldsThumbnail.Id, and is useful for accessing the field via an interface. func (v *VideoFieldsThumbnail) GetId() testutil.ID { return v.Id } -// The query, mutation or subscription executed by ComplexNamedFragments. +// The query executed by ComplexNamedFragments. const ComplexNamedFragments_Operation = ` query ComplexNamedFragments { ... on Query { @@ -1802,12 +1802,11 @@ fragment MoreVideoFields on Video { func ComplexNamedFragments( client_ graphql.Client, -) (data_ *ComplexNamedFragmentsResponse, err error) { +) (data_ *ComplexNamedFragmentsResponse, err_ error) { req_ := &graphql.Request{ OpName: "ComplexNamedFragments", Query: ComplexNamedFragments_Operation, } - var err_ error data_ = &ComplexNamedFragmentsResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-CovariantInterfaceImplementation.graphql-CovariantInterfaceImplementation.graphql.go b/generate/testdata/snapshots/TestGenerate-CovariantInterfaceImplementation.graphql-CovariantInterfaceImplementation.graphql.go index b97bc3c4..251b9b0e 100644 --- a/generate/testdata/snapshots/TestGenerate-CovariantInterfaceImplementation.graphql-CovariantInterfaceImplementation.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-CovariantInterfaceImplementation.graphql-CovariantInterfaceImplementation.graphql.go @@ -2346,7 +2346,7 @@ type TopicFieldsRelatedTopic struct { // GetId returns TopicFieldsRelatedTopic.Id, and is useful for accessing the field via an interface. func (v *TopicFieldsRelatedTopic) GetId() testutil.ID { return v.Id } -// The query, mutation or subscription executed by CovariantInterfaceImplementation. +// The query executed by CovariantInterfaceImplementation. const CovariantInterfaceImplementation_Operation = ` query CovariantInterfaceImplementation { randomItem { @@ -2394,12 +2394,11 @@ fragment TopicFields on Topic { func CovariantInterfaceImplementation( client_ graphql.Client, -) (data_ *CovariantInterfaceImplementationResponse, err error) { +) (data_ *CovariantInterfaceImplementationResponse, err_ error) { req_ := &graphql.Request{ OpName: "CovariantInterfaceImplementation", Query: CovariantInterfaceImplementation_Operation, } - var err_ error data_ = &CovariantInterfaceImplementationResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-CustomMarshal.graphql-CustomMarshal.graphql.go b/generate/testdata/snapshots/TestGenerate-CustomMarshal.graphql-CustomMarshal.graphql.go index d860f7bf..1d349a86 100644 --- a/generate/testdata/snapshots/TestGenerate-CustomMarshal.graphql-CustomMarshal.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-CustomMarshal.graphql-CustomMarshal.graphql.go @@ -174,7 +174,7 @@ func (v *__CustomMarshalInput) __premarshalJSON() (*__premarshal__CustomMarshalI return &retval, nil } -// The query, mutation or subscription executed by CustomMarshal. +// The query executed by CustomMarshal. const CustomMarshal_Operation = ` query CustomMarshal ($date: Date!) { usersBornOn(date: $date) { @@ -187,7 +187,7 @@ query CustomMarshal ($date: Date!) { func CustomMarshal( client_ graphql.Client, date time.Time, -) (data_ *CustomMarshalResponse, err error) { +) (data_ *CustomMarshalResponse, err_ error) { req_ := &graphql.Request{ OpName: "CustomMarshal", Query: CustomMarshal_Operation, @@ -195,7 +195,6 @@ func CustomMarshal( Date: date, }, } - var err_ error data_ = &CustomMarshalResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-CustomMarshalSlice.graphql-CustomMarshalSlice.graphql.go b/generate/testdata/snapshots/TestGenerate-CustomMarshalSlice.graphql-CustomMarshalSlice.graphql.go index f14be3c6..a18dcb2b 100644 --- a/generate/testdata/snapshots/TestGenerate-CustomMarshalSlice.graphql-CustomMarshalSlice.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-CustomMarshalSlice.graphql-CustomMarshalSlice.graphql.go @@ -203,7 +203,7 @@ func (v *__CustomMarshalSliceInput) __premarshalJSON() (*__premarshal__CustomMar return &retval, nil } -// The query, mutation or subscription executed by CustomMarshalSlice. +// The query executed by CustomMarshalSlice. const CustomMarshalSlice_Operation = ` query CustomMarshalSlice ($datesss: [[[Date!]!]!]!, $datesssp: [[[Date!]!]!]!) { acceptsListOfListOfListsOfDates(datesss: $datesss) @@ -215,7 +215,7 @@ func CustomMarshalSlice( client_ graphql.Client, datesss [][][]time.Time, datesssp [][][]*time.Time, -) (data_ *CustomMarshalSliceResponse, err error) { +) (data_ *CustomMarshalSliceResponse, err_ error) { req_ := &graphql.Request{ OpName: "CustomMarshalSlice", Query: CustomMarshalSlice_Operation, @@ -224,7 +224,6 @@ func CustomMarshalSlice( Datesssp: datesssp, }, } - var err_ error data_ = &CustomMarshalSliceResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-DateTime.graphql-DateTime.graphql.go b/generate/testdata/snapshots/TestGenerate-DateTime.graphql-DateTime.graphql.go index ae9bce40..fdfadf8e 100644 --- a/generate/testdata/snapshots/TestGenerate-DateTime.graphql-DateTime.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-DateTime.graphql-DateTime.graphql.go @@ -28,7 +28,7 @@ type convertTimezoneResponse struct { // GetConvert returns convertTimezoneResponse.Convert, and is useful for accessing the field via an interface. func (v *convertTimezoneResponse) GetConvert() time.Time { return v.Convert } -// The query, mutation or subscription executed by convertTimezone. +// The query executed by convertTimezone. const convertTimezone_Operation = ` query convertTimezone ($dt: DateTime!, $tz: String) { convert(dt: $dt, tz: $tz) @@ -39,7 +39,7 @@ func convertTimezone( client_ graphql.Client, dt time.Time, tz string, -) (data_ *convertTimezoneResponse, err error) { +) (data_ *convertTimezoneResponse, err_ error) { req_ := &graphql.Request{ OpName: "convertTimezone", Query: convertTimezone_Operation, @@ -48,7 +48,6 @@ func convertTimezone( Tz: tz, }, } - var err_ error data_ = &convertTimezoneResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-EmptyInterface.graphql-EmptyInterface.graphql.go b/generate/testdata/snapshots/TestGenerate-EmptyInterface.graphql-EmptyInterface.graphql.go index c579b24a..e78dd9da 100644 --- a/generate/testdata/snapshots/TestGenerate-EmptyInterface.graphql-EmptyInterface.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-EmptyInterface.graphql-EmptyInterface.graphql.go @@ -20,7 +20,7 @@ func (v *EmptyInterfaceResponse) GetGetComplexJunk() []map[string]*[]*map[string return v.GetComplexJunk } -// The query, mutation or subscription executed by EmptyInterface. +// The query executed by EmptyInterface. const EmptyInterface_Operation = ` query EmptyInterface { getJunk @@ -30,12 +30,11 @@ query EmptyInterface { func EmptyInterface( client_ graphql.Client, -) (data_ *EmptyInterfaceResponse, err error) { +) (data_ *EmptyInterfaceResponse, err_ error) { req_ := &graphql.Request{ OpName: "EmptyInterface", Query: EmptyInterface_Operation, } - var err_ error data_ = &EmptyInterfaceResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-Flatten.graphql-Flatten.graphql.go b/generate/testdata/snapshots/TestGenerate-Flatten.graphql-Flatten.graphql.go index 96d6f587..55ac8f52 100644 --- a/generate/testdata/snapshots/TestGenerate-Flatten.graphql-Flatten.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-Flatten.graphql-Flatten.graphql.go @@ -266,7 +266,7 @@ type VideoFieldsParentTopic struct { // GetVideoChildren returns VideoFieldsParentTopic.VideoChildren, and is useful for accessing the field via an interface. func (v *VideoFieldsParentTopic) GetVideoChildren() []ChildVideoFields { return v.VideoChildren } -// The query, mutation or subscription executed by ComplexNamedFragments. +// The query executed by ComplexNamedFragments. const ComplexNamedFragments_Operation = ` query ComplexNamedFragments { ... QueryFragment @@ -306,12 +306,11 @@ fragment ChildVideoFields on Video { func ComplexNamedFragments( client_ graphql.Client, -) (data_ *InnerQueryFragment, err error) { +) (data_ *InnerQueryFragment, err_ error) { req_ := &graphql.Request{ OpName: "ComplexNamedFragments", Query: ComplexNamedFragments_Operation, } - var err_ error data_ = &InnerQueryFragment{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-Hasura.graphql-Hasura.graphql.go b/generate/testdata/snapshots/TestGenerate-Hasura.graphql-Hasura.graphql.go index b10eab39..27e36c6f 100644 --- a/generate/testdata/snapshots/TestGenerate-Hasura.graphql-Hasura.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-Hasura.graphql-Hasura.graphql.go @@ -81,7 +81,7 @@ type __GetPokemonInput struct { // GetWhere returns __GetPokemonInput.Where, and is useful for accessing the field via an interface. func (v *__GetPokemonInput) GetWhere() *GetPokemonBoolExp { return v.Where } -// The query, mutation or subscription executed by GetPokemon. +// The query executed by GetPokemon. const GetPokemon_Operation = ` query GetPokemon ($where: getPokemonBoolExp!) { getPokemon(where: $where) { @@ -94,7 +94,7 @@ query GetPokemon ($where: getPokemonBoolExp!) { func GetPokemon( client_ graphql.Client, where *GetPokemonBoolExp, -) (data_ *GetPokemonResponse, err error) { +) (data_ *GetPokemonResponse, err_ error) { req_ := &graphql.Request{ OpName: "GetPokemon", Query: GetPokemon_Operation, @@ -102,7 +102,6 @@ func GetPokemon( Where: where, }, } - var err_ error data_ = &GetPokemonResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-InputEnum.graphql-InputEnum.graphql.go b/generate/testdata/snapshots/TestGenerate-InputEnum.graphql-InputEnum.graphql.go index 68f295e1..8abae869 100644 --- a/generate/testdata/snapshots/TestGenerate-InputEnum.graphql-InputEnum.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-InputEnum.graphql-InputEnum.graphql.go @@ -54,7 +54,7 @@ type __InputEnumQueryInput struct { // GetRole returns __InputEnumQueryInput.Role, and is useful for accessing the field via an interface. func (v *__InputEnumQueryInput) GetRole() Role { return v.Role } -// The query, mutation or subscription executed by InputEnumQuery. +// The query executed by InputEnumQuery. const InputEnumQuery_Operation = ` query InputEnumQuery ($role: Role!) { usersWithRole(role: $role) { @@ -66,7 +66,7 @@ query InputEnumQuery ($role: Role!) { func InputEnumQuery( client_ graphql.Client, role Role, -) (data_ *InputEnumQueryResponse, err error) { +) (data_ *InputEnumQueryResponse, err_ error) { req_ := &graphql.Request{ OpName: "InputEnumQuery", Query: InputEnumQuery_Operation, @@ -74,7 +74,6 @@ func InputEnumQuery( Role: role, }, } - var err_ error data_ = &InputEnumQueryResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-InputObject.graphql-InputObject.graphql.go b/generate/testdata/snapshots/TestGenerate-InputObject.graphql-InputObject.graphql.go index d0bed3d6..bcf810c8 100644 --- a/generate/testdata/snapshots/TestGenerate-InputObject.graphql-InputObject.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-InputObject.graphql-InputObject.graphql.go @@ -177,7 +177,7 @@ type __InputObjectQueryInput struct { // GetQuery returns __InputObjectQueryInput.Query, and is useful for accessing the field via an interface. func (v *__InputObjectQueryInput) GetQuery() UserQueryInput { return v.Query } -// The query, mutation or subscription executed by InputObjectQuery. +// The query executed by InputObjectQuery. const InputObjectQuery_Operation = ` query InputObjectQuery ($query: UserQueryInput) { user(query: $query) { @@ -189,7 +189,7 @@ query InputObjectQuery ($query: UserQueryInput) { func InputObjectQuery( client_ graphql.Client, query UserQueryInput, -) (data_ *InputObjectQueryResponse, err error) { +) (data_ *InputObjectQueryResponse, err_ error) { req_ := &graphql.Request{ OpName: "InputObjectQuery", Query: InputObjectQuery_Operation, @@ -197,7 +197,6 @@ func InputObjectQuery( Query: query, }, } - var err_ error data_ = &InputObjectQueryResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-InterfaceListField.graphql-InterfaceListField.graphql.go b/generate/testdata/snapshots/TestGenerate-InterfaceListField.graphql-InterfaceListField.graphql.go index 45239a4a..19f6ff5f 100644 --- a/generate/testdata/snapshots/TestGenerate-InterfaceListField.graphql-InterfaceListField.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-InterfaceListField.graphql-InterfaceListField.graphql.go @@ -520,7 +520,7 @@ func (v *InterfaceListFieldWithPointerTopicChildrenVideo) GetId() testutil.ID { // GetName returns InterfaceListFieldWithPointerTopicChildrenVideo.Name, and is useful for accessing the field via an interface. func (v *InterfaceListFieldWithPointerTopicChildrenVideo) GetName() string { return v.Name } -// The query, mutation or subscription executed by InterfaceListField. +// The query executed by InterfaceListField. const InterfaceListField_Operation = ` query InterfaceListField { root { @@ -546,12 +546,11 @@ query InterfaceListField { func InterfaceListField( client_ graphql.Client, -) (data_ *InterfaceListFieldResponse, err error) { +) (data_ *InterfaceListFieldResponse, err_ error) { req_ := &graphql.Request{ OpName: "InterfaceListField", Query: InterfaceListField_Operation, } - var err_ error data_ = &InterfaceListFieldResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-InterfaceListOfListsOfListsField.graphql-InterfaceListOfListsOfListsField.graphql.go b/generate/testdata/snapshots/TestGenerate-InterfaceListOfListsOfListsField.graphql-InterfaceListOfListsOfListsField.graphql.go index e7c7168e..204bae3f 100644 --- a/generate/testdata/snapshots/TestGenerate-InterfaceListOfListsOfListsField.graphql-InterfaceListOfListsOfListsField.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-InterfaceListOfListsOfListsField.graphql-InterfaceListOfListsOfListsField.graphql.go @@ -506,7 +506,7 @@ func (v *InterfaceListOfListOfListsFieldWithPointerVideo) GetId() *testutil.ID { // GetName returns InterfaceListOfListOfListsFieldWithPointerVideo.Name, and is useful for accessing the field via an interface. func (v *InterfaceListOfListOfListsFieldWithPointerVideo) GetName() *string { return v.Name } -// The query, mutation or subscription executed by InterfaceListOfListOfListsField. +// The query executed by InterfaceListOfListOfListsField. const InterfaceListOfListOfListsField_Operation = ` query InterfaceListOfListOfListsField { listOfListsOfListsOfContent { @@ -524,12 +524,11 @@ query InterfaceListOfListOfListsField { func InterfaceListOfListOfListsField( client_ graphql.Client, -) (data_ *InterfaceListOfListOfListsFieldResponse, err error) { +) (data_ *InterfaceListOfListOfListsFieldResponse, err_ error) { req_ := &graphql.Request{ OpName: "InterfaceListOfListOfListsField", Query: InterfaceListOfListOfListsField_Operation, } - var err_ error data_ = &InterfaceListOfListOfListsFieldResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-InterfaceNesting.graphql-InterfaceNesting.graphql.go b/generate/testdata/snapshots/TestGenerate-InterfaceNesting.graphql-InterfaceNesting.graphql.go index e672e9aa..b3dc63b9 100644 --- a/generate/testdata/snapshots/TestGenerate-InterfaceNesting.graphql-InterfaceNesting.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-InterfaceNesting.graphql-InterfaceNesting.graphql.go @@ -504,7 +504,7 @@ func (v *InterfaceNestingRootTopicChildrenVideo) GetParent() InterfaceNestingRoo return v.Parent } -// The query, mutation or subscription executed by InterfaceNesting. +// The query executed by InterfaceNesting. const InterfaceNesting_Operation = ` query InterfaceNesting { root { @@ -526,12 +526,11 @@ query InterfaceNesting { func InterfaceNesting( client_ graphql.Client, -) (data_ *InterfaceNestingResponse, err error) { +) (data_ *InterfaceNestingResponse, err_ error) { req_ := &graphql.Request{ OpName: "InterfaceNesting", Query: InterfaceNesting_Operation, } - var err_ error data_ = &InterfaceNestingResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-InterfaceNoFragments.graphql-InterfaceNoFragments.graphql.go b/generate/testdata/snapshots/TestGenerate-InterfaceNoFragments.graphql-InterfaceNoFragments.graphql.go index 5a1e11ef..f77e3e5e 100644 --- a/generate/testdata/snapshots/TestGenerate-InterfaceNoFragments.graphql-InterfaceNoFragments.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-InterfaceNoFragments.graphql-InterfaceNoFragments.graphql.go @@ -626,7 +626,7 @@ func (v *InterfaceNoFragmentsQueryWithPointerVideo) GetId() *testutil.ID { retur // GetName returns InterfaceNoFragmentsQueryWithPointerVideo.Name, and is useful for accessing the field via an interface. func (v *InterfaceNoFragmentsQueryWithPointerVideo) GetName() *string { return v.Name } -// The query, mutation or subscription executed by InterfaceNoFragmentsQuery. +// The query executed by InterfaceNoFragmentsQuery. const InterfaceNoFragmentsQuery_Operation = ` query InterfaceNoFragmentsQuery { root { @@ -653,12 +653,11 @@ query InterfaceNoFragmentsQuery { func InterfaceNoFragmentsQuery( client_ graphql.Client, -) (data_ *InterfaceNoFragmentsQueryResponse, err error) { +) (data_ *InterfaceNoFragmentsQueryResponse, err_ error) { req_ := &graphql.Request{ OpName: "InterfaceNoFragmentsQuery", Query: InterfaceNoFragmentsQuery_Operation, } - var err_ error data_ = &InterfaceNoFragmentsQueryResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-ListInput.graphql-ListInput.graphql.go b/generate/testdata/snapshots/TestGenerate-ListInput.graphql-ListInput.graphql.go index b2b97058..5076d7e4 100644 --- a/generate/testdata/snapshots/TestGenerate-ListInput.graphql-ListInput.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-ListInput.graphql-ListInput.graphql.go @@ -41,7 +41,7 @@ type __ListInputQueryInput struct { // GetNames returns __ListInputQueryInput.Names, and is useful for accessing the field via an interface. func (v *__ListInputQueryInput) GetNames() []string { return v.Names } -// The query, mutation or subscription executed by ListInputQuery. +// The query executed by ListInputQuery. const ListInputQuery_Operation = ` query ListInputQuery ($names: [String]) { user(query: {names:$names}) { @@ -53,7 +53,7 @@ query ListInputQuery ($names: [String]) { func ListInputQuery( client_ graphql.Client, names []string, -) (data_ *ListInputQueryResponse, err error) { +) (data_ *ListInputQueryResponse, err_ error) { req_ := &graphql.Request{ OpName: "ListInputQuery", Query: ListInputQuery_Operation, @@ -61,7 +61,6 @@ func ListInputQuery( Names: names, }, } - var err_ error data_ = &ListInputQueryResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-ListOfListsOfLists.graphql-ListOfListsOfLists.graphql.go b/generate/testdata/snapshots/TestGenerate-ListOfListsOfLists.graphql-ListOfListsOfLists.graphql.go index 714074fa..7405509d 100644 --- a/generate/testdata/snapshots/TestGenerate-ListOfListsOfLists.graphql-ListOfListsOfLists.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-ListOfListsOfLists.graphql-ListOfListsOfLists.graphql.go @@ -16,7 +16,7 @@ func (v *ListOfListsOfListsResponse) GetListOfListsOfLists() [][][]string { return v.ListOfListsOfLists } -// The query, mutation or subscription executed by ListOfListsOfLists. +// The query executed by ListOfListsOfLists. const ListOfListsOfLists_Operation = ` query ListOfListsOfLists { listOfListsOfLists @@ -25,12 +25,11 @@ query ListOfListsOfLists { func ListOfListsOfLists( client_ graphql.Client, -) (data_ *ListOfListsOfListsResponse, err error) { +) (data_ *ListOfListsOfListsResponse, err_ error) { req_ := &graphql.Request{ OpName: "ListOfListsOfLists", Query: ListOfListsOfLists_Operation, } - var err_ error data_ = &ListOfListsOfListsResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-MultipleDirectives.graphql-MultipleDirectives.graphql.go b/generate/testdata/snapshots/TestGenerate-MultipleDirectives.graphql-MultipleDirectives.graphql.go index b6c2cf5c..59461917 100644 --- a/generate/testdata/snapshots/TestGenerate-MultipleDirectives.graphql-MultipleDirectives.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-MultipleDirectives.graphql-MultipleDirectives.graphql.go @@ -325,7 +325,7 @@ func (v *__MultipleDirectivesInput) GetQuery() MyInput { return v.Query } // GetQueries returns __MultipleDirectivesInput.Queries, and is useful for accessing the field via an interface. func (v *__MultipleDirectivesInput) GetQueries() []*UserQueryInput { return v.Queries } -// The query, mutation or subscription executed by MultipleDirectives. +// The query executed by MultipleDirectives. const MultipleDirectives_Operation = ` query MultipleDirectives ($query: UserQueryInput, $queries: [UserQueryInput]) { user(query: $query) { @@ -341,7 +341,7 @@ func MultipleDirectives( client_ graphql.Client, query MyInput, queries []*UserQueryInput, -) (data_ *MyMultipleDirectivesResponse, err error) { +) (data_ *MyMultipleDirectivesResponse, err_ error) { req_ := &graphql.Request{ OpName: "MultipleDirectives", Query: MultipleDirectives_Operation, @@ -350,7 +350,6 @@ func MultipleDirectives( Queries: queries, }, } - var err_ error data_ = &MyMultipleDirectivesResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-MutationArgsWithCollidingNames.graphql-MutationArgsWithCollidingNames.graphql.go b/generate/testdata/snapshots/TestGenerate-MutationArgsWithCollidingNames.graphql-MutationArgsWithCollidingNames.graphql.go index cf1b315c..df1af308 100644 --- a/generate/testdata/snapshots/TestGenerate-MutationArgsWithCollidingNames.graphql-MutationArgsWithCollidingNames.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-MutationArgsWithCollidingNames.graphql-MutationArgsWithCollidingNames.graphql.go @@ -51,7 +51,7 @@ func (v *__MutationArgsWithCollidingNamesInput) GetResp() int { return v.Resp } // GetClient returns __MutationArgsWithCollidingNamesInput.Client, and is useful for accessing the field via an interface. func (v *__MutationArgsWithCollidingNamesInput) GetClient() string { return v.Client } -// The query, mutation or subscription executed by MutationArgsWithCollidingNames. +// The mutation executed by MutationArgsWithCollidingNames. const MutationArgsWithCollidingNames_Operation = ` mutation MutationArgsWithCollidingNames ($data: String!, $req: Int, $resp: Int, $client: String) { updateUser(data: $data, req: $req, resp: $resp, client: $client) { @@ -66,7 +66,7 @@ func MutationArgsWithCollidingNames( req int, resp int, client string, -) (data_ *MutationArgsWithCollidingNamesResponse, err error) { +) (data_ *MutationArgsWithCollidingNamesResponse, err_ error) { req_ := &graphql.Request{ OpName: "MutationArgsWithCollidingNames", Query: MutationArgsWithCollidingNames_Operation, @@ -77,7 +77,6 @@ func MutationArgsWithCollidingNames( Client: client, }, } - var err_ error data_ = &MutationArgsWithCollidingNamesResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-Omitempty.graphql-Omitempty.graphql.go b/generate/testdata/snapshots/TestGenerate-Omitempty.graphql-Omitempty.graphql.go index d2762a41..5ad9ffef 100644 --- a/generate/testdata/snapshots/TestGenerate-Omitempty.graphql-Omitempty.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-Omitempty.graphql-Omitempty.graphql.go @@ -219,7 +219,7 @@ func (v *__OmitEmptyQueryInput) GetTz() string { return v.Tz } // GetTzNoOmitEmpty returns __OmitEmptyQueryInput.TzNoOmitEmpty, and is useful for accessing the field via an interface. func (v *__OmitEmptyQueryInput) GetTzNoOmitEmpty() string { return v.TzNoOmitEmpty } -// The query, mutation or subscription executed by OmitEmptyQuery. +// The query executed by OmitEmptyQuery. const OmitEmptyQuery_Operation = ` query OmitEmptyQuery ($query: UserQueryInput, $queries: [UserQueryInput], $dt: DateTime, $tz: String, $tzNoOmitEmpty: String) { user(query: $query) { @@ -240,7 +240,7 @@ func OmitEmptyQuery( dt time.Time, tz string, tzNoOmitEmpty string, -) (data_ *OmitEmptyQueryResponse, err error) { +) (data_ *OmitEmptyQueryResponse, err_ error) { req_ := &graphql.Request{ OpName: "OmitEmptyQuery", Query: OmitEmptyQuery_Operation, @@ -252,7 +252,6 @@ func OmitEmptyQuery( TzNoOmitEmpty: tzNoOmitEmpty, }, } - var err_ error data_ = &OmitEmptyQueryResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-Pointers.graphql-Pointers.graphql.go b/generate/testdata/snapshots/TestGenerate-Pointers.graphql-Pointers.graphql.go index 108c4c42..37dce390 100644 --- a/generate/testdata/snapshots/TestGenerate-Pointers.graphql-Pointers.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-Pointers.graphql-Pointers.graphql.go @@ -230,7 +230,7 @@ func (v *__PointersQueryInput) GetDt() time.Time { return v.Dt } // GetTz returns __PointersQueryInput.Tz, and is useful for accessing the field via an interface. func (v *__PointersQueryInput) GetTz() *string { return v.Tz } -// The query, mutation or subscription executed by PointersQuery. +// The query executed by PointersQuery. const PointersQuery_Operation = ` query PointersQuery ($query: UserQueryInput, $dt: DateTime, $tz: String) { user(query: $query) { @@ -252,7 +252,7 @@ func PointersQuery( query *UserQueryInput, dt time.Time, tz *string, -) (data_ *PointersQueryResponse, err error) { +) (data_ *PointersQueryResponse, err_ error) { req_ := &graphql.Request{ OpName: "PointersQuery", Query: PointersQuery_Operation, @@ -262,7 +262,6 @@ func PointersQuery( Tz: tz, }, } - var err_ error data_ = &PointersQueryResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-PointersInline.graphql-PointersInline.graphql.go b/generate/testdata/snapshots/TestGenerate-PointersInline.graphql-PointersInline.graphql.go index 0b67cc7c..aa1877e0 100644 --- a/generate/testdata/snapshots/TestGenerate-PointersInline.graphql-PointersInline.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-PointersInline.graphql-PointersInline.graphql.go @@ -227,7 +227,7 @@ func (v *__PointersQueryInput) GetDt() *time.Time { return v.Dt } // GetTz returns __PointersQueryInput.Tz, and is useful for accessing the field via an interface. func (v *__PointersQueryInput) GetTz() string { return v.Tz } -// The query, mutation or subscription executed by PointersQuery. +// The query executed by PointersQuery. const PointersQuery_Operation = ` query PointersQuery ($query: UserQueryInput, $dt: DateTime, $tz: String) { user(query: $query) { @@ -249,7 +249,7 @@ func PointersQuery( query *UserQueryInput, dt *time.Time, tz string, -) (data_ *PointersQueryResponse, err error) { +) (data_ *PointersQueryResponse, err_ error) { req_ := &graphql.Request{ OpName: "PointersQuery", Query: PointersQuery_Operation, @@ -259,7 +259,6 @@ func PointersQuery( Tz: tz, }, } - var err_ error data_ = &PointersQueryResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-Pokemon.graphql-Pokemon.graphql.go b/generate/testdata/snapshots/TestGenerate-Pokemon.graphql-Pokemon.graphql.go index 6e0ad09e..cce522bc 100644 --- a/generate/testdata/snapshots/TestGenerate-Pokemon.graphql-Pokemon.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-Pokemon.graphql-Pokemon.graphql.go @@ -71,7 +71,7 @@ type __GetPokemonSiblingsInput struct { // GetInput returns __GetPokemonSiblingsInput.Input, and is useful for accessing the field via an interface. func (v *__GetPokemonSiblingsInput) GetInput() testutil.Pokemon { return v.Input } -// The query, mutation or subscription executed by GetPokemonSiblings. +// The query executed by GetPokemonSiblings. const GetPokemonSiblings_Operation = ` query GetPokemonSiblings ($input: PokemonInput!) { user(query: {hasPokemon:$input}) { @@ -93,7 +93,7 @@ query GetPokemonSiblings ($input: PokemonInput!) { func GetPokemonSiblings( client_ graphql.Client, input testutil.Pokemon, -) (data_ *GetPokemonSiblingsResponse, err error) { +) (data_ *GetPokemonSiblingsResponse, err_ error) { req_ := &graphql.Request{ OpName: "GetPokemonSiblings", Query: GetPokemonSiblings_Operation, @@ -101,7 +101,6 @@ func GetPokemonSiblings( Input: input, }, } - var err_ error data_ = &GetPokemonSiblingsResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-QueryWithAlias.graphql-QueryWithAlias.graphql.go b/generate/testdata/snapshots/TestGenerate-QueryWithAlias.graphql-QueryWithAlias.graphql.go index 7daa0a65..11f0856a 100644 --- a/generate/testdata/snapshots/TestGenerate-QueryWithAlias.graphql-QueryWithAlias.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-QueryWithAlias.graphql-QueryWithAlias.graphql.go @@ -40,7 +40,7 @@ func (v *QueryWithAliasUser) GetID() testutil.ID { return v.ID } // GetOtherID returns QueryWithAliasUser.OtherID, and is useful for accessing the field via an interface. func (v *QueryWithAliasUser) GetOtherID() testutil.ID { return v.OtherID } -// The query, mutation or subscription executed by QueryWithAlias. +// The query executed by QueryWithAlias. const QueryWithAlias_Operation = ` query QueryWithAlias { User: user { @@ -52,12 +52,11 @@ query QueryWithAlias { func QueryWithAlias( client_ graphql.Client, -) (data_ *QueryWithAliasResponse, err error) { +) (data_ *QueryWithAliasResponse, err_ error) { req_ := &graphql.Request{ OpName: "QueryWithAlias", Query: QueryWithAlias_Operation, } - var err_ error data_ = &QueryWithAliasResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-QueryWithDoubleAlias.graphql-QueryWithDoubleAlias.graphql.go b/generate/testdata/snapshots/TestGenerate-QueryWithDoubleAlias.graphql-QueryWithDoubleAlias.graphql.go index 2860b848..3b1f1f03 100644 --- a/generate/testdata/snapshots/TestGenerate-QueryWithDoubleAlias.graphql-QueryWithDoubleAlias.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-QueryWithDoubleAlias.graphql-QueryWithDoubleAlias.graphql.go @@ -40,7 +40,7 @@ func (v *QueryWithDoubleAliasUser) GetID() testutil.ID { return v.ID } // GetAlsoID returns QueryWithDoubleAliasUser.AlsoID, and is useful for accessing the field via an interface. func (v *QueryWithDoubleAliasUser) GetAlsoID() testutil.ID { return v.AlsoID } -// The query, mutation or subscription executed by QueryWithDoubleAlias. +// The query executed by QueryWithDoubleAlias. const QueryWithDoubleAlias_Operation = ` query QueryWithDoubleAlias { user { @@ -52,12 +52,11 @@ query QueryWithDoubleAlias { func QueryWithDoubleAlias( client_ graphql.Client, -) (data_ *QueryWithDoubleAliasResponse, err error) { +) (data_ *QueryWithDoubleAliasResponse, err_ error) { req_ := &graphql.Request{ OpName: "QueryWithDoubleAlias", Query: QueryWithDoubleAlias_Operation, } - var err_ error data_ = &QueryWithDoubleAliasResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-QueryWithEnums.graphql-QueryWithEnums.graphql.go b/generate/testdata/snapshots/TestGenerate-QueryWithEnums.graphql-QueryWithEnums.graphql.go index 51a9d34a..e92ac516 100644 --- a/generate/testdata/snapshots/TestGenerate-QueryWithEnums.graphql-QueryWithEnums.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-QueryWithEnums.graphql-QueryWithEnums.graphql.go @@ -62,7 +62,7 @@ const ( RoleTeacher Role = "TEACHER" ) -// The query, mutation or subscription executed by QueryWithEnums. +// The query executed by QueryWithEnums. const QueryWithEnums_Operation = ` query QueryWithEnums { user { @@ -76,12 +76,11 @@ query QueryWithEnums { func QueryWithEnums( client_ graphql.Client, -) (data_ *QueryWithEnumsResponse, err error) { +) (data_ *QueryWithEnumsResponse, err_ error) { req_ := &graphql.Request{ OpName: "QueryWithEnums", Query: QueryWithEnums_Operation, } - var err_ error data_ = &QueryWithEnumsResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-QueryWithSlices.graphql-QueryWithSlices.graphql.go b/generate/testdata/snapshots/TestGenerate-QueryWithSlices.graphql-QueryWithSlices.graphql.go index a1fe9049..5fe2c87c 100644 --- a/generate/testdata/snapshots/TestGenerate-QueryWithSlices.graphql-QueryWithSlices.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-QueryWithSlices.graphql-QueryWithSlices.graphql.go @@ -41,7 +41,7 @@ func (v *QueryWithSlicesUser) GetEmailsWithNulls() []string { return v.EmailsWit // GetEmailsWithNullsOrNull returns QueryWithSlicesUser.EmailsWithNullsOrNull, and is useful for accessing the field via an interface. func (v *QueryWithSlicesUser) GetEmailsWithNullsOrNull() []string { return v.EmailsWithNullsOrNull } -// The query, mutation or subscription executed by QueryWithSlices. +// The query executed by QueryWithSlices. const QueryWithSlices_Operation = ` query QueryWithSlices { user { @@ -55,12 +55,11 @@ query QueryWithSlices { func QueryWithSlices( client_ graphql.Client, -) (data_ *QueryWithSlicesResponse, err error) { +) (data_ *QueryWithSlicesResponse, err_ error) { req_ := &graphql.Request{ OpName: "QueryWithSlices", Query: QueryWithSlices_Operation, } - var err_ error data_ = &QueryWithSlicesResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-QueryWithStructs.graphql-QueryWithStructs.graphql.go b/generate/testdata/snapshots/TestGenerate-QueryWithStructs.graphql-QueryWithStructs.graphql.go index 596f633f..3e2ba9d5 100644 --- a/generate/testdata/snapshots/TestGenerate-QueryWithStructs.graphql-QueryWithStructs.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-QueryWithStructs.graphql-QueryWithStructs.graphql.go @@ -43,7 +43,7 @@ func (v *QueryWithStructsUserAuthMethodsAuthMethod) GetProvider() string { retur // GetEmail returns QueryWithStructsUserAuthMethodsAuthMethod.Email, and is useful for accessing the field via an interface. func (v *QueryWithStructsUserAuthMethodsAuthMethod) GetEmail() string { return v.Email } -// The query, mutation or subscription executed by QueryWithStructs. +// The query executed by QueryWithStructs. const QueryWithStructs_Operation = ` query QueryWithStructs { user { @@ -57,12 +57,11 @@ query QueryWithStructs { func QueryWithStructs( client_ graphql.Client, -) (data_ *QueryWithStructsResponse, err error) { +) (data_ *QueryWithStructsResponse, err_ error) { req_ := &graphql.Request{ OpName: "QueryWithStructs", Query: QueryWithStructs_Operation, } - var err_ error data_ = &QueryWithStructsResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-Recursion.graphql-Recursion.graphql.go b/generate/testdata/snapshots/TestGenerate-Recursion.graphql-Recursion.graphql.go index 30a833bc..b95cf54d 100644 --- a/generate/testdata/snapshots/TestGenerate-Recursion.graphql-Recursion.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-Recursion.graphql-Recursion.graphql.go @@ -68,7 +68,7 @@ type __RecursionInput struct { // GetInput returns __RecursionInput.Input, and is useful for accessing the field via an interface. func (v *__RecursionInput) GetInput() RecursiveInput { return v.Input } -// The query, mutation or subscription executed by Recursion. +// The query executed by Recursion. const Recursion_Operation = ` query Recursion ($input: RecursiveInput!) { recur(input: $input) { @@ -86,7 +86,7 @@ query Recursion ($input: RecursiveInput!) { func Recursion( client_ graphql.Client, input RecursiveInput, -) (data_ *RecursionResponse, err error) { +) (data_ *RecursionResponse, err_ error) { req_ := &graphql.Request{ OpName: "Recursion", Query: Recursion_Operation, @@ -94,7 +94,6 @@ func Recursion( Input: input, }, } - var err_ error data_ = &RecursionResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-SimpleInlineFragment.graphql-SimpleInlineFragment.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleInlineFragment.graphql-SimpleInlineFragment.graphql.go index d5d738b4..ba391639 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleInlineFragment.graphql-SimpleInlineFragment.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleInlineFragment.graphql-SimpleInlineFragment.graphql.go @@ -239,7 +239,7 @@ func (v *SimpleInlineFragmentResponse) __premarshalJSON() (*__premarshalSimpleIn return &retval, nil } -// The query, mutation or subscription executed by SimpleInlineFragment. +// The query executed by SimpleInlineFragment. const SimpleInlineFragment_Operation = ` query SimpleInlineFragment { randomItem { @@ -258,12 +258,11 @@ query SimpleInlineFragment { func SimpleInlineFragment( client_ graphql.Client, -) (data_ *SimpleInlineFragmentResponse, err error) { +) (data_ *SimpleInlineFragmentResponse, err_ error) { req_ := &graphql.Request{ OpName: "SimpleInlineFragment", Query: SimpleInlineFragment_Operation, } - var err_ error data_ = &SimpleInlineFragmentResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-SimpleInput.graphql-SimpleInput.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleInput.graphql-SimpleInput.graphql.go index 45f5a563..2ecfa74d 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleInput.graphql-SimpleInput.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleInput.graphql-SimpleInput.graphql.go @@ -41,7 +41,7 @@ type __SimpleInputQueryInput struct { // GetName returns __SimpleInputQueryInput.Name, and is useful for accessing the field via an interface. func (v *__SimpleInputQueryInput) GetName() string { return v.Name } -// The query, mutation or subscription executed by SimpleInputQuery. +// The query executed by SimpleInputQuery. const SimpleInputQuery_Operation = ` query SimpleInputQuery ($name: String!) { user(query: {name:$name}) { @@ -53,7 +53,7 @@ query SimpleInputQuery ($name: String!) { func SimpleInputQuery( client_ graphql.Client, name string, -) (data_ *SimpleInputQueryResponse, err error) { +) (data_ *SimpleInputQueryResponse, err_ error) { req_ := &graphql.Request{ OpName: "SimpleInputQuery", Query: SimpleInputQuery_Operation, @@ -61,7 +61,6 @@ func SimpleInputQuery( Name: name, }, } - var err_ error data_ = &SimpleInputQueryResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-SimpleMutation.graphql-SimpleMutation.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleMutation.graphql-SimpleMutation.graphql.go index c7d5c5bd..6a6df45a 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleMutation.graphql-SimpleMutation.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleMutation.graphql-SimpleMutation.graphql.go @@ -41,7 +41,7 @@ type __SimpleMutationInput struct { // GetName returns __SimpleMutationInput.Name, and is useful for accessing the field via an interface. func (v *__SimpleMutationInput) GetName() string { return v.Name } -// The query, mutation or subscription executed by SimpleMutation. +// The mutation executed by SimpleMutation. const SimpleMutation_Operation = ` mutation SimpleMutation ($name: String!) { createUser(name: $name) { @@ -58,7 +58,7 @@ mutation SimpleMutation ($name: String!) { func SimpleMutation( client_ graphql.Client, name string, -) (data_ *SimpleMutationResponse, err error) { +) (data_ *SimpleMutationResponse, err_ error) { req_ := &graphql.Request{ OpName: "SimpleMutation", Query: SimpleMutation_Operation, @@ -66,7 +66,6 @@ func SimpleMutation( Name: name, }, } - var err_ error data_ = &SimpleMutationResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-SimpleNamedFragment.graphql-SimpleNamedFragment.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleNamedFragment.graphql-SimpleNamedFragment.graphql.go index 14fe5dd1..c9fd12a2 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleNamedFragment.graphql-SimpleNamedFragment.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleNamedFragment.graphql-SimpleNamedFragment.graphql.go @@ -546,7 +546,7 @@ type VideoFieldsThumbnail struct { // GetId returns VideoFieldsThumbnail.Id, and is useful for accessing the field via an interface. func (v *VideoFieldsThumbnail) GetId() testutil.ID { return v.Id } -// The query, mutation or subscription executed by SimpleNamedFragment. +// The query executed by SimpleNamedFragment. const SimpleNamedFragment_Operation = ` query SimpleNamedFragment { randomItem { @@ -573,12 +573,11 @@ fragment VideoFields on Video { func SimpleNamedFragment( client_ graphql.Client, -) (data_ *SimpleNamedFragmentResponse, err error) { +) (data_ *SimpleNamedFragmentResponse, err_ error) { req_ := &graphql.Request{ OpName: "SimpleNamedFragment", Query: SimpleNamedFragment_Operation, } - var err_ error data_ = &SimpleNamedFragmentResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-SimpleQuery.graphql-SimpleQuery.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleQuery.graphql-SimpleQuery.graphql.go index 19d52095..2b67d70d 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleQuery.graphql-SimpleQuery.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleQuery.graphql-SimpleQuery.graphql.go @@ -33,7 +33,7 @@ type SimpleQueryUser struct { // GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface. func (v *SimpleQueryUser) GetId() testutil.ID { return v.Id } -// The query, mutation or subscription executed by SimpleQuery. +// The query executed by SimpleQuery. const SimpleQuery_Operation = ` query SimpleQuery { user { @@ -44,12 +44,11 @@ query SimpleQuery { func SimpleQuery( client_ graphql.Client, -) (data_ *SimpleQueryResponse, err error) { +) (data_ *SimpleQueryResponse, err_ error) { req_ := &graphql.Request{ OpName: "SimpleQuery", Query: SimpleQuery_Operation, } - var err_ error data_ = &SimpleQueryResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-SimpleQueryNoOverride.graphql-SimpleQueryNoOverride.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleQueryNoOverride.graphql-SimpleQueryNoOverride.graphql.go index b2d499cd..b50c73c7 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleQueryNoOverride.graphql-SimpleQueryNoOverride.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleQueryNoOverride.graphql-SimpleQueryNoOverride.graphql.go @@ -37,7 +37,7 @@ func (v *SimpleQueryNoOverrideUser) GetId() testutil.ID { return v.Id } // GetName returns SimpleQueryNoOverrideUser.Name, and is useful for accessing the field via an interface. func (v *SimpleQueryNoOverrideUser) GetName() string { return v.Name } -// The query, mutation or subscription executed by SimpleQueryNoOverride. +// The query executed by SimpleQueryNoOverride. const SimpleQueryNoOverride_Operation = ` query SimpleQueryNoOverride { user { @@ -49,12 +49,11 @@ query SimpleQueryNoOverride { func SimpleQueryNoOverride( client_ graphql.Client, -) (data_ *SimpleQueryNoOverrideResponse, err error) { +) (data_ *SimpleQueryNoOverrideResponse, err_ error) { req_ := &graphql.Request{ OpName: "SimpleQueryNoOverride", Query: SimpleQueryNoOverride_Operation, } - var err_ error data_ = &SimpleQueryNoOverrideResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-SimpleQueryWithPointerFalseOverride.graphql-SimpleQueryWithPointerFalseOverride.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleQueryWithPointerFalseOverride.graphql-SimpleQueryWithPointerFalseOverride.graphql.go index 227f52c7..d0d6ffff 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleQueryWithPointerFalseOverride.graphql-SimpleQueryWithPointerFalseOverride.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleQueryWithPointerFalseOverride.graphql-SimpleQueryWithPointerFalseOverride.graphql.go @@ -39,7 +39,7 @@ func (v *SimpleQueryWithPointerFalseOverrideUser) GetId() testutil.ID { return v // GetName returns SimpleQueryWithPointerFalseOverrideUser.Name, and is useful for accessing the field via an interface. func (v *SimpleQueryWithPointerFalseOverrideUser) GetName() string { return v.Name } -// The query, mutation or subscription executed by SimpleQueryWithPointerFalseOverride. +// The query executed by SimpleQueryWithPointerFalseOverride. const SimpleQueryWithPointerFalseOverride_Operation = ` query SimpleQueryWithPointerFalseOverride { user { @@ -51,12 +51,11 @@ query SimpleQueryWithPointerFalseOverride { func SimpleQueryWithPointerFalseOverride( client_ graphql.Client, -) (data_ *SimpleQueryWithPointerFalseOverrideResponse, err error) { +) (data_ *SimpleQueryWithPointerFalseOverrideResponse, err_ error) { req_ := &graphql.Request{ OpName: "SimpleQueryWithPointerFalseOverride", Query: SimpleQueryWithPointerFalseOverride_Operation, } - var err_ error data_ = &SimpleQueryWithPointerFalseOverrideResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go index 9220e710..24ced38d 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go @@ -17,24 +17,21 @@ type SimpleSubscriptionResponse struct { // GetCount returns SimpleSubscriptionResponse.Count, and is useful for accessing the field via an interface. func (v *SimpleSubscriptionResponse) GetCount() int { return v.Count } -// The query, mutation or subscription executed by SimpleSubscription. +// The subscription executed by SimpleSubscription. const SimpleSubscription_Operation = ` subscription SimpleSubscription { count } ` -// SimpleSubscription -// // To close the connection, use [graphql.Client.CloseWebSocket()] func SimpleSubscription( client_ graphql.Client, -) (dataChan_ chan SimpleSubscriptionWsResponse, errChan_ chan error, err error) { +) (dataChan_ chan SimpleSubscriptionWsResponse, errChan_ chan error, err_ error) { req_ := &graphql.Request{ OpName: "SimpleSubscription", Query: SimpleSubscription_Operation, } - var err_ error dataChan_ = make(chan SimpleSubscriptionWsResponse, 1) respChan_ := make(chan json.RawMessage, 1) diff --git a/generate/testdata/snapshots/TestGenerate-StructOption.graphql-StructOption.graphql.go b/generate/testdata/snapshots/TestGenerate-StructOption.graphql-StructOption.graphql.go index 4e88c47a..8c6edec3 100644 --- a/generate/testdata/snapshots/TestGenerate-StructOption.graphql-StructOption.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-StructOption.graphql-StructOption.graphql.go @@ -424,7 +424,7 @@ type VideoFields struct { // GetDuration returns VideoFields.Duration, and is useful for accessing the field via an interface. func (v *VideoFields) GetDuration() int { return v.Duration } -// The query, mutation or subscription executed by StructOption. +// The query executed by StructOption. const StructOption_Operation = ` query StructOption { root { @@ -457,12 +457,11 @@ fragment VideoFields on Video { func StructOption( client_ graphql.Client, -) (data_ *StructOptionResponse, err error) { +) (data_ *StructOptionResponse, err_ error) { req_ := &graphql.Request{ OpName: "StructOption", Query: StructOption_Operation, } - var err_ error data_ = &StructOptionResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-TypeName.graphql-TypeName.graphql.go b/generate/testdata/snapshots/TestGenerate-TypeName.graphql-TypeName.graphql.go index 0c30ef64..2525a472 100644 --- a/generate/testdata/snapshots/TestGenerate-TypeName.graphql-TypeName.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-TypeName.graphql-TypeName.graphql.go @@ -37,7 +37,7 @@ func (v *TypeNameQueryUser) GetTypename() string { return v.Typename } // GetId returns TypeNameQueryUser.Id, and is useful for accessing the field via an interface. func (v *TypeNameQueryUser) GetId() testutil.ID { return v.Id } -// The query, mutation or subscription executed by TypeNameQuery. +// The query executed by TypeNameQuery. const TypeNameQuery_Operation = ` query TypeNameQuery { user { @@ -49,12 +49,11 @@ query TypeNameQuery { func TypeNameQuery( client_ graphql.Client, -) (data_ *TypeNameQueryResponse, err error) { +) (data_ *TypeNameQueryResponse, err_ error) { req_ := &graphql.Request{ OpName: "TypeNameQuery", Query: TypeNameQuery_Operation, } - var err_ error data_ = &TypeNameQueryResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-TypeNames.graphql-TypeNames.graphql.go b/generate/testdata/snapshots/TestGenerate-TypeNames.graphql-TypeNames.graphql.go index 2bb981d8..5272fd94 100644 --- a/generate/testdata/snapshots/TestGenerate-TypeNames.graphql-TypeNames.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-TypeNames.graphql-TypeNames.graphql.go @@ -264,7 +264,7 @@ func (v *User) GetId() testutil.ID { return v.Id } // GetName returns User.Name, and is useful for accessing the field via an interface. func (v *User) GetName() string { return v.Name } -// The query, mutation or subscription executed by TypeNames. +// The query executed by TypeNames. const TypeNames_Operation = ` query TypeNames { user { @@ -285,12 +285,11 @@ query TypeNames { func TypeNames( client_ graphql.Client, -) (data_ *Resp, err error) { +) (data_ *Resp, err_ error) { req_ := &graphql.Request{ OpName: "TypeNames", Query: TypeNames_Operation, } - var err_ error data_ = &Resp{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-UnionNoFragments.graphql-UnionNoFragments.graphql.go b/generate/testdata/snapshots/TestGenerate-UnionNoFragments.graphql-UnionNoFragments.graphql.go index ea74b1d1..af3bb653 100644 --- a/generate/testdata/snapshots/TestGenerate-UnionNoFragments.graphql-UnionNoFragments.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-UnionNoFragments.graphql-UnionNoFragments.graphql.go @@ -174,7 +174,7 @@ func (v *UnionNoFragmentsQueryResponse) __premarshalJSON() (*__premarshalUnionNo return &retval, nil } -// The query, mutation or subscription executed by UnionNoFragmentsQuery. +// The query executed by UnionNoFragmentsQuery. const UnionNoFragmentsQuery_Operation = ` query UnionNoFragmentsQuery { randomLeaf { @@ -185,12 +185,11 @@ query UnionNoFragmentsQuery { func UnionNoFragmentsQuery( client_ graphql.Client, -) (data_ *UnionNoFragmentsQueryResponse, err error) { +) (data_ *UnionNoFragmentsQueryResponse, err_ error) { req_ := &graphql.Request{ OpName: "UnionNoFragmentsQuery", Query: UnionNoFragmentsQuery_Operation, } - var err_ error data_ = &UnionNoFragmentsQueryResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-UsesEnumTwice.graphql-UsesEnumTwice.graphql.go b/generate/testdata/snapshots/TestGenerate-UsesEnumTwice.graphql-UsesEnumTwice.graphql.go index ab8dc138..4769c044 100644 --- a/generate/testdata/snapshots/TestGenerate-UsesEnumTwice.graphql-UsesEnumTwice.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-UsesEnumTwice.graphql-UsesEnumTwice.graphql.go @@ -62,7 +62,7 @@ func (v *UsesEnumTwiceQueryResponse) GetMe() UsesEnumTwiceQueryMeUser { return v // GetOtherUser returns UsesEnumTwiceQueryResponse.OtherUser, and is useful for accessing the field via an interface. func (v *UsesEnumTwiceQueryResponse) GetOtherUser() UsesEnumTwiceQueryOtherUser { return v.OtherUser } -// The query, mutation or subscription executed by UsesEnumTwiceQuery. +// The query executed by UsesEnumTwiceQuery. const UsesEnumTwiceQuery_Operation = ` query UsesEnumTwiceQuery { Me: user { @@ -76,12 +76,11 @@ query UsesEnumTwiceQuery { func UsesEnumTwiceQuery( client_ graphql.Client, -) (data_ *UsesEnumTwiceQueryResponse, err error) { +) (data_ *UsesEnumTwiceQueryResponse, err_ error) { req_ := &graphql.Request{ OpName: "UsesEnumTwiceQuery", Query: UsesEnumTwiceQuery_Operation, } - var err_ error data_ = &UsesEnumTwiceQueryResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerate-unexported.graphql-unexported.graphql.go b/generate/testdata/snapshots/TestGenerate-unexported.graphql-unexported.graphql.go index 043d87e4..8bbaabea 100644 --- a/generate/testdata/snapshots/TestGenerate-unexported.graphql-unexported.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-unexported.graphql-unexported.graphql.go @@ -177,7 +177,7 @@ type unexportedUser struct { // GetId returns unexportedUser.Id, and is useful for accessing the field via an interface. func (v *unexportedUser) GetId() testutil.ID { return v.Id } -// The query, mutation or subscription executed by unexported. +// The query executed by unexported. const unexported_Operation = ` query unexported ($query: UserQueryInput) { user(query: $query) { @@ -189,7 +189,7 @@ query unexported ($query: UserQueryInput) { func unexported( client_ graphql.Client, query UserQueryInput, -) (data_ *unexportedResponse, err error) { +) (data_ *unexportedResponse, err_ error) { req_ := &graphql.Request{ OpName: "unexported", Query: unexported_Operation, @@ -197,7 +197,6 @@ func unexported( Query: query, }, } - var err_ error data_ = &unexportedResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetter-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetter-testdata-queries-generated.go index f3c8977f..d6bcce4f 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetter-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetter-testdata-queries-generated.go @@ -35,7 +35,7 @@ type SimpleQueryUser struct { // GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface. func (v *SimpleQueryUser) GetId() string { return v.Id } -// The query, mutation or subscription executed by SimpleQuery. +// The query executed by SimpleQuery. const SimpleQuery_Operation = ` query SimpleQuery { user { @@ -46,12 +46,11 @@ query SimpleQuery { func SimpleQuery( ctx_ context.Context, -) (data_ *SimpleQueryResponse, err error) { +) (data_ *SimpleQueryResponse, err_ error) { req_ := &graphql.Request{ OpName: "SimpleQuery", Query: SimpleQuery_Operation, } - var err_ error var client_ graphql.Client client_, err_ = testutil.GetClientFromContext(ctx_) diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterCustomContext-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterCustomContext-testdata-queries-generated.go index 371cddd5..4b969713 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterCustomContext-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterCustomContext-testdata-queries-generated.go @@ -38,7 +38,7 @@ type SimpleQueryUser struct { // GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface. func (v *SimpleQueryUser) GetId() string { return v.Id } -// The query, mutation or subscription executed by SimpleQuery. +// The query executed by SimpleQuery. const SimpleQuery_Operation = ` query SimpleQuery { user { @@ -49,12 +49,11 @@ query SimpleQuery { func SimpleQuery( ctx_ testutil.MyContext, -) (data_ *SimpleQueryResponse, err error) { +) (data_ *SimpleQueryResponse, err_ error) { req_ := &graphql.Request{ OpName: "SimpleQuery", Query: SimpleQuery_Operation, } - var err_ error var client_ graphql.Client client_, err_ = testutil.GetClientFromMyContext(ctx_) diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterNoContext-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterNoContext-testdata-queries-generated.go index 2cc9729a..e1ce6efc 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterNoContext-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterNoContext-testdata-queries-generated.go @@ -33,7 +33,7 @@ type SimpleQueryUser struct { // GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface. func (v *SimpleQueryUser) GetId() string { return v.Id } -// The query, mutation or subscription executed by SimpleQuery. +// The query executed by SimpleQuery. const SimpleQuery_Operation = ` query SimpleQuery { user { @@ -42,12 +42,11 @@ query SimpleQuery { } ` -func SimpleQuery() (data_ *SimpleQueryResponse, err error) { +func SimpleQuery() (data_ *SimpleQueryResponse, err_ error) { req_ := &graphql.Request{ OpName: "SimpleQuery", Query: SimpleQuery_Operation, } - var err_ error var client_ graphql.Client client_, err_ = testutil.GetClientFromNowhere() diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-CustomContext-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-CustomContext-testdata-queries-generated.go index 91edbae6..58a39fee 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-CustomContext-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-CustomContext-testdata-queries-generated.go @@ -38,7 +38,7 @@ type SimpleQueryUser struct { // GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface. func (v *SimpleQueryUser) GetId() string { return v.Id } -// The query, mutation or subscription executed by SimpleQuery. +// The query executed by SimpleQuery. const SimpleQuery_Operation = ` query SimpleQuery { user { @@ -50,12 +50,11 @@ query SimpleQuery { func SimpleQuery( ctx_ testutil.MyContext, client_ graphql.Client, -) (data_ *SimpleQueryResponse, err error) { +) (data_ *SimpleQueryResponse, err_ error) { req_ := &graphql.Request{ OpName: "SimpleQuery", Query: SimpleQuery_Operation, } - var err_ error data_ = &SimpleQueryResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-CustomContextWithAlias-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-CustomContextWithAlias-testdata-queries-generated.go index 4d636265..79d6aa49 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-CustomContextWithAlias-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-CustomContextWithAlias-testdata-queries-generated.go @@ -38,7 +38,7 @@ type SimpleQueryUser struct { // GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface. func (v *SimpleQueryUser) GetId() string { return v.Id } -// The query, mutation or subscription executed by SimpleQuery. +// The query executed by SimpleQuery. const SimpleQuery_Operation = ` query SimpleQuery { user { @@ -50,12 +50,11 @@ query SimpleQuery { func SimpleQuery( ctx_ junkfunname.MyContext, client_ graphql.Client, -) (data_ *SimpleQueryResponse, err error) { +) (data_ *SimpleQueryResponse, err_ error) { req_ := &graphql.Request{ OpName: "SimpleQuery", Query: SimpleQuery_Operation, } - var err_ error data_ = &SimpleQueryResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-DefaultConfig-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-DefaultConfig-testdata-queries-generated.go index 782538c8..0c6d412e 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-DefaultConfig-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-DefaultConfig-testdata-queries-generated.go @@ -34,7 +34,7 @@ type SimpleQueryUser struct { // GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface. func (v *SimpleQueryUser) GetId() string { return v.Id } -// The query, mutation or subscription executed by SimpleQuery. +// The query executed by SimpleQuery. const SimpleQuery_Operation = ` query SimpleQuery { user { @@ -46,12 +46,11 @@ query SimpleQuery { func SimpleQuery( ctx_ context.Context, client_ graphql.Client, -) (data_ *SimpleQueryResponse, err error) { +) (data_ *SimpleQueryResponse, err_ error) { req_ := &graphql.Request{ OpName: "SimpleQuery", Query: SimpleQuery_Operation, } - var err_ error data_ = &SimpleQueryResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingAll-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingAll-testdata-queries-generated.go index 1b9e14b9..2117bc99 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingAll-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingAll-testdata-queries-generated.go @@ -64,7 +64,7 @@ const ( Role_TEACHER Role = "TEACHER" ) -// The query, mutation or subscription executed by QueryWithEnums. +// The query executed by QueryWithEnums. const QueryWithEnums_Operation = ` query QueryWithEnums { user { @@ -79,12 +79,11 @@ query QueryWithEnums { func QueryWithEnums( ctx_ context.Context, client_ graphql.Client, -) (data_ *QueryWithEnumsResponse, err error) { +) (data_ *QueryWithEnumsResponse, err_ error) { req_ := &graphql.Request{ OpName: "QueryWithEnums", Query: QueryWithEnums_Operation, } - var err_ error data_ = &QueryWithEnumsResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingSpecific-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingSpecific-testdata-queries-generated.go index 1b9e14b9..2117bc99 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingSpecific-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingSpecific-testdata-queries-generated.go @@ -64,7 +64,7 @@ const ( Role_TEACHER Role = "TEACHER" ) -// The query, mutation or subscription executed by QueryWithEnums. +// The query executed by QueryWithEnums. const QueryWithEnums_Operation = ` query QueryWithEnums { user { @@ -79,12 +79,11 @@ query QueryWithEnums { func QueryWithEnums( ctx_ context.Context, client_ graphql.Client, -) (data_ *QueryWithEnumsResponse, err error) { +) (data_ *QueryWithEnumsResponse, err_ error) { req_ := &graphql.Request{ OpName: "QueryWithEnums", Query: QueryWithEnums_Operation, } - var err_ error data_ = &QueryWithEnumsResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-ExportOperations-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-ExportOperations-testdata-queries-generated.go index 782538c8..0c6d412e 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-ExportOperations-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-ExportOperations-testdata-queries-generated.go @@ -34,7 +34,7 @@ type SimpleQueryUser struct { // GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface. func (v *SimpleQueryUser) GetId() string { return v.Id } -// The query, mutation or subscription executed by SimpleQuery. +// The query executed by SimpleQuery. const SimpleQuery_Operation = ` query SimpleQuery { user { @@ -46,12 +46,11 @@ query SimpleQuery { func SimpleQuery( ctx_ context.Context, client_ graphql.Client, -) (data_ *SimpleQueryResponse, err error) { +) (data_ *SimpleQueryResponse, err_ error) { req_ := &graphql.Request{ OpName: "SimpleQuery", Query: SimpleQuery_Operation, } - var err_ error data_ = &SimpleQueryResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-Extensions-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-Extensions-testdata-queries-generated.go index 0df568fb..e5839420 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-Extensions-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-Extensions-testdata-queries-generated.go @@ -34,7 +34,7 @@ type SimpleQueryUser struct { // GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface. func (v *SimpleQueryUser) GetId() string { return v.Id } -// The query, mutation or subscription executed by SimpleQuery. +// The query executed by SimpleQuery. const SimpleQuery_Operation = ` query SimpleQuery { user { @@ -46,12 +46,11 @@ query SimpleQuery { func SimpleQuery( ctx_ context.Context, client_ graphql.Client, -) (data_ *SimpleQueryResponse, ext_ map[string]interface{}, err error) { +) (data_ *SimpleQueryResponse, ext_ map[string]interface{}, err_ error) { req_ := &graphql.Request{ OpName: "SimpleQuery", Query: SimpleQuery_Operation, } - var err_ error data_ = &SimpleQueryResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-NoContext-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-NoContext-testdata-queries-generated.go index 694fdee1..7322f854 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-NoContext-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-NoContext-testdata-queries-generated.go @@ -32,7 +32,7 @@ type SimpleQueryUser struct { // GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface. func (v *SimpleQueryUser) GetId() string { return v.Id } -// The query, mutation or subscription executed by SimpleQuery. +// The query executed by SimpleQuery. const SimpleQuery_Operation = ` query SimpleQuery { user { @@ -43,12 +43,11 @@ query SimpleQuery { func SimpleQuery( client_ graphql.Client, -) (data_ *SimpleQueryResponse, err error) { +) (data_ *SimpleQueryResponse, err_ error) { req_ := &graphql.Request{ OpName: "SimpleQuery", Query: SimpleQuery_Operation, } - var err_ error data_ = &SimpleQueryResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalGeneric-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalGeneric-testdata-queries-generated.go index c95c65e5..29b8d9ef 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalGeneric-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalGeneric-testdata-queries-generated.go @@ -82,7 +82,7 @@ type __ListInputQueryInput struct { // GetNames returns __ListInputQueryInput.Names, and is useful for accessing the field via an interface. func (v *__ListInputQueryInput) GetNames() []testutil.Option[string] { return v.Names } -// The query, mutation or subscription executed by ListInputQuery. +// The query executed by ListInputQuery. const ListInputQuery_Operation = ` query ListInputQuery ($names: [String]) { user(query: {names:$names}) { @@ -95,7 +95,7 @@ func ListInputQuery( ctx_ context.Context, client_ graphql.Client, names []testutil.Option[string], -) (data_ *ListInputQueryResponse, err error) { +) (data_ *ListInputQueryResponse, err_ error) { req_ := &graphql.Request{ OpName: "ListInputQuery", Query: ListInputQuery_Operation, @@ -103,7 +103,6 @@ func ListInputQuery( Names: names, }, } - var err_ error data_ = &ListInputQueryResponse{} resp_ := &graphql.Response{Data: data_} @@ -117,7 +116,7 @@ func ListInputQuery( return data_, err_ } -// The query, mutation or subscription executed by QueryWithSlices. +// The query executed by QueryWithSlices. const QueryWithSlices_Operation = ` query QueryWithSlices { user { @@ -132,12 +131,11 @@ query QueryWithSlices { func QueryWithSlices( ctx_ context.Context, client_ graphql.Client, -) (data_ *QueryWithSlicesResponse, err error) { +) (data_ *QueryWithSlicesResponse, err_ error) { req_ := &graphql.Request{ OpName: "QueryWithSlices", Query: QueryWithSlices_Operation, } - var err_ error data_ = &QueryWithSlicesResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointer-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointer-testdata-queries-generated.go index 7e943e36..da8ee585 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointer-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointer-testdata-queries-generated.go @@ -139,7 +139,7 @@ type __ListInputQueryInput struct { // GetNames returns __ListInputQueryInput.Names, and is useful for accessing the field via an interface. func (v *__ListInputQueryInput) GetNames() []*string { return v.Names } -// The query, mutation or subscription executed by ListInputQuery. +// The query executed by ListInputQuery. const ListInputQuery_Operation = ` query ListInputQuery ($names: [String]) { user(query: {names:$names}) { @@ -152,7 +152,7 @@ func ListInputQuery( ctx_ context.Context, client_ graphql.Client, names []*string, -) (data_ *ListInputQueryResponse, err error) { +) (data_ *ListInputQueryResponse, err_ error) { req_ := &graphql.Request{ OpName: "ListInputQuery", Query: ListInputQuery_Operation, @@ -160,7 +160,6 @@ func ListInputQuery( Names: names, }, } - var err_ error data_ = &ListInputQueryResponse{} resp_ := &graphql.Response{Data: data_} @@ -174,7 +173,7 @@ func ListInputQuery( return data_, err_ } -// The query, mutation or subscription executed by QueryWithSlices. +// The query executed by QueryWithSlices. const QueryWithSlices_Operation = ` query QueryWithSlices { user { @@ -189,12 +188,11 @@ query QueryWithSlices { func QueryWithSlices( ctx_ context.Context, client_ graphql.Client, -) (data_ *QueryWithSlicesResponse, err error) { +) (data_ *QueryWithSlicesResponse, err_ error) { req_ := &graphql.Request{ OpName: "QueryWithSlices", Query: QueryWithSlices_Operation, } - var err_ error data_ = &QueryWithSlicesResponse{} resp_ := &graphql.Response{Data: data_} @@ -208,7 +206,7 @@ func QueryWithSlices( return data_, err_ } -// The query, mutation or subscription executed by SimpleQueryNoOverride. +// The query executed by SimpleQueryNoOverride. const SimpleQueryNoOverride_Operation = ` query SimpleQueryNoOverride { user { @@ -221,12 +219,11 @@ query SimpleQueryNoOverride { func SimpleQueryNoOverride( ctx_ context.Context, client_ graphql.Client, -) (data_ *SimpleQueryNoOverrideResponse, err error) { +) (data_ *SimpleQueryNoOverrideResponse, err_ error) { req_ := &graphql.Request{ OpName: "SimpleQueryNoOverride", Query: SimpleQueryNoOverride_Operation, } - var err_ error data_ = &SimpleQueryNoOverrideResponse{} resp_ := &graphql.Response{Data: data_} @@ -240,7 +237,7 @@ func SimpleQueryNoOverride( return data_, err_ } -// The query, mutation or subscription executed by SimpleQueryWithPointerFalseOverride. +// The query executed by SimpleQueryWithPointerFalseOverride. const SimpleQueryWithPointerFalseOverride_Operation = ` query SimpleQueryWithPointerFalseOverride { user { @@ -253,12 +250,11 @@ query SimpleQueryWithPointerFalseOverride { func SimpleQueryWithPointerFalseOverride( ctx_ context.Context, client_ graphql.Client, -) (data_ *SimpleQueryWithPointerFalseOverrideResponse, err error) { +) (data_ *SimpleQueryWithPointerFalseOverrideResponse, err_ error) { req_ := &graphql.Request{ OpName: "SimpleQueryWithPointerFalseOverride", Query: SimpleQueryWithPointerFalseOverride_Operation, } - var err_ error data_ = &SimpleQueryWithPointerFalseOverrideResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalValue-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalValue-testdata-queries-generated.go index f1b477fc..bdf92446 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalValue-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalValue-testdata-queries-generated.go @@ -77,7 +77,7 @@ type __ListInputQueryInput struct { // GetNames returns __ListInputQueryInput.Names, and is useful for accessing the field via an interface. func (v *__ListInputQueryInput) GetNames() []string { return v.Names } -// The query, mutation or subscription executed by ListInputQuery. +// The query executed by ListInputQuery. const ListInputQuery_Operation = ` query ListInputQuery ($names: [String]) { user(query: {names:$names}) { @@ -90,7 +90,7 @@ func ListInputQuery( ctx_ context.Context, client_ graphql.Client, names []string, -) (data_ *ListInputQueryResponse, err error) { +) (data_ *ListInputQueryResponse, err_ error) { req_ := &graphql.Request{ OpName: "ListInputQuery", Query: ListInputQuery_Operation, @@ -98,7 +98,6 @@ func ListInputQuery( Names: names, }, } - var err_ error data_ = &ListInputQueryResponse{} resp_ := &graphql.Response{Data: data_} @@ -112,7 +111,7 @@ func ListInputQuery( return data_, err_ } -// The query, mutation or subscription executed by QueryWithSlices. +// The query executed by QueryWithSlices. const QueryWithSlices_Operation = ` query QueryWithSlices { user { @@ -127,12 +126,11 @@ query QueryWithSlices { func QueryWithSlices( ctx_ context.Context, client_ graphql.Client, -) (data_ *QueryWithSlicesResponse, err error) { +) (data_ *QueryWithSlicesResponse, err_ error) { req_ := &graphql.Request{ OpName: "QueryWithSlices", Query: QueryWithSlices_Operation, } - var err_ error data_ = &QueryWithSlicesResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-PackageBindings-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-PackageBindings-testdata-queries-generated.go index be14a82c..52057886 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-PackageBindings-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-PackageBindings-testdata-queries-generated.go @@ -35,7 +35,7 @@ type SimpleQueryUser struct { // GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface. func (v *SimpleQueryUser) GetId() testutil.ID { return v.Id } -// The query, mutation or subscription executed by SimpleQuery. +// The query executed by SimpleQuery. const SimpleQuery_Operation = ` query SimpleQuery { user { @@ -47,12 +47,11 @@ query SimpleQuery { func SimpleQuery( ctx_ context.Context, client_ graphql.Client, -) (data_ *SimpleQueryResponse, err error) { +) (data_ *SimpleQueryResponse, err_ error) { req_ := &graphql.Request{ OpName: "SimpleQuery", Query: SimpleQuery_Operation, } - var err_ error data_ = &SimpleQueryResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-PackageName-testdata-queries-myfile.go b/generate/testdata/snapshots/TestGenerateWithConfig-PackageName-testdata-queries-myfile.go index cb671179..2be81344 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-PackageName-testdata-queries-myfile.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-PackageName-testdata-queries-myfile.go @@ -34,7 +34,7 @@ type SimpleQueryUser struct { // GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface. func (v *SimpleQueryUser) GetId() string { return v.Id } -// The query, mutation or subscription executed by SimpleQuery. +// The query executed by SimpleQuery. const SimpleQuery_Operation = ` query SimpleQuery { user { @@ -46,12 +46,11 @@ query SimpleQuery { func SimpleQuery( ctx_ context.Context, client_ graphql.Client, -) (data_ *SimpleQueryResponse, err error) { +) (data_ *SimpleQueryResponse, err_ error) { req_ := &graphql.Request{ OpName: "SimpleQuery", Query: SimpleQuery_Operation, } - var err_ error data_ = &SimpleQueryResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-StructReferences-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-StructReferences-testdata-queries-generated.go index b7ef2bc9..507f60ff 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-StructReferences-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-StructReferences-testdata-queries-generated.go @@ -226,7 +226,7 @@ type __InputObjectQueryInput struct { // GetQuery returns __InputObjectQueryInput.Query, and is useful for accessing the field via an interface. func (v *__InputObjectQueryInput) GetQuery() *UserQueryInput { return v.Query } -// The query, mutation or subscription executed by InputObjectQuery. +// The query executed by InputObjectQuery. const InputObjectQuery_Operation = ` query InputObjectQuery ($query: UserQueryInput) { user(query: $query) { @@ -239,7 +239,7 @@ func InputObjectQuery( ctx_ context.Context, client_ graphql.Client, query *UserQueryInput, -) (data_ *InputObjectQueryResponse, err error) { +) (data_ *InputObjectQueryResponse, err_ error) { req_ := &graphql.Request{ OpName: "InputObjectQuery", Query: InputObjectQuery_Operation, @@ -247,7 +247,6 @@ func InputObjectQuery( Query: query, }, } - var err_ error data_ = &InputObjectQueryResponse{} resp_ := &graphql.Response{Data: data_} @@ -261,7 +260,7 @@ func InputObjectQuery( return data_, err_ } -// The query, mutation or subscription executed by QueryWithStructs. +// The query executed by QueryWithStructs. const QueryWithStructs_Operation = ` query QueryWithStructs { user { @@ -276,12 +275,11 @@ query QueryWithStructs { func QueryWithStructs( ctx_ context.Context, client_ graphql.Client, -) (data_ *QueryWithStructsResponse, err error) { +) (data_ *QueryWithStructsResponse, err_ error) { req_ := &graphql.Request{ OpName: "QueryWithStructs", Query: QueryWithStructs_Operation, } - var err_ error data_ = &QueryWithStructsResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-StructReferencesAndOptionalPointer-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-StructReferencesAndOptionalPointer-testdata-queries-generated.go index 6330a4c5..7e1b2b13 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-StructReferencesAndOptionalPointer-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-StructReferencesAndOptionalPointer-testdata-queries-generated.go @@ -229,7 +229,7 @@ type __InputObjectQueryInput struct { // GetQuery returns __InputObjectQueryInput.Query, and is useful for accessing the field via an interface. func (v *__InputObjectQueryInput) GetQuery() *UserQueryInput { return v.Query } -// The query, mutation or subscription executed by InputObjectQuery. +// The query executed by InputObjectQuery. const InputObjectQuery_Operation = ` query InputObjectQuery ($query: UserQueryInput) { user(query: $query) { @@ -242,7 +242,7 @@ func InputObjectQuery( ctx_ context.Context, client_ graphql.Client, query *UserQueryInput, -) (data_ *InputObjectQueryResponse, err error) { +) (data_ *InputObjectQueryResponse, err_ error) { req_ := &graphql.Request{ OpName: "InputObjectQuery", Query: InputObjectQuery_Operation, @@ -250,7 +250,6 @@ func InputObjectQuery( Query: query, }, } - var err_ error data_ = &InputObjectQueryResponse{} resp_ := &graphql.Response{Data: data_} @@ -264,7 +263,7 @@ func InputObjectQuery( return data_, err_ } -// The query, mutation or subscription executed by QueryWithStructs. +// The query executed by QueryWithStructs. const QueryWithStructs_Operation = ` query QueryWithStructs { user { @@ -279,12 +278,11 @@ query QueryWithStructs { func QueryWithStructs( ctx_ context.Context, client_ graphql.Client, -) (data_ *QueryWithStructsResponse, err error) { +) (data_ *QueryWithStructsResponse, err_ error) { req_ := &graphql.Request{ OpName: "QueryWithStructs", Query: QueryWithStructs_Operation, } - var err_ error data_ = &QueryWithStructsResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-Subpackage-testdata-queries-mypkg-myfile.go b/generate/testdata/snapshots/TestGenerateWithConfig-Subpackage-testdata-queries-mypkg-myfile.go index cb671179..2be81344 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-Subpackage-testdata-queries-mypkg-myfile.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-Subpackage-testdata-queries-mypkg-myfile.go @@ -34,7 +34,7 @@ type SimpleQueryUser struct { // GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface. func (v *SimpleQueryUser) GetId() string { return v.Id } -// The query, mutation or subscription executed by SimpleQuery. +// The query executed by SimpleQuery. const SimpleQuery_Operation = ` query SimpleQuery { user { @@ -46,12 +46,11 @@ query SimpleQuery { func SimpleQuery( ctx_ context.Context, client_ graphql.Client, -) (data_ *SimpleQueryResponse, err error) { +) (data_ *SimpleQueryResponse, err_ error) { req_ := &graphql.Request{ OpName: "SimpleQuery", Query: SimpleQuery_Operation, } - var err_ error data_ = &SimpleQueryResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-SubpackageConfig-testdata-queries-mypkg-myfile.go b/generate/testdata/snapshots/TestGenerateWithConfig-SubpackageConfig-testdata-queries-mypkg-myfile.go index cb671179..2be81344 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-SubpackageConfig-testdata-queries-mypkg-myfile.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-SubpackageConfig-testdata-queries-mypkg-myfile.go @@ -34,7 +34,7 @@ type SimpleQueryUser struct { // GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface. func (v *SimpleQueryUser) GetId() string { return v.Id } -// The query, mutation or subscription executed by SimpleQuery. +// The query executed by SimpleQuery. const SimpleQuery_Operation = ` query SimpleQuery { user { @@ -46,12 +46,11 @@ query SimpleQuery { func SimpleQuery( ctx_ context.Context, client_ graphql.Client, -) (data_ *SimpleQueryResponse, err error) { +) (data_ *SimpleQueryResponse, err_ error) { req_ := &graphql.Request{ OpName: "SimpleQuery", Query: SimpleQuery_Operation, } - var err_ error data_ = &SimpleQueryResponse{} resp_ := &graphql.Response{Data: data_} diff --git a/internal/integration/generated.go b/internal/integration/generated.go index 177ae054..44763abd 100644 --- a/internal/integration/generated.go +++ b/internal/integration/generated.go @@ -3097,12 +3097,11 @@ subscription count { func count( ctx_ context.Context, client_ graphql.Client, -) (dataChan_ chan countWsResponse, errChan_ chan error, err error) { +) (dataChan_ chan countWsResponse, errChan_ chan error, err_ error) { req_ := &graphql.Request{ OpName: "count", Query: count_Operation, } - var err_ error dataChan_ = make(chan countWsResponse, 1) respChan_ := make(chan json.RawMessage, 1) @@ -3163,7 +3162,7 @@ func createUser( ctx_ context.Context, client_ graphql.Client, user NewUser, -) (data_ *createUserResponse, ext_ map[string]interface{}, err error) { +) (data_ *createUserResponse, ext_ map[string]interface{}, err_ error) { req_ := &graphql.Request{ OpName: "createUser", Query: createUser_Operation, @@ -3171,7 +3170,6 @@ func createUser( User: user, }, } - var err_ error data_ = &createUserResponse{} resp_ := &graphql.Response{Data: data_} @@ -3198,12 +3196,11 @@ query failingQuery { func failingQuery( ctx_ context.Context, client_ graphql.Client, -) (data_ *failingQueryResponse, ext_ map[string]interface{}, err error) { +) (data_ *failingQueryResponse, ext_ map[string]interface{}, err_ error) { req_ := &graphql.Request{ OpName: "failingQuery", Query: failingQuery_Operation, } - var err_ error data_ = &failingQueryResponse{} resp_ := &graphql.Response{Data: data_} @@ -3232,7 +3229,7 @@ func queryWithCustomMarshal( ctx_ context.Context, client_ graphql.Client, date time.Time, -) (data_ *queryWithCustomMarshalResponse, ext_ map[string]interface{}, err error) { +) (data_ *queryWithCustomMarshalResponse, ext_ map[string]interface{}, err_ error) { req_ := &graphql.Request{ OpName: "queryWithCustomMarshal", Query: queryWithCustomMarshal_Operation, @@ -3240,7 +3237,6 @@ func queryWithCustomMarshal( Date: date, }, } - var err_ error data_ = &queryWithCustomMarshalResponse{} resp_ := &graphql.Response{Data: data_} @@ -3270,7 +3266,7 @@ func queryWithCustomMarshalOptional( client_ graphql.Client, date *time.Time, id *string, -) (data_ *queryWithCustomMarshalOptionalResponse, ext_ map[string]interface{}, err error) { +) (data_ *queryWithCustomMarshalOptionalResponse, ext_ map[string]interface{}, err_ error) { req_ := &graphql.Request{ OpName: "queryWithCustomMarshalOptional", Query: queryWithCustomMarshalOptional_Operation, @@ -3279,7 +3275,6 @@ func queryWithCustomMarshalOptional( Id: id, }, } - var err_ error data_ = &queryWithCustomMarshalOptionalResponse{} resp_ := &graphql.Response{Data: data_} @@ -3308,7 +3303,7 @@ func queryWithCustomMarshalSlice( ctx_ context.Context, client_ graphql.Client, dates []time.Time, -) (data_ *queryWithCustomMarshalSliceResponse, ext_ map[string]interface{}, err error) { +) (data_ *queryWithCustomMarshalSliceResponse, ext_ map[string]interface{}, err_ error) { req_ := &graphql.Request{ OpName: "queryWithCustomMarshalSlice", Query: queryWithCustomMarshalSlice_Operation, @@ -3316,7 +3311,6 @@ func queryWithCustomMarshalSlice( Dates: dates, }, } - var err_ error data_ = &queryWithCustomMarshalSliceResponse{} resp_ := &graphql.Response{Data: data_} @@ -3379,7 +3373,7 @@ func queryWithFlatten( ctx_ context.Context, client_ graphql.Client, ids []string, -) (data_ *QueryFragment, ext_ map[string]interface{}, err error) { +) (data_ *QueryFragment, ext_ map[string]interface{}, err_ error) { req_ := &graphql.Request{ OpName: "queryWithFlatten", Query: queryWithFlatten_Operation, @@ -3387,7 +3381,6 @@ func queryWithFlatten( Ids: ids, }, } - var err_ error data_ = &QueryFragment{} resp_ := &graphql.Response{Data: data_} @@ -3444,7 +3437,7 @@ func queryWithFragments( ctx_ context.Context, client_ graphql.Client, ids []string, -) (data_ *queryWithFragmentsResponse, ext_ map[string]interface{}, err error) { +) (data_ *queryWithFragmentsResponse, ext_ map[string]interface{}, err_ error) { req_ := &graphql.Request{ OpName: "queryWithFragments", Query: queryWithFragments_Operation, @@ -3452,7 +3445,6 @@ func queryWithFragments( Ids: ids, }, } - var err_ error data_ = &queryWithFragmentsResponse{} resp_ := &graphql.Response{Data: data_} @@ -3481,7 +3473,7 @@ func queryWithInterfaceListField( ctx_ context.Context, client_ graphql.Client, ids []string, -) (data_ *queryWithInterfaceListFieldResponse, ext_ map[string]interface{}, err error) { +) (data_ *queryWithInterfaceListFieldResponse, ext_ map[string]interface{}, err_ error) { req_ := &graphql.Request{ OpName: "queryWithInterfaceListField", Query: queryWithInterfaceListField_Operation, @@ -3489,7 +3481,6 @@ func queryWithInterfaceListField( Ids: ids, }, } - var err_ error data_ = &queryWithInterfaceListFieldResponse{} resp_ := &graphql.Response{Data: data_} @@ -3518,7 +3509,7 @@ func queryWithInterfaceListPointerField( ctx_ context.Context, client_ graphql.Client, ids []string, -) (data_ *queryWithInterfaceListPointerFieldResponse, ext_ map[string]interface{}, err error) { +) (data_ *queryWithInterfaceListPointerFieldResponse, ext_ map[string]interface{}, err_ error) { req_ := &graphql.Request{ OpName: "queryWithInterfaceListPointerField", Query: queryWithInterfaceListPointerField_Operation, @@ -3526,7 +3517,6 @@ func queryWithInterfaceListPointerField( Ids: ids, }, } - var err_ error data_ = &queryWithInterfaceListPointerFieldResponse{} resp_ := &graphql.Response{Data: data_} @@ -3559,7 +3549,7 @@ func queryWithInterfaceNoFragments( ctx_ context.Context, client_ graphql.Client, id string, -) (data_ *queryWithInterfaceNoFragmentsResponse, ext_ map[string]interface{}, err error) { +) (data_ *queryWithInterfaceNoFragmentsResponse, ext_ map[string]interface{}, err_ error) { req_ := &graphql.Request{ OpName: "queryWithInterfaceNoFragments", Query: queryWithInterfaceNoFragments_Operation, @@ -3567,7 +3557,6 @@ func queryWithInterfaceNoFragments( Id: id, }, } - var err_ error data_ = &queryWithInterfaceNoFragmentsResponse{} resp_ := &graphql.Response{Data: data_} @@ -3624,7 +3613,7 @@ func queryWithNamedFragments( ctx_ context.Context, client_ graphql.Client, ids []string, -) (data_ *queryWithNamedFragmentsResponse, ext_ map[string]interface{}, err error) { +) (data_ *queryWithNamedFragmentsResponse, ext_ map[string]interface{}, err_ error) { req_ := &graphql.Request{ OpName: "queryWithNamedFragments", Query: queryWithNamedFragments_Operation, @@ -3632,7 +3621,6 @@ func queryWithNamedFragments( Ids: ids, }, } - var err_ error data_ = &queryWithNamedFragmentsResponse{} resp_ := &graphql.Response{Data: data_} @@ -3661,7 +3649,7 @@ func queryWithOmitempty( ctx_ context.Context, client_ graphql.Client, id string, -) (data_ *queryWithOmitemptyResponse, ext_ map[string]interface{}, err error) { +) (data_ *queryWithOmitemptyResponse, ext_ map[string]interface{}, err_ error) { req_ := &graphql.Request{ OpName: "queryWithOmitempty", Query: queryWithOmitempty_Operation, @@ -3669,7 +3657,6 @@ func queryWithOmitempty( Id: id, }, } - var err_ error data_ = &queryWithOmitemptyResponse{} resp_ := &graphql.Response{Data: data_} @@ -3698,7 +3685,7 @@ func queryWithVariables( ctx_ context.Context, client_ graphql.Client, id string, -) (data_ *queryWithVariablesResponse, ext_ map[string]interface{}, err error) { +) (data_ *queryWithVariablesResponse, ext_ map[string]interface{}, err_ error) { req_ := &graphql.Request{ OpName: "queryWithVariables", Query: queryWithVariables_Operation, @@ -3706,7 +3693,6 @@ func queryWithVariables( Id: id, }, } - var err_ error data_ = &queryWithVariablesResponse{} resp_ := &graphql.Response{Data: data_} @@ -3734,12 +3720,11 @@ query simpleQuery { func simpleQuery( ctx_ context.Context, client_ graphql.Client, -) (data_ *simpleQueryResponse, ext_ map[string]interface{}, err error) { +) (data_ *simpleQueryResponse, ext_ map[string]interface{}, err_ error) { req_ := &graphql.Request{ OpName: "simpleQuery", Query: simpleQuery_Operation, } - var err_ error data_ = &simpleQueryResponse{} resp_ := &graphql.Response{Data: data_} @@ -3767,12 +3752,11 @@ query simpleQueryExt { func simpleQueryExt( ctx_ context.Context, client_ graphql.Client, -) (data_ *simpleQueryExtResponse, ext_ map[string]interface{}, err error) { +) (data_ *simpleQueryExtResponse, ext_ map[string]interface{}, err_ error) { req_ := &graphql.Request{ OpName: "simpleQueryExt", Query: simpleQueryExt_Operation, } - var err_ error data_ = &simpleQueryExtResponse{} resp_ := &graphql.Response{Data: data_} From 3cd742ca338129d78d11eade53379526b8db090d Mon Sep 17 00:00:00 2001 From: matthieu4294967296moineau Date: Tue, 12 Sep 2023 15:15:52 +0200 Subject: [PATCH 14/35] private websocket constants --- graphql/client.go | 2 +- graphql/websocket.go | 52 ++++++++++++++++++++++---------------------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/graphql/client.go b/graphql/client.go index 289b6dbc..81170ea2 100644 --- a/graphql/client.go +++ b/graphql/client.go @@ -268,7 +268,7 @@ func (c *client) CloseWebSocket() { if err != nil { c.wsClient.errChan <- err } - err = c.wsClient.conn.WriteMessage(CloseMessage, formatCloseMessage(CloseNormalClosure, "")) + err = c.wsClient.conn.WriteMessage(closeMessage, formatCloseMessage(closeNormalClosure, "")) if err != nil { c.wsClient.errChan <- err } diff --git a/graphql/websocket.go b/graphql/websocket.go index 4965c6e6..284bb1de 100644 --- a/graphql/websocket.go +++ b/graphql/websocket.go @@ -21,43 +21,43 @@ const ( // Close codes defined in RFC 6455, section 11.7. const ( - CloseNormalClosure = 1000 - CloseGoingAway = 1001 - CloseProtocolError = 1002 - CloseUnsupportedData = 1003 - CloseNoStatusReceived = 1005 - CloseAbnormalClosure = 1006 - CloseInvalidFramePayloadData = 1007 - ClosePolicyViolation = 1008 - CloseMessageTooBig = 1009 - CloseMandatoryExtension = 1010 - CloseInternalServerErr = 1011 - CloseServiceRestart = 1012 - CloseTryAgainLater = 1013 - CloseTLSHandshake = 1015 + closeNormalClosure = 1000 + closeGoingAway = 1001 + closeProtocolError = 1002 + closeUnsupportedData = 1003 + closeNoStatusReceived = 1005 + closeAbnormalClosure = 1006 + closeInvalidFramePayloadData = 1007 + closePolicyViolation = 1008 + closeMessageTooBig = 1009 + closeMandatoryExtension = 1010 + closeInternalServerErr = 1011 + closeServiceRestart = 1012 + closeTryAgainLater = 1013 + closeTLSHandshake = 1015 ) // The message types are defined in RFC 6455, section 11.8. const ( - // TextMessage denotes a text data message. The text message payload is + // textMessage denotes a text data message. The text message payload is // interpreted as UTF-8 encoded text data. - TextMessage = 1 + textMessage = 1 - // BinaryMessage denotes a binary data message. - BinaryMessage = 2 + // binaryMessage denotes a binary data message. + binaryMessage = 2 - // CloseMessage denotes a close control message. The optional message + // closeMessage denotes a close control message. The optional message // payload contains a numeric code and text. Use the FormatCloseMessage // function to format a close message payload. - CloseMessage = 8 + closeMessage = 8 - // PingMessage denotes a ping control message. The optional message payload + // pingMessage denotes a ping control message. The optional message payload // is UTF-8 encoded text. - PingMessage = 9 + pingMessage = 9 - // PongMessage denotes a pong control message. The optional message payload + // pongMessage denotes a pong control message. The optional message payload // is UTF-8 encoded text. - PongMessage = 10 + pongMessage = 10 ) type webSocketClient struct { @@ -104,7 +104,7 @@ func (w *webSocketClient) sendStructAsJSON(object any) error { if err != nil { return err } - return w.conn.WriteMessage(TextMessage, jsonBytes) + return w.conn.WriteMessage(textMessage, jsonBytes) } func (w *webSocketClient) waitForConnAck() error { @@ -173,7 +173,7 @@ func forwardWebSocketData(respChan chan json.RawMessage, message []byte) error { // formatCloseMessage formats closeCode and text as a WebSocket close message. // An empty message is returned for code CloseNoStatusReceived. func formatCloseMessage(closeCode int, text string) []byte { - if closeCode == CloseNoStatusReceived { + if closeCode == closeNoStatusReceived { // Return empty message because it's illegal to send // CloseNoStatusReceived. Return non-nil value in case application // checks for nil. From b60f9e256217cd42b9d8f496b1aee0ecce98aa17 Mon Sep 17 00:00:00 2001 From: matthieu4294967296moineau Date: Wed, 13 Sep 2023 10:37:06 +0200 Subject: [PATCH 15/35] private websocket const --- graphql/websocket.go | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/graphql/websocket.go b/graphql/websocket.go index 284bb1de..8ac93cc1 100644 --- a/graphql/websocket.go +++ b/graphql/websocket.go @@ -21,20 +21,8 @@ const ( // Close codes defined in RFC 6455, section 11.7. const ( - closeNormalClosure = 1000 - closeGoingAway = 1001 - closeProtocolError = 1002 - closeUnsupportedData = 1003 - closeNoStatusReceived = 1005 - closeAbnormalClosure = 1006 - closeInvalidFramePayloadData = 1007 - closePolicyViolation = 1008 - closeMessageTooBig = 1009 - closeMandatoryExtension = 1010 - closeInternalServerErr = 1011 - closeServiceRestart = 1012 - closeTryAgainLater = 1013 - closeTLSHandshake = 1015 + closeNormalClosure = 1000 + closeNoStatusReceived = 1005 ) // The message types are defined in RFC 6455, section 11.8. @@ -43,21 +31,10 @@ const ( // interpreted as UTF-8 encoded text data. textMessage = 1 - // binaryMessage denotes a binary data message. - binaryMessage = 2 - // closeMessage denotes a close control message. The optional message // payload contains a numeric code and text. Use the FormatCloseMessage // function to format a close message payload. closeMessage = 8 - - // pingMessage denotes a ping control message. The optional message payload - // is UTF-8 encoded text. - pingMessage = 9 - - // pongMessage denotes a pong control message. The optional message payload - // is UTF-8 encoded text. - pongMessage = 10 ) type webSocketClient struct { From 2ab3664a85eafc95b49a33b716040e20b8273598 Mon Sep 17 00:00:00 2001 From: matthieu4294967296moineau Date: Thu, 14 Sep 2023 09:43:14 +0200 Subject: [PATCH 16/35] refactored DialContext so that it wors with x/net/websocket --- graphql/client.go | 6 ++---- internal/integration/roundtrip.go | 5 +++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/graphql/client.go b/graphql/client.go index 81170ea2..5fefb633 100644 --- a/graphql/client.go +++ b/graphql/client.go @@ -149,7 +149,7 @@ type Doer interface { // Dialer encapsulates DialContext method and is similar to [github.com/gorilla/websocket] // [*websocket.Dialer] method type Dialer interface { - DialContext(ctx context.Context, urlStr string, requestHeader http.Header) (WSConn, *http.Response, error) + DialContext(ctx context.Context, urlStr string, requestHeader http.Header) (WSConn, error) } // WSConn encapsulates basic methods for a webSocket connection, taking model on @@ -275,14 +275,12 @@ func (c *client) CloseWebSocket() { } func (c *client) subscribeAndListen(ctx context.Context, req *Request, respChan chan json.RawMessage) error { - var res *http.Response var err error w := c.wsClient - w.conn, res, err = w.Dialer.DialContext(ctx, c.endpoint, w.Header) + w.conn, err = w.Dialer.DialContext(ctx, c.endpoint, w.Header) if err != nil { return err } - defer res.Body.Close() err = w.sendInit() if err != nil { diff --git a/internal/integration/roundtrip.go b/internal/integration/roundtrip.go index f14c2590..2a1ec861 100644 --- a/internal/integration/roundtrip.go +++ b/internal/integration/roundtrip.go @@ -141,9 +141,10 @@ type MyDialer struct { *websocket.Dialer } -func (md *MyDialer) DialContext(ctx context.Context, urlStr string, requestHeader http.Header) (graphql.WSConn, *http.Response, error) { +func (md *MyDialer) DialContext(ctx context.Context, urlStr string, requestHeader http.Header) (graphql.WSConn, error) { conn, resp, err := md.Dialer.DialContext(ctx, urlStr, requestHeader) - return graphql.WSConn(conn), resp, err + resp.Body.Close() + return graphql.WSConn(conn), err } func newRoundtripWebScoketClient(t *testing.T, endpoint string) graphql.Client { From 2a85383ea8d9ef440ed2be3e63bb8da0c99af808 Mon Sep 17 00:00:00 2001 From: matthieu4294967296moineau Date: Thu, 14 Sep 2023 10:52:12 +0200 Subject: [PATCH 17/35] separate WebSocketClient interface --- generate/operation.go.tmpl | 2 +- ...tion.graphql-SimpleSubscription.graphql.go | 2 +- graphql/client.go | 59 ++++++++++--------- graphql/websocket.go | 8 --- internal/integration/generated.go | 2 +- internal/integration/integration_test.go | 12 ---- internal/integration/roundtrip.go | 11 ++-- 7 files changed, 41 insertions(+), 55 deletions(-) diff --git a/generate/operation.go.tmpl b/generate/operation.go.tmpl index cc0d2e5e..1d32c88c 100644 --- a/generate/operation.go.tmpl +++ b/generate/operation.go.tmpl @@ -7,7 +7,7 @@ func {{.Name}}( ctx_ {{ref .Config.ContextType}}, {{end}} {{- if not .Config.ClientGetter -}} - client_ {{ref "github.com/Khan/genqlient/graphql.Client"}}, + client_ {{if eq .Type "subscription"}}{{ref "github.com/Khan/genqlient/graphql.WebSocketClient"}}{{else}}{{ref "github.com/Khan/genqlient/graphql.Client"}}{{end}}, {{end}} {{- if .Input -}} {{- range .Input.Fields -}} diff --git a/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go index 24ced38d..81c14ce5 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go @@ -26,7 +26,7 @@ subscription SimpleSubscription { // To close the connection, use [graphql.Client.CloseWebSocket()] func SimpleSubscription( - client_ graphql.Client, + client_ graphql.WebSocketClient, ) (dataChan_ chan SimpleSubscriptionWsResponse, errChan_ chan error, err_ error) { req_ := &graphql.Request{ OpName: "SimpleSubscription", diff --git a/graphql/client.go b/graphql/client.go index 5fefb633..b691ac14 100644 --- a/graphql/client.go +++ b/graphql/client.go @@ -38,7 +38,9 @@ type Client interface { req *Request, resp *Response, ) error +} +type WebSocketClient interface { // DialWebSocket must open a webSocket connection and subscribe to an endpoint // of the client's GraphQL API. // @@ -69,11 +71,18 @@ type Client interface { type client struct { httpClient Doer - wsClient *webSocketClient endpoint string method string } +type webSocketClient struct { + Dialer Dialer + Header http.Header + conn WSConn + errChan chan error + endpoint string +} + // NewClient returns a [Client] which makes requests to the given endpoint, // suitable for most users. // @@ -90,7 +99,7 @@ type client struct { // // [example/main.go]: https://github.com/Khan/genqlient/blob/main/example/main.go#L12-L20 func NewClient(endpoint string, httpClient Doer) Client { - return newClient(endpoint, httpClient, http.MethodPost, nil) + return newClient(endpoint, httpClient, http.MethodPost) } // NewClientUsingGet returns a [Client] which makes GET requests to the given @@ -111,32 +120,32 @@ func NewClient(endpoint string, httpClient Doer) Client { // // [example/main.go]: https://github.com/Khan/genqlient/blob/main/example/main.go#L12-L20 func NewClientUsingGet(endpoint string, httpClient Doer) Client { - return newClient(endpoint, httpClient, http.MethodGet, nil) + return newClient(endpoint, httpClient, http.MethodGet) } -// NewClientUsingWebSocket returns a [Client] which makes subscription requests +// NewClientUsingWebSocket returns a [WebSocketClient] which makes subscription requests // to the given endpoint using webSocket. // // The client does not support queries nor mutations, and will return an error // if passed a request that attempts one. -func NewClientUsingWebSocket(endpoint string, wsDialer Dialer, headers http.Header) Client { +func NewClientUsingWebSocket(endpoint string, wsDialer Dialer, headers http.Header) WebSocketClient { if headers == nil { headers = http.Header{} } headers.Add("Sec-WebSocket-Protocol", "graphql-transport-ws") - wsClient := webSocketClient{ - Dialer: wsDialer, - Header: headers, - errChan: make(chan error, 1), + return &webSocketClient{ + Dialer: wsDialer, + Header: headers, + endpoint: endpoint, + errChan: make(chan error, 1), } - return newClient(endpoint, nil, webSocketMethod, &wsClient) } -func newClient(endpoint string, httpClient Doer, method string, wsClient *webSocketClient) Client { +func newClient(endpoint string, httpClient Doer, method string) Client { if httpClient == nil || httpClient == (*http.Client)(nil) { httpClient = http.DefaultClient } - return &client{httpClient, wsClient, endpoint, method} + return &client{httpClient, endpoint, method} } // Doer encapsulates the methods from [*http.Client] needed by [Client]. @@ -240,10 +249,7 @@ func (c *client) MakeRequest(ctx context.Context, req *Request, resp *Response) return nil } -func (c *client) DialWebSocket(ctx context.Context, req *Request, respChan chan json.RawMessage) (errChan chan error, err error) { - if c.method != webSocketMethod { - return nil, errors.New("client does not support websocket") - } +func (w *webSocketClient) DialWebSocket(ctx context.Context, req *Request, respChan chan json.RawMessage) (errChan chan error, err error) { if req.Query != "" { if strings.HasPrefix(strings.TrimSpace(req.Query), "query") { return nil, errors.New("client does not support queries") @@ -253,31 +259,30 @@ func (c *client) DialWebSocket(ctx context.Context, req *Request, respChan chan } } - err = c.subscribeAndListen( + err = w.subscribeAndListen( ctx, req, respChan, ) - return c.wsClient.errChan, err + return w.errChan, err } -func (c *client) CloseWebSocket() { - defer c.wsClient.conn.Close() - err := c.wsClient.sendComplete() +func (w *webSocketClient) CloseWebSocket() { + defer w.conn.Close() + err := w.sendComplete() if err != nil { - c.wsClient.errChan <- err + w.errChan <- err } - err = c.wsClient.conn.WriteMessage(closeMessage, formatCloseMessage(closeNormalClosure, "")) + err = w.conn.WriteMessage(closeMessage, formatCloseMessage(closeNormalClosure, "")) if err != nil { - c.wsClient.errChan <- err + w.errChan <- err } } -func (c *client) subscribeAndListen(ctx context.Context, req *Request, respChan chan json.RawMessage) error { +func (w *webSocketClient) subscribeAndListen(ctx context.Context, req *Request, respChan chan json.RawMessage) error { var err error - w := c.wsClient - w.conn, err = w.Dialer.DialContext(ctx, c.endpoint, w.Header) + w.conn, err = w.Dialer.DialContext(ctx, w.endpoint, w.Header) if err != nil { return err } diff --git a/graphql/websocket.go b/graphql/websocket.go index 8ac93cc1..646dbc39 100644 --- a/graphql/websocket.go +++ b/graphql/websocket.go @@ -4,7 +4,6 @@ import ( "encoding/binary" "encoding/json" "fmt" - "net/http" "time" ) @@ -37,13 +36,6 @@ const ( closeMessage = 8 ) -type webSocketClient struct { - Dialer Dialer - Header http.Header - conn WSConn - errChan chan error -} - type webSocketSendMessage struct { Payload *Request `json:"payload"` Type string `json:"type"` diff --git a/internal/integration/generated.go b/internal/integration/generated.go index 44763abd..ce0229be 100644 --- a/internal/integration/generated.go +++ b/internal/integration/generated.go @@ -3096,7 +3096,7 @@ subscription count { // To close the connection, use [graphql.Client.CloseWebSocket()] func count( ctx_ context.Context, - client_ graphql.Client, + client_ graphql.WebSocketClient, ) (dataChan_ chan countWsResponse, errChan_ chan error, err_ error) { req_ := &graphql.Request{ OpName: "count", diff --git a/internal/integration/integration_test.go b/internal/integration/integration_test.go index df70d39f..0ed4520d 100644 --- a/internal/integration/integration_test.go +++ b/internal/integration/integration_test.go @@ -47,7 +47,6 @@ func TestMutation(t *testing.T) { defer server.Close() postClient := newRoundtripClient(t, server.URL) getClient := newRoundtripGetClient(t, server.URL) - wsClient := newRoundtripWebScoketClient(t, server.URL) resp, _, err := createUser(ctx, postClient, NewUser{Name: "Jack"}) require.NoError(t, err) @@ -56,9 +55,6 @@ func TestMutation(t *testing.T) { _, _, err = createUser(ctx, getClient, NewUser{Name: "Jill"}) require.Errorf(t, err, "client does not support mutations") - - _, _, err = createUser(ctx, wsClient, NewUser{Name: "Jill"}) - require.Errorf(t, err, "client does not support mutations") } func TestSubscription(t *testing.T) { @@ -68,16 +64,8 @@ func TestSubscription(t *testing.T) { ctx := context.Background() server := server.RunServer() defer server.Close() - postClient := newRoundtripClient(t, server.URL) - getClient := newRoundtripGetClient(t, server.URL) wsClient := newRoundtripWebScoketClient(t, server.URL) - _, _, err := count(ctx, getClient) - require.Errorf(t, err, "client does not support websocket") - - _, _, err = count(ctx, postClient) - require.Errorf(t, err, "client does not support websocket") - start := time.Now() respChan, errChan, err := count(ctx, wsClient) require.NoError(t, err) diff --git a/internal/integration/roundtrip.go b/internal/integration/roundtrip.go index 2a1ec861..8b386c84 100644 --- a/internal/integration/roundtrip.go +++ b/internal/integration/roundtrip.go @@ -48,6 +48,7 @@ func (t *lastResponseTransport) RoundTrip(req *http.Request) (*http.Response, er // for each request it processes. type roundtripClient struct { wrapped graphql.Client + wsWrapped graphql.WebSocketClient transport *lastResponseTransport t *testing.T } @@ -106,11 +107,11 @@ func (c *roundtripClient) MakeRequest(ctx context.Context, req *graphql.Request, } func (c *roundtripClient) DialWebSocket(ctx context.Context, req *graphql.Request, respChan chan json.RawMessage) (errChan chan error, err error) { - return c.wrapped.DialWebSocket(ctx, req, respChan) + return c.wsWrapped.DialWebSocket(ctx, req, respChan) } func (c *roundtripClient) CloseWebSocket() { - c.wrapped.CloseWebSocket() + c.wsWrapped.CloseWebSocket() } func newRoundtripClients(t *testing.T, endpoint string) []graphql.Client { @@ -147,14 +148,14 @@ func (md *MyDialer) DialContext(ctx context.Context, urlStr string, requestHeade return graphql.WSConn(conn), err } -func newRoundtripWebScoketClient(t *testing.T, endpoint string) graphql.Client { +func newRoundtripWebScoketClient(t *testing.T, endpoint string) graphql.WebSocketClient { dialer := websocket.DefaultDialer if !strings.HasPrefix(endpoint, "ws") { _, address, _ := strings.Cut(endpoint, "://") endpoint = "ws://" + address } return &roundtripClient{ - wrapped: graphql.NewClientUsingWebSocket(endpoint, &MyDialer{Dialer: dialer}, nil), - t: t, + wsWrapped: graphql.NewClientUsingWebSocket(endpoint, &MyDialer{Dialer: dialer}, nil), + t: t, } } From d032eefe21a421b147da7866d2bfee5ce4d9fc91 Mon Sep 17 00:00:00 2001 From: matthieu4294967296moineau Date: Thu, 14 Sep 2023 11:01:45 +0200 Subject: [PATCH 18/35] WebSocketClient.CloseWebSocket doc --- generate/generate.go | 2 +- ...ate-SimpleSubscription.graphql-SimpleSubscription.graphql.go | 2 +- internal/integration/generated.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/generate/generate.go b/generate/generate.go index 429ede16..07661ca9 100644 --- a/generate/generate.go +++ b/generate/generate.go @@ -282,7 +282,7 @@ func (g *generator) addOperation(op *ast.OperationDefinition) error { docComment = "// " + strings.ReplaceAll(commentLines, "\n", "\n// ") } if op.Operation == ast.Subscription { - docComment += "\n// To close the connection, use [graphql.Client.CloseWebSocket()]" + docComment += "\n// To close the connection, use [graphql.WebSocketClient.CloseWebSocket()]" } // If the filename is a pseudo-filename filename.go:startline, just diff --git a/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go index 81c14ce5..e236254e 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go @@ -24,7 +24,7 @@ subscription SimpleSubscription { } ` -// To close the connection, use [graphql.Client.CloseWebSocket()] +// To close the connection, use [graphql.WebSocketClient.CloseWebSocket()] func SimpleSubscription( client_ graphql.WebSocketClient, ) (dataChan_ chan SimpleSubscriptionWsResponse, errChan_ chan error, err_ error) { diff --git a/internal/integration/generated.go b/internal/integration/generated.go index ce0229be..fbf71bc6 100644 --- a/internal/integration/generated.go +++ b/internal/integration/generated.go @@ -3093,7 +3093,7 @@ subscription count { } ` -// To close the connection, use [graphql.Client.CloseWebSocket()] +// To close the connection, use [graphql.WebSocketClient.CloseWebSocket()] func count( ctx_ context.Context, client_ graphql.WebSocketClient, From f8a085af331309ffba37659810317257913c3b9f Mon Sep 17 00:00:00 2001 From: matthieu4294967296moineau Date: Thu, 14 Sep 2023 11:40:39 +0200 Subject: [PATCH 19/35] moved websocket 'example' to documentation; added changelog --- docs/CHANGELOG.md | 1 + docs/FAQ.md | 104 + exampleSubscription/README.md | 26 - exampleSubscription/generated.go | 80 - exampleSubscription/genqlient.graphql | 3 - exampleSubscription/genqlient.yaml | 17 - exampleSubscription/main.go | 75 - exampleSubscription/schema.graphql | 41425 ------------------------ go.mod | 2 +- go.sum | 4 +- 10 files changed, 108 insertions(+), 41629 deletions(-) delete mode 100644 exampleSubscription/README.md delete mode 100644 exampleSubscription/generated.go delete mode 100644 exampleSubscription/genqlient.graphql delete mode 100644 exampleSubscription/genqlient.yaml delete mode 100644 exampleSubscription/main.go delete mode 100644 exampleSubscription/schema.graphql diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index bec20ef4..497fdc66 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -26,6 +26,7 @@ When releasing a new version: - The new `optional: generic` allows using a generic type to represent optionality. See the [documentation](genqlient.yaml) for details. - For schemas with enum values that differ only in casing, it's now possible to disable smart-casing in genqlient.yaml; see the [documentation](genqlient.yaml) for `casing` for details. +- genqlient now supports subscriptions ### Bug fixes: - The presence of negative pointer directives, i.e., `# @genqlient(pointer: false)` are now respected even in the when `optional: pointer` is set in the configuration file. diff --git a/docs/FAQ.md b/docs/FAQ.md index 35b084c1..b7b49226 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -36,6 +36,110 @@ The URL requested will be: The client does not support mutations, and will return an error if passed a request that attempts one. +### … subscribe to an API `subscription` endpoint ? + +You will need to use a different client calling `graphql.NewClientUsingWebSocket`, passing as parameter your own websocket client. + +Here is how to configure your webSocket client to match the interfaces: + +#### Example using `github.com/gorilla/websocket` + +```go +type MyDialer struct { + *websocket.Dialer +} + +func (md *MyDialer) DialContext(ctx context.Context, urlStr string, requestHeader http.Header) (graphql.WSConn, error) { + conn, _, err := md.Dialer.DialContext(ctx, urlStr, requestHeader) + return graphql.WSConn(conn), err +} +``` + +#### Example using `golang.org/x/net/websocket` + +```go +type MyDialer struct { + dialer *net.Dialer +} + +type MyConn struct { + conn *websocket.Conn +} + +func (c MyConn) ReadMessage() (messageType int, p []byte, err error) { + if err := websocket.Message.Receive(c.conn, &p); err != nil { + return websocket.UnknownFrame, nil, err + } + return messageType, p, err +} + +func (c MyConn) WriteMessage(_ int, data []byte) error { + err := websocket.Message.Send(c.conn, data) + return err +} + +func (c MyConn) Close() error { + c.conn.Close() + return nil +} + +func (md *MyDialer) DialContext(ctx context.Context, urlStr string, requestHeader http.Header) (graphql.WSConn, error) { + if md.dialer == nil { + return nil, fmt.Errorf("nil dialer") + } + config, err := websocket.NewConfig(urlStr, "http://localhost") + if err != nil { + fmt.Println("Error creating WebSocket config:", err) + return nil, err + } + config.Dialer = md.dialer + config.Protocol = append(config.Protocol, "graphql-transport-ws") + + // Connect to the WebSocket server + conn, err := websocket.DialConfig(config) + if err != nil { + return nil, err + } + return graphql.WSConn(MyConn{conn: conn}), err +} +``` + +Once your webSocket client matches the interfaces, you can get your `graphql.WebSocketClient` and listen in +a loop for incoming messages and errors: + +```go +graphqlClient := graphql.NewClientUsingWebSocket( + "ws://localhost:8080/query", + &MyDialer{Dialer: dialer}, + headers, + ) + + respChan, errChan, err := count(context.Background(), graphqlClient) + if err != nil { + return + } + + defer graphqlClient.CloseWebSocket() + for loop := true; loop; { + select { + case msg, more := <-respChan: + if !more { + loop = false + break + } + if msg.Data != nil { + fmt.Println(msg.Data.Count) + } + if msg.Errors != nil { + fmt.Println("error:", msg.Errors) + loop = false + } + case err = <-errChan: + return + } + } +``` + ### … use an API that requires authentication? When you call `graphql.NewClient`, pass in an HTTP client that adds whatever authentication headers you need (typically by wrapping the client's `Transport`). For example: diff --git a/exampleSubscription/README.md b/exampleSubscription/README.md deleted file mode 100644 index bfe6b405..00000000 --- a/exampleSubscription/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# example of genqlient - -## Invoking the example -Create a [personal access token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) with no scopes. - -To run the example: - -```sh -$ GITHUB_TOKEN= go run . -1 -2 -3 -4 -5 -``` - -## Running genqlient - -It's already checked in to GitHub, but to regenerate `generated.go`: -```sh -go generate ./... -``` - -## Generating the schema file - -The schema file is also checked in, but to update it, download from the [GitHub API documentation](https://docs.github.com/en/graphql/overview/public-schema). diff --git a/exampleSubscription/generated.go b/exampleSubscription/generated.go deleted file mode 100644 index 12ae5a21..00000000 --- a/exampleSubscription/generated.go +++ /dev/null @@ -1,80 +0,0 @@ -// Code generated by github.com/Khan/genqlient, DO NOT EDIT. - -package main - -import ( - "context" - "encoding/json" - - "github.com/Khan/genqlient/graphql" -) - -// countResponse is returned by count on success. -type countResponse struct { - Count int `json:"count"` -} - -// GetCount returns countResponse.Count, and is useful for accessing the field via an interface. -func (v *countResponse) GetCount() int { return v.Count } - -// The subscription executed by count. -const count_Operation = ` -subscription count { - count -} -` - -// To close the connection, use [graphql.Client.CloseWebSocket()] -func count( - ctx_ context.Context, - client_ graphql.Client, -) (dataChan_ chan countWsResponse, errChan_ chan error, err_ error) { - req_ := &graphql.Request{ - OpName: "count", - Query: count_Operation, - } - - dataChan_ = make(chan countWsResponse, 1) - respChan_ := make(chan json.RawMessage, 1) - - errChan_, err_ = client_.DialWebSocket(ctx_, req_, respChan_) - if err_ != nil { - return nil, nil, err_ - } - go countForwardData(dataChan_, respChan_, errChan_) - - return dataChan_, errChan_, err_ -} - -type countWsResponse struct { - Data *countResponse `json:"data"` - Extensions map[string]interface{} `json:"extensions,omitempty"` - Errors error `json:"errors"` -} - -func countForwardData(dataChan_ chan countWsResponse, respChan_ chan json.RawMessage, errChan_ chan error) { - defer close(dataChan_) - var gqlResp graphql.Response - var wsResp countWsResponse - for { - jsonRaw, more_ := <-respChan_ - if !more_ { - return - } - err := json.Unmarshal(jsonRaw, &gqlResp) - if err != nil { - errChan_ <- err - return - } - if len(gqlResp.Errors) == 0 { - err = json.Unmarshal(jsonRaw, &wsResp) - if err != nil { - errChan_ <- err - return - } - } else { - wsResp.Errors = gqlResp.Errors - } - dataChan_ <- wsResp - } -} diff --git a/exampleSubscription/genqlient.graphql b/exampleSubscription/genqlient.graphql deleted file mode 100644 index 10d8a42e..00000000 --- a/exampleSubscription/genqlient.graphql +++ /dev/null @@ -1,3 +0,0 @@ -subscription count { - count -} diff --git a/exampleSubscription/genqlient.yaml b/exampleSubscription/genqlient.yaml deleted file mode 100644 index 7f0f5c31..00000000 --- a/exampleSubscription/genqlient.yaml +++ /dev/null @@ -1,17 +0,0 @@ -schema: schema.graphql -operations: -- genqlient.graphql -generated: generated.go -allow_broken_features: true -# needed since it doesn't match the directory name: -package: main - -# We bind github's DateTime scalar type to Go's time.Time (which conveniently -# already defines MarshalJSON and UnmarshalJSON). This means genqlient will -# use time.Time when a query requests a DateTime, and is required for custom -# scalars. -bindings: - DateTime: - type: time.Time - Time: - type: time.Time diff --git a/exampleSubscription/main.go b/exampleSubscription/main.go deleted file mode 100644 index 4ec516dd..00000000 --- a/exampleSubscription/main.go +++ /dev/null @@ -1,75 +0,0 @@ -package main - -import ( - "context" - "fmt" - "net/http" - "os" - "time" - - "github.com/Khan/genqlient/graphql" - "github.com/gorilla/websocket" -) - -type MyDialer struct { - *websocket.Dialer -} - -func (md *MyDialer) DialContext(ctx context.Context, urlStr string, requestHeader http.Header) (graphql.WSConn, *http.Response, error) { - conn, resp, err := md.Dialer.DialContext(ctx, urlStr, requestHeader) - return graphql.WSConn(conn), resp, err -} - -func main() { - var err error - defer func() { - if err != nil { - fmt.Println(err) - os.Exit(1) - } - }() - - key := os.Getenv("GITHUB_TOKEN") - if key == "" { - err = fmt.Errorf("must set GITHUB_TOKEN=") - return - } - - dialer := websocket.DefaultDialer - headers := http.Header{} - headers.Add("Authorization", "bearer "+key) - - graphqlClient := graphql.NewClientUsingWebSocket( - "wss://api.github.com/graphql", - &MyDialer{Dialer: dialer}, - headers, - ) - - respChan, errChan, err := count(context.Background(), graphqlClient) - if err != nil { - return - } - defer graphqlClient.CloseWebSocket() - for loop := true; loop; { - select { - case msg, more := <-respChan: - if !more { - loop = false - break - } - if msg.Data != nil { - fmt.Println(msg.Data) - } - if msg.Errors != nil { - fmt.Println("error:", msg.Errors) - loop = false - } - case err = <-errChan: - return - case <-time.After(time.Second * 5): - loop = false - } - } -} - -//go:generate go run github.com/Khan/genqlient genqlient.yaml diff --git a/exampleSubscription/schema.graphql b/exampleSubscription/schema.graphql deleted file mode 100644 index 78334d61..00000000 --- a/exampleSubscription/schema.graphql +++ /dev/null @@ -1,41425 +0,0 @@ -""" -Defines what type of global IDs are accepted for a mutation argument of type ID. -""" -directive @possibleTypes( - """ - Abstract type of accepted global ID - """ - abstractType: String - - """ - Accepted types of global IDs. - """ - concreteTypes: [String!]! -) on INPUT_FIELD_DEFINITION - -""" -Marks an element of a GraphQL schema as only available via a preview header -""" -directive @preview( - """ - The identifier of the API preview that toggles this field. - """ - toggledBy: String! -) on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION - -""" -Autogenerated input type of AcceptEnterpriseAdministratorInvitation -""" -input AcceptEnterpriseAdministratorInvitationInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The id of the invitation being accepted - """ - invitationId: ID! @possibleTypes(concreteTypes: ["EnterpriseAdministratorInvitation"]) -} - -""" -Autogenerated return type of AcceptEnterpriseAdministratorInvitation -""" -type AcceptEnterpriseAdministratorInvitationPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The invitation that was accepted. - """ - invitation: EnterpriseAdministratorInvitation - - """ - A message confirming the result of accepting an administrator invitation. - """ - message: String -} - -""" -Autogenerated input type of AcceptTopicSuggestion -""" -input AcceptTopicSuggestionInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The name of the suggested topic. - """ - name: String! - - """ - The Node ID of the repository. - """ - repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) -} - -""" -Autogenerated return type of AcceptTopicSuggestion -""" -type AcceptTopicSuggestionPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The accepted topic. - """ - topic: Topic -} - -""" -Represents an object which can take actions on GitHub. Typically a User or Bot. -""" -interface Actor { - """ - A URL pointing to the actor's public avatar. - """ - avatarUrl( - """ - The size of the resulting square image. - """ - size: Int - ): URI! - - """ - The username of the actor. - """ - login: String! - - """ - The HTTP path for this actor. - """ - resourcePath: URI! - - """ - The HTTP URL for this actor. - """ - url: URI! -} - -""" -Location information for an actor -""" -type ActorLocation { - """ - City - """ - city: String - - """ - Country name - """ - country: String - - """ - Country code - """ - countryCode: String - - """ - Region name - """ - region: String - - """ - Region or state code - """ - regionCode: String -} - -""" -Autogenerated input type of AddAssigneesToAssignable -""" -input AddAssigneesToAssignableInput { - """ - The id of the assignable object to add assignees to. - """ - assignableId: ID! @possibleTypes(concreteTypes: ["Issue", "PullRequest"], abstractType: "Assignable") - - """ - The id of users to add as assignees. - """ - assigneeIds: [ID!]! @possibleTypes(concreteTypes: ["User"]) - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String -} - -""" -Autogenerated return type of AddAssigneesToAssignable -""" -type AddAssigneesToAssignablePayload { - """ - The item that was assigned. - """ - assignable: Assignable - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String -} - -""" -Autogenerated input type of AddComment -""" -input AddCommentInput { - """ - The contents of the comment. - """ - body: String! - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The Node ID of the subject to modify. - """ - subjectId: ID! @possibleTypes(concreteTypes: ["Issue", "PullRequest"], abstractType: "IssueOrPullRequest") -} - -""" -Autogenerated return type of AddComment -""" -type AddCommentPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The edge from the subject's comment connection. - """ - commentEdge: IssueCommentEdge - - """ - The subject - """ - subject: Node - - """ - The edge from the subject's timeline connection. - """ - timelineEdge: IssueTimelineItemEdge -} - -""" -Autogenerated input type of AddEnterpriseSupportEntitlement -""" -input AddEnterpriseSupportEntitlementInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the Enterprise which the admin belongs to. - """ - enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) - - """ - The login of a member who will receive the support entitlement. - """ - login: String! -} - -""" -Autogenerated return type of AddEnterpriseSupportEntitlement -""" -type AddEnterpriseSupportEntitlementPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - A message confirming the result of adding the support entitlement. - """ - message: String -} - -""" -Autogenerated input type of AddLabelsToLabelable -""" -input AddLabelsToLabelableInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ids of the labels to add. - """ - labelIds: [ID!]! @possibleTypes(concreteTypes: ["Label"]) - - """ - The id of the labelable object to add labels to. - """ - labelableId: ID! @possibleTypes(concreteTypes: ["Issue", "PullRequest"], abstractType: "Labelable") -} - -""" -Autogenerated return type of AddLabelsToLabelable -""" -type AddLabelsToLabelablePayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The item that was labeled. - """ - labelable: Labelable -} - -""" -Autogenerated input type of AddProjectCard -""" -input AddProjectCardInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The content of the card. Must be a member of the ProjectCardItem union - """ - contentId: ID @possibleTypes(concreteTypes: ["Issue", "PullRequest"], abstractType: "ProjectCardItem") - - """ - The note on the card. - """ - note: String - - """ - The Node ID of the ProjectColumn. - """ - projectColumnId: ID! @possibleTypes(concreteTypes: ["ProjectColumn"]) -} - -""" -Autogenerated return type of AddProjectCard -""" -type AddProjectCardPayload { - """ - The edge from the ProjectColumn's card connection. - """ - cardEdge: ProjectCardEdge - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ProjectColumn - """ - projectColumn: ProjectColumn -} - -""" -Autogenerated input type of AddProjectColumn -""" -input AddProjectColumnInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The name of the column. - """ - name: String! - - """ - The Node ID of the project. - """ - projectId: ID! @possibleTypes(concreteTypes: ["Project"]) -} - -""" -Autogenerated return type of AddProjectColumn -""" -type AddProjectColumnPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The edge from the project's column connection. - """ - columnEdge: ProjectColumnEdge - - """ - The project - """ - project: Project -} - -""" -Autogenerated input type of AddPullRequestReviewComment -""" -input AddPullRequestReviewCommentInput { - """ - The text of the comment. - """ - body: String! - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The SHA of the commit to comment on. - """ - commitOID: GitObjectID - - """ - The comment id to reply to. - """ - inReplyTo: ID @possibleTypes(concreteTypes: ["PullRequestReviewComment"]) - - """ - The relative path of the file to comment on. - """ - path: String - - """ - The line index in the diff to comment on. - """ - position: Int - - """ - The node ID of the pull request reviewing - """ - pullRequestId: ID @possibleTypes(concreteTypes: ["PullRequest"]) - - """ - The Node ID of the review to modify. - """ - pullRequestReviewId: ID @possibleTypes(concreteTypes: ["PullRequestReview"]) -} - -""" -Autogenerated return type of AddPullRequestReviewComment -""" -type AddPullRequestReviewCommentPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The newly created comment. - """ - comment: PullRequestReviewComment - - """ - The edge from the review's comment connection. - """ - commentEdge: PullRequestReviewCommentEdge -} - -""" -Autogenerated input type of AddPullRequestReview -""" -input AddPullRequestReviewInput { - """ - The contents of the review body comment. - """ - body: String - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The review line comments. - """ - comments: [DraftPullRequestReviewComment] - - """ - The commit OID the review pertains to. - """ - commitOID: GitObjectID - - """ - The event to perform on the pull request review. - """ - event: PullRequestReviewEvent - - """ - The Node ID of the pull request to modify. - """ - pullRequestId: ID! @possibleTypes(concreteTypes: ["PullRequest"]) - - """ - The review line comment threads. - """ - threads: [DraftPullRequestReviewThread] -} - -""" -Autogenerated return type of AddPullRequestReview -""" -type AddPullRequestReviewPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The newly created pull request review. - """ - pullRequestReview: PullRequestReview - - """ - The edge from the pull request's review connection. - """ - reviewEdge: PullRequestReviewEdge -} - -""" -Autogenerated input type of AddPullRequestReviewThread -""" -input AddPullRequestReviewThreadInput { - """ - Body of the thread's first comment. - """ - body: String! - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The line of the blob to which the thread refers. The end of the line range for multi-line comments. - """ - line: Int! - - """ - Path to the file being commented on. - """ - path: String! - - """ - The node ID of the pull request reviewing - """ - pullRequestId: ID @possibleTypes(concreteTypes: ["PullRequest"]) - - """ - The Node ID of the review to modify. - """ - pullRequestReviewId: ID @possibleTypes(concreteTypes: ["PullRequestReview"]) - - """ - The side of the diff on which the line resides. For multi-line comments, this is the side for the end of the line range. - """ - side: DiffSide = RIGHT - - """ - The first line of the range to which the comment refers. - """ - startLine: Int - - """ - The side of the diff on which the start line resides. - """ - startSide: DiffSide = RIGHT -} - -""" -Autogenerated return type of AddPullRequestReviewThread -""" -type AddPullRequestReviewThreadPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The newly created thread. - """ - thread: PullRequestReviewThread -} - -""" -Autogenerated input type of AddReaction -""" -input AddReactionInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The name of the emoji to react with. - """ - content: ReactionContent! - - """ - The Node ID of the subject to modify. - """ - subjectId: ID! @possibleTypes(concreteTypes: ["CommitComment", "Issue", "IssueComment", "PullRequest", "PullRequestReview", "PullRequestReviewComment", "TeamDiscussion", "TeamDiscussionComment"], abstractType: "Reactable") -} - -""" -Autogenerated return type of AddReaction -""" -type AddReactionPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The reaction object. - """ - reaction: Reaction - - """ - The reactable subject. - """ - subject: Reactable -} - -""" -Autogenerated input type of AddStar -""" -input AddStarInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The Starrable ID to star. - """ - starrableId: ID! @possibleTypes(concreteTypes: ["Gist", "Repository", "Topic"], abstractType: "Starrable") -} - -""" -Autogenerated return type of AddStar -""" -type AddStarPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The starrable. - """ - starrable: Starrable -} - -""" -Autogenerated input type of AddVerifiableDomain -""" -input AddVerifiableDomainInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The URL of the domain - """ - domain: URI! - - """ - The ID of the owner to add the domain to - """ - ownerId: ID! @possibleTypes(concreteTypes: ["Enterprise", "Organization"], abstractType: "VerifiableDomainOwner") -} - -""" -Autogenerated return type of AddVerifiableDomain -""" -type AddVerifiableDomainPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The verifiable domain that was added. - """ - domain: VerifiableDomain -} - -""" -Represents a 'added_to_project' event on a given issue or pull request. -""" -type AddedToProjectEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - id: ID! - - """ - Project referenced by event. - """ - project: Project @preview(toggledBy: "starfox-preview") - - """ - Project card referenced by this project event. - """ - projectCard: ProjectCard @preview(toggledBy: "starfox-preview") - - """ - Column name referenced by this project event. - """ - projectColumnName: String! @preview(toggledBy: "starfox-preview") -} - -""" -A GitHub App. -""" -type App implements Node { - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - - """ - The description of the app. - """ - description: String - id: ID! - - """ - The hex color code, without the leading '#', for the logo background. - """ - logoBackgroundColor: String! - - """ - A URL pointing to the app's logo. - """ - logoUrl( - """ - The size of the resulting image. - """ - size: Int - ): URI! - - """ - The name of the app. - """ - name: String! - - """ - A slug based on the name of the app for use in URLs. - """ - slug: String! - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! - - """ - The URL to the app's homepage. - """ - url: URI! -} - -""" -Autogenerated input type of ApproveVerifiableDomain -""" -input ApproveVerifiableDomainInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the verifiable domain to approve. - """ - id: ID! @possibleTypes(concreteTypes: ["VerifiableDomain"]) -} - -""" -Autogenerated return type of ApproveVerifiableDomain -""" -type ApproveVerifiableDomainPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The verifiable domain that was approved. - """ - domain: VerifiableDomain -} - -""" -Autogenerated input type of ArchiveRepository -""" -input ArchiveRepositoryInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the repository to mark as archived. - """ - repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) -} - -""" -Autogenerated return type of ArchiveRepository -""" -type ArchiveRepositoryPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The repository that was marked as archived. - """ - repository: Repository -} - -""" -An object that can have users assigned to it. -""" -interface Assignable { - """ - A list of Users assigned to this object. - """ - assignees( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): UserConnection! -} - -""" -Represents an 'assigned' event on any assignable object. -""" -type AssignedEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the assignable associated with the event. - """ - assignable: Assignable! - - """ - Identifies the user or mannequin that was assigned. - """ - assignee: Assignee - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! - - """ - Identifies the user who was assigned. - """ - user: User @deprecated(reason: "Assignees can now be mannequins. Use the `assignee` field instead. Removal on 2020-01-01 UTC.") -} - -""" -Types that can be assigned to issues. -""" -union Assignee = Bot | Mannequin | Organization | User - -""" -An entry in the audit log. -""" -interface AuditEntry { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Types that can initiate an audit log event. -""" -union AuditEntryActor = Bot | Organization | User - -""" -Ordering options for Audit Log connections. -""" -input AuditLogOrder { - """ - The ordering direction. - """ - direction: OrderDirection - - """ - The field to order Audit Logs by. - """ - field: AuditLogOrderField -} - -""" -Properties by which Audit Log connections can be ordered. -""" -enum AuditLogOrderField { - """ - Order audit log entries by timestamp - """ - CREATED_AT -} - -""" -Represents a 'auto_merge_disabled' event on a given pull request. -""" -type AutoMergeDisabledEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - The user who disabled auto-merge for this Pull Request - """ - disabler: User - id: ID! - - """ - PullRequest referenced by event - """ - pullRequest: PullRequest - - """ - The reason auto-merge was disabled - """ - reason: String - - """ - The reason_code relating to why auto-merge was disabled - """ - reasonCode: String -} - -""" -Represents a 'auto_merge_enabled' event on a given pull request. -""" -type AutoMergeEnabledEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - The user who enabled auto-merge for this Pull Request - """ - enabler: User - id: ID! - - """ - PullRequest referenced by event. - """ - pullRequest: PullRequest -} - -""" -Represents an auto-merge request for a pull request -""" -type AutoMergeRequest { - """ - The email address of the author of this auto-merge request. - """ - authorEmail: String - - """ - The commit message of the auto-merge request. - """ - commitBody: String - - """ - The commit title of the auto-merge request. - """ - commitHeadline: String - - """ - When was this auto-merge request was enabled. - """ - enabledAt: DateTime - - """ - The actor who created the auto-merge request. - """ - enabledBy: Actor - - """ - The merge method of the auto-merge request. - """ - mergeMethod: PullRequestMergeMethod! - - """ - The pull request that this auto-merge request is set against. - """ - pullRequest: PullRequest! -} - -""" -Represents a 'auto_rebase_enabled' event on a given pull request. -""" -type AutoRebaseEnabledEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - The user who enabled auto-merge (rebase) for this Pull Request - """ - enabler: User - id: ID! - - """ - PullRequest referenced by event. - """ - pullRequest: PullRequest -} - -""" -Represents a 'auto_squash_enabled' event on a given pull request. -""" -type AutoSquashEnabledEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - The user who enabled auto-merge (squash) for this Pull Request - """ - enabler: User - id: ID! - - """ - PullRequest referenced by event. - """ - pullRequest: PullRequest -} - -""" -Represents a 'automatic_base_change_failed' event on a given pull request. -""" -type AutomaticBaseChangeFailedEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! - - """ - The new base for this PR - """ - newBase: String! - - """ - The old base for this PR - """ - oldBase: String! - - """ - PullRequest referenced by event. - """ - pullRequest: PullRequest! -} - -""" -Represents a 'automatic_base_change_succeeded' event on a given pull request. -""" -type AutomaticBaseChangeSucceededEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! - - """ - The new base for this PR - """ - newBase: String! - - """ - The old base for this PR - """ - oldBase: String! - - """ - PullRequest referenced by event. - """ - pullRequest: PullRequest! -} - -""" -Represents a 'base_ref_changed' event on a given issue or pull request. -""" -type BaseRefChangedEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Identifies the name of the base ref for the pull request after it was changed. - """ - currentRefName: String! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - id: ID! - - """ - Identifies the name of the base ref for the pull request before it was changed. - """ - previousRefName: String! - - """ - PullRequest referenced by event. - """ - pullRequest: PullRequest! -} - -""" -Represents a 'base_ref_deleted' event on a given pull request. -""" -type BaseRefDeletedEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the name of the Ref associated with the `base_ref_deleted` event. - """ - baseRefName: String - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! - - """ - PullRequest referenced by event. - """ - pullRequest: PullRequest -} - -""" -Represents a 'base_ref_force_pushed' event on a given pull request. -""" -type BaseRefForcePushedEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the after commit SHA for the 'base_ref_force_pushed' event. - """ - afterCommit: Commit - - """ - Identifies the before commit SHA for the 'base_ref_force_pushed' event. - """ - beforeCommit: Commit - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! - - """ - PullRequest referenced by event. - """ - pullRequest: PullRequest! - - """ - Identifies the fully qualified ref name for the 'base_ref_force_pushed' event. - """ - ref: Ref -} - -""" -Represents a Git blame. -""" -type Blame { - """ - The list of ranges from a Git blame. - """ - ranges: [BlameRange!]! -} - -""" -Represents a range of information from a Git blame. -""" -type BlameRange { - """ - Identifies the recency of the change, from 1 (new) to 10 (old). This is - calculated as a 2-quantile and determines the length of distance between the - median age of all the changes in the file and the recency of the current - range's change. - """ - age: Int! - - """ - Identifies the line author - """ - commit: Commit! - - """ - The ending line for the range - """ - endingLine: Int! - - """ - The starting line for the range - """ - startingLine: Int! -} - -""" -Represents a Git blob. -""" -type Blob implements GitObject & Node { - """ - An abbreviated version of the Git object ID - """ - abbreviatedOid: String! - - """ - Byte size of Blob object - """ - byteSize: Int! - - """ - The HTTP path for this Git object - """ - commitResourcePath: URI! - - """ - The HTTP URL for this Git object - """ - commitUrl: URI! - id: ID! - - """ - Indicates whether the Blob is binary or text. Returns null if unable to determine the encoding. - """ - isBinary: Boolean - - """ - Indicates whether the contents is truncated - """ - isTruncated: Boolean! - - """ - The Git object ID - """ - oid: GitObjectID! - - """ - The Repository the Git object belongs to - """ - repository: Repository! - - """ - UTF8 text data or null if the Blob is binary - """ - text: String -} - -""" -A special type of user which takes actions on behalf of GitHub Apps. -""" -type Bot implements Actor & Node & UniformResourceLocatable { - """ - A URL pointing to the GitHub App's public avatar. - """ - avatarUrl( - """ - The size of the resulting square image. - """ - size: Int - ): URI! - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - id: ID! - - """ - The username of the actor. - """ - login: String! - - """ - The HTTP path for this bot - """ - resourcePath: URI! - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! - - """ - The HTTP URL for this bot - """ - url: URI! -} - -""" -A branch protection rule. -""" -type BranchProtectionRule implements Node { - """ - Can this branch be deleted. - """ - allowsDeletions: Boolean! - - """ - Are force pushes allowed on this branch. - """ - allowsForcePushes: Boolean! - - """ - A list of conflicts matching branches protection rule and other branch protection rules - """ - branchProtectionRuleConflicts( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): BranchProtectionRuleConflictConnection! - - """ - The actor who created this branch protection rule. - """ - creator: Actor - - """ - Identifies the primary key from the database. - """ - databaseId: Int - - """ - Will new commits pushed to matching branches dismiss pull request review approvals. - """ - dismissesStaleReviews: Boolean! - id: ID! - - """ - Can admins overwrite branch protection. - """ - isAdminEnforced: Boolean! - - """ - Repository refs that are protected by this rule - """ - matchingRefs( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Filters refs with query on name - """ - query: String - ): RefConnection! - - """ - Identifies the protection rule pattern. - """ - pattern: String! - - """ - A list push allowances for this branch protection rule. - """ - pushAllowances( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): PushAllowanceConnection! - - """ - The repository associated with this branch protection rule. - """ - repository: Repository - - """ - Number of approving reviews required to update matching branches. - """ - requiredApprovingReviewCount: Int - - """ - List of required status check contexts that must pass for commits to be accepted to matching branches. - """ - requiredStatusCheckContexts: [String] - - """ - Are approving reviews required to update matching branches. - """ - requiresApprovingReviews: Boolean! - - """ - Are reviews from code owners required to update matching branches. - """ - requiresCodeOwnerReviews: Boolean! - - """ - Are commits required to be signed. - """ - requiresCommitSignatures: Boolean! - - """ - Are merge commits prohibited from being pushed to this branch. - """ - requiresLinearHistory: Boolean! - - """ - Are status checks required to update matching branches. - """ - requiresStatusChecks: Boolean! - - """ - Are branches required to be up to date before merging. - """ - requiresStrictStatusChecks: Boolean! - - """ - Is pushing to matching branches restricted. - """ - restrictsPushes: Boolean! - - """ - Is dismissal of pull request reviews restricted. - """ - restrictsReviewDismissals: Boolean! - - """ - A list review dismissal allowances for this branch protection rule. - """ - reviewDismissalAllowances( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): ReviewDismissalAllowanceConnection! -} - -""" -A conflict between two branch protection rules. -""" -type BranchProtectionRuleConflict { - """ - Identifies the branch protection rule. - """ - branchProtectionRule: BranchProtectionRule - - """ - Identifies the conflicting branch protection rule. - """ - conflictingBranchProtectionRule: BranchProtectionRule - - """ - Identifies the branch ref that has conflicting rules - """ - ref: Ref -} - -""" -The connection type for BranchProtectionRuleConflict. -""" -type BranchProtectionRuleConflictConnection { - """ - A list of edges. - """ - edges: [BranchProtectionRuleConflictEdge] - - """ - A list of nodes. - """ - nodes: [BranchProtectionRuleConflict] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type BranchProtectionRuleConflictEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: BranchProtectionRuleConflict -} - -""" -The connection type for BranchProtectionRule. -""" -type BranchProtectionRuleConnection { - """ - A list of edges. - """ - edges: [BranchProtectionRuleEdge] - - """ - A list of nodes. - """ - nodes: [BranchProtectionRule] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type BranchProtectionRuleEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: BranchProtectionRule -} - -""" -The Common Vulnerability Scoring System -""" -type CVSS { - """ - The CVSS score associated with this advisory - """ - score: Float! - - """ - The CVSS vector string associated with this advisory - """ - vectorString: String -} - -""" -A common weakness enumeration -""" -type CWE implements Node { - """ - The id of the CWE - """ - cweId: String! - - """ - A detailed description of this CWE - """ - description: String! - - """ - ID of the object. - """ - id: ID! - - """ - The name of this CWE - """ - name: String! -} - -""" -The connection type for CWE. -""" -type CWEConnection { - """ - A list of edges. - """ - edges: [CWEEdge] - - """ - A list of nodes. - """ - nodes: [CWE] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type CWEEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: CWE -} - -""" -Autogenerated input type of CancelEnterpriseAdminInvitation -""" -input CancelEnterpriseAdminInvitationInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The Node ID of the pending enterprise administrator invitation. - """ - invitationId: ID! @possibleTypes(concreteTypes: ["EnterpriseAdministratorInvitation"]) -} - -""" -Autogenerated return type of CancelEnterpriseAdminInvitation -""" -type CancelEnterpriseAdminInvitationPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The invitation that was canceled. - """ - invitation: EnterpriseAdministratorInvitation - - """ - A message confirming the result of canceling an administrator invitation. - """ - message: String -} - -""" -Autogenerated input type of ChangeUserStatus -""" -input ChangeUserStatusInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The emoji to represent your status. Can either be a native Unicode emoji or an emoji name with colons, e.g., :grinning:. - """ - emoji: String - - """ - If set, the user status will not be shown after this date. - """ - expiresAt: DateTime - - """ - Whether this status should indicate you are not fully available on GitHub, e.g., you are away. - """ - limitedAvailability: Boolean = false - - """ - A short description of your current status. - """ - message: String - - """ - The ID of the organization whose members will be allowed to see the status. If - omitted, the status will be publicly visible. - """ - organizationId: ID @possibleTypes(concreteTypes: ["Organization"]) -} - -""" -Autogenerated return type of ChangeUserStatus -""" -type ChangeUserStatusPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - Your updated status. - """ - status: UserStatus -} - -""" -A single check annotation. -""" -type CheckAnnotation { - """ - The annotation's severity level. - """ - annotationLevel: CheckAnnotationLevel - - """ - The path to the file that this annotation was made on. - """ - blobUrl: URI! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - - """ - The position of this annotation. - """ - location: CheckAnnotationSpan! - - """ - The annotation's message. - """ - message: String! - - """ - The path that this annotation was made on. - """ - path: String! - - """ - Additional information about the annotation. - """ - rawDetails: String - - """ - The annotation's title - """ - title: String -} - -""" -The connection type for CheckAnnotation. -""" -type CheckAnnotationConnection { - """ - A list of edges. - """ - edges: [CheckAnnotationEdge] - - """ - A list of nodes. - """ - nodes: [CheckAnnotation] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -Information from a check run analysis to specific lines of code. -""" -input CheckAnnotationData { - """ - Represents an annotation's information level - """ - annotationLevel: CheckAnnotationLevel! - - """ - The location of the annotation - """ - location: CheckAnnotationRange! - - """ - A short description of the feedback for these lines of code. - """ - message: String! - - """ - The path of the file to add an annotation to. - """ - path: String! - - """ - Details about this annotation. - """ - rawDetails: String - - """ - The title that represents the annotation. - """ - title: String -} - -""" -An edge in a connection. -""" -type CheckAnnotationEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: CheckAnnotation -} - -""" -Represents an annotation's information level. -""" -enum CheckAnnotationLevel { - """ - An annotation indicating an inescapable error. - """ - FAILURE - - """ - An annotation indicating some information. - """ - NOTICE - - """ - An annotation indicating an ignorable error. - """ - WARNING -} - -""" -A character position in a check annotation. -""" -type CheckAnnotationPosition { - """ - Column number (1 indexed). - """ - column: Int - - """ - Line number (1 indexed). - """ - line: Int! -} - -""" -Information from a check run analysis to specific lines of code. -""" -input CheckAnnotationRange { - """ - The ending column of the range. - """ - endColumn: Int - - """ - The ending line of the range. - """ - endLine: Int! - - """ - The starting column of the range. - """ - startColumn: Int - - """ - The starting line of the range. - """ - startLine: Int! -} - -""" -An inclusive pair of positions for a check annotation. -""" -type CheckAnnotationSpan { - """ - End position (inclusive). - """ - end: CheckAnnotationPosition! - - """ - Start position (inclusive). - """ - start: CheckAnnotationPosition! -} - -""" -The possible states for a check suite or run conclusion. -""" -enum CheckConclusionState { - """ - The check suite or run requires action. - """ - ACTION_REQUIRED - - """ - The check suite or run has been cancelled. - """ - CANCELLED - - """ - The check suite or run has failed. - """ - FAILURE - - """ - The check suite or run was neutral. - """ - NEUTRAL - - """ - The check suite or run was skipped. - """ - SKIPPED - - """ - The check suite or run was marked stale by GitHub. Only GitHub can use this conclusion. - """ - STALE - - """ - The check suite or run has failed at startup. - """ - STARTUP_FAILURE - - """ - The check suite or run has succeeded. - """ - SUCCESS - - """ - The check suite or run has timed out. - """ - TIMED_OUT -} - -""" -A check run. -""" -type CheckRun implements Node & RequirableByPullRequest & UniformResourceLocatable { - """ - The check run's annotations - """ - annotations( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): CheckAnnotationConnection - - """ - The check suite that this run is a part of. - """ - checkSuite: CheckSuite! - - """ - Identifies the date and time when the check run was completed. - """ - completedAt: DateTime - - """ - The conclusion of the check run. - """ - conclusion: CheckConclusionState - - """ - Identifies the primary key from the database. - """ - databaseId: Int - - """ - The URL from which to find full details of the check run on the integrator's site. - """ - detailsUrl: URI - - """ - A reference for the check run on the integrator's system. - """ - externalId: String - id: ID! - - """ - Whether this is required to pass before merging for a specific pull request. - """ - isRequired( - """ - The id of the pull request this is required for - """ - pullRequestId: ID - - """ - The number of the pull request this is required for - """ - pullRequestNumber: Int - ): Boolean! - - """ - The name of the check for this check run. - """ - name: String! - - """ - The permalink to the check run summary. - """ - permalink: URI! - - """ - The repository associated with this check run. - """ - repository: Repository! - - """ - The HTTP path for this check run. - """ - resourcePath: URI! - - """ - Identifies the date and time when the check run was started. - """ - startedAt: DateTime - - """ - The current status of the check run. - """ - status: CheckStatusState! - - """ - A string representing the check run's summary - """ - summary: String - - """ - A string representing the check run's text - """ - text: String - - """ - A string representing the check run - """ - title: String - - """ - The HTTP URL for this check run. - """ - url: URI! -} - -""" -Possible further actions the integrator can perform. -""" -input CheckRunAction { - """ - A short explanation of what this action would do. - """ - description: String! - - """ - A reference for the action on the integrator's system. - """ - identifier: String! - - """ - The text to be displayed on a button in the web UI. - """ - label: String! -} - -""" -The connection type for CheckRun. -""" -type CheckRunConnection { - """ - A list of edges. - """ - edges: [CheckRunEdge] - - """ - A list of nodes. - """ - nodes: [CheckRun] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type CheckRunEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: CheckRun -} - -""" -The filters that are available when fetching check runs. -""" -input CheckRunFilter { - """ - Filters the check runs created by this application ID. - """ - appId: Int - - """ - Filters the check runs by this name. - """ - checkName: String - - """ - Filters the check runs by this type. - """ - checkType: CheckRunType - - """ - Filters the check runs by this status. - """ - status: CheckStatusState -} - -""" -Descriptive details about the check run. -""" -input CheckRunOutput { - """ - The annotations that are made as part of the check run. - """ - annotations: [CheckAnnotationData!] - - """ - Images attached to the check run output displayed in the GitHub pull request UI. - """ - images: [CheckRunOutputImage!] - - """ - The summary of the check run (supports Commonmark). - """ - summary: String! - - """ - The details of the check run (supports Commonmark). - """ - text: String - - """ - A title to provide for this check run. - """ - title: String! -} - -""" -Images attached to the check run output displayed in the GitHub pull request UI. -""" -input CheckRunOutputImage { - """ - The alternative text for the image. - """ - alt: String! - - """ - A short image description. - """ - caption: String - - """ - The full URL of the image. - """ - imageUrl: URI! -} - -""" -The possible types of check runs. -""" -enum CheckRunType { - """ - Every check run available. - """ - ALL - - """ - The latest check run. - """ - LATEST -} - -""" -The possible states for a check suite or run status. -""" -enum CheckStatusState { - """ - The check suite or run has been completed. - """ - COMPLETED - - """ - The check suite or run is in progress. - """ - IN_PROGRESS - - """ - The check suite or run has been queued. - """ - QUEUED - - """ - The check suite or run has been requested. - """ - REQUESTED - - """ - The check suite or run is in waiting state. - """ - WAITING -} - -""" -A check suite. -""" -type CheckSuite implements Node { - """ - The GitHub App which created this check suite. - """ - app: App - - """ - The name of the branch for this check suite. - """ - branch: Ref - - """ - The check runs associated with a check suite. - """ - checkRuns( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Filters the check runs by this type. - """ - filterBy: CheckRunFilter - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): CheckRunConnection - - """ - The commit for this check suite - """ - commit: Commit! - - """ - The conclusion of this check suite. - """ - conclusion: CheckConclusionState - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - id: ID! - - """ - A list of open pull requests matching the check suite. - """ - matchingPullRequests( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - The base ref name to filter the pull requests by. - """ - baseRefName: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - The head ref name to filter the pull requests by. - """ - headRefName: String - - """ - A list of label names to filter the pull requests by. - """ - labels: [String!] - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for pull requests returned from the connection. - """ - orderBy: IssueOrder - - """ - A list of states to filter the pull requests by. - """ - states: [PullRequestState!] - ): PullRequestConnection - - """ - The push that triggered this check suite. - """ - push: Push - - """ - The repository associated with this check suite. - """ - repository: Repository! - - """ - The HTTP path for this check suite - """ - resourcePath: URI! - - """ - The status of this check suite. - """ - status: CheckStatusState! - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! - - """ - The HTTP URL for this check suite - """ - url: URI! -} - -""" -The auto-trigger preferences that are available for check suites. -""" -input CheckSuiteAutoTriggerPreference { - """ - The node ID of the application that owns the check suite. - """ - appId: ID! - - """ - Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository. - """ - setting: Boolean! -} - -""" -The connection type for CheckSuite. -""" -type CheckSuiteConnection { - """ - A list of edges. - """ - edges: [CheckSuiteEdge] - - """ - A list of nodes. - """ - nodes: [CheckSuite] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type CheckSuiteEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: CheckSuite -} - -""" -The filters that are available when fetching check suites. -""" -input CheckSuiteFilter { - """ - Filters the check suites created by this application ID. - """ - appId: Int - - """ - Filters the check suites by this name. - """ - checkName: String -} - -""" -Autogenerated input type of ClearLabelsFromLabelable -""" -input ClearLabelsFromLabelableInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The id of the labelable object to clear the labels from. - """ - labelableId: ID! @possibleTypes(concreteTypes: ["Issue", "PullRequest"], abstractType: "Labelable") -} - -""" -Autogenerated return type of ClearLabelsFromLabelable -""" -type ClearLabelsFromLabelablePayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The item that was unlabeled. - """ - labelable: Labelable -} - -""" -Autogenerated input type of CloneProject -""" -input CloneProjectInput { - """ - The description of the project. - """ - body: String - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - Whether or not to clone the source project's workflows. - """ - includeWorkflows: Boolean! - - """ - The name of the project. - """ - name: String! - - """ - The visibility of the project, defaults to false (private). - """ - public: Boolean - - """ - The source project to clone. - """ - sourceId: ID! @possibleTypes(concreteTypes: ["Project"]) - - """ - The owner ID to create the project under. - """ - targetOwnerId: ID! @possibleTypes(concreteTypes: ["Organization", "Repository", "User"], abstractType: "ProjectOwner") -} - -""" -Autogenerated return type of CloneProject -""" -type CloneProjectPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The id of the JobStatus for populating cloned fields. - """ - jobStatusId: String - - """ - The new cloned project. - """ - project: Project -} - -""" -Autogenerated input type of CloneTemplateRepository -""" -input CloneTemplateRepositoryInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - A short description of the new repository. - """ - description: String - - """ - Whether to copy all branches from the template to the new repository. Defaults - to copying only the default branch of the template. - """ - includeAllBranches: Boolean = false - - """ - The name of the new repository. - """ - name: String! - - """ - The ID of the owner for the new repository. - """ - ownerId: ID! @possibleTypes(concreteTypes: ["Organization", "User"], abstractType: "RepositoryOwner") - - """ - The Node ID of the template repository. - """ - repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) - - """ - Indicates the repository's visibility level. - """ - visibility: RepositoryVisibility! -} - -""" -Autogenerated return type of CloneTemplateRepository -""" -type CloneTemplateRepositoryPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The new repository. - """ - repository: Repository -} - -""" -An object that can be closed -""" -interface Closable { - """ - `true` if the object is closed (definition of closed may depend on type) - """ - closed: Boolean! - - """ - Identifies the date and time when the object was closed. - """ - closedAt: DateTime -} - -""" -Autogenerated input type of CloseIssue -""" -input CloseIssueInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - ID of the issue to be closed. - """ - issueId: ID! @possibleTypes(concreteTypes: ["Issue"]) -} - -""" -Autogenerated return type of CloseIssue -""" -type CloseIssuePayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The issue that was closed. - """ - issue: Issue -} - -""" -Autogenerated input type of ClosePullRequest -""" -input ClosePullRequestInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - ID of the pull request to be closed. - """ - pullRequestId: ID! @possibleTypes(concreteTypes: ["PullRequest"]) -} - -""" -Autogenerated return type of ClosePullRequest -""" -type ClosePullRequestPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The pull request that was closed. - """ - pullRequest: PullRequest -} - -""" -Represents a 'closed' event on any `Closable`. -""" -type ClosedEvent implements Node & UniformResourceLocatable { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Object that was closed. - """ - closable: Closable! - - """ - Object which triggered the creation of this event. - """ - closer: Closer - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! - - """ - The HTTP path for this closed event. - """ - resourcePath: URI! - - """ - The HTTP URL for this closed event. - """ - url: URI! -} - -""" -The object which triggered a `ClosedEvent`. -""" -union Closer = Commit | PullRequest - -""" -The Code of Conduct for a repository -""" -type CodeOfConduct implements Node { - """ - The body of the Code of Conduct - """ - body: String - id: ID! - - """ - The key for the Code of Conduct - """ - key: String! - - """ - The formal name of the Code of Conduct - """ - name: String! - - """ - The HTTP path for this Code of Conduct - """ - resourcePath: URI - - """ - The HTTP URL for this Code of Conduct - """ - url: URI -} - -""" -Collaborators affiliation level with a subject. -""" -enum CollaboratorAffiliation { - """ - All collaborators the authenticated user can see. - """ - ALL - - """ - All collaborators with permissions to an organization-owned subject, regardless of organization membership status. - """ - DIRECT - - """ - All outside collaborators of an organization-owned subject. - """ - OUTSIDE -} - -""" -Represents a comment. -""" -interface Comment { - """ - The actor who authored the comment. - """ - author: Actor - - """ - Author's association with the subject of the comment. - """ - authorAssociation: CommentAuthorAssociation! - - """ - The body as Markdown. - """ - body: String! - - """ - The body rendered to HTML. - """ - bodyHTML: HTML! - - """ - The body rendered to text. - """ - bodyText: String! - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Check if this comment was created via an email reply. - """ - createdViaEmail: Boolean! - - """ - The actor who edited the comment. - """ - editor: Actor - id: ID! - - """ - Check if this comment was edited and includes an edit with the creation data - """ - includesCreatedEdit: Boolean! - - """ - The moment the editor made the last edit - """ - lastEditedAt: DateTime - - """ - Identifies when the comment was published at. - """ - publishedAt: DateTime - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! - - """ - A list of edits to this content. - """ - userContentEdits( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): UserContentEditConnection - - """ - Did the viewer author this comment. - """ - viewerDidAuthor: Boolean! -} - -""" -A comment author association with repository. -""" -enum CommentAuthorAssociation { - """ - Author has been invited to collaborate on the repository. - """ - COLLABORATOR - - """ - Author has previously committed to the repository. - """ - CONTRIBUTOR - - """ - Author has not previously committed to GitHub. - """ - FIRST_TIMER - - """ - Author has not previously committed to the repository. - """ - FIRST_TIME_CONTRIBUTOR - - """ - Author is a placeholder for an unclaimed user. - """ - MANNEQUIN - - """ - Author is a member of the organization that owns the repository. - """ - MEMBER - - """ - Author has no association with the repository. - """ - NONE - - """ - Author is the owner of the repository. - """ - OWNER -} - -""" -The possible errors that will prevent a user from updating a comment. -""" -enum CommentCannotUpdateReason { - """ - Unable to create comment because repository is archived. - """ - ARCHIVED - - """ - You cannot update this comment - """ - DENIED - - """ - You must be the author or have write access to this repository to update this comment. - """ - INSUFFICIENT_ACCESS - - """ - Unable to create comment because issue is locked. - """ - LOCKED - - """ - You must be logged in to update this comment. - """ - LOGIN_REQUIRED - - """ - Repository is under maintenance. - """ - MAINTENANCE - - """ - At least one email address must be verified to update this comment. - """ - VERIFIED_EMAIL_REQUIRED -} - -""" -Represents a 'comment_deleted' event on a given issue or pull request. -""" -type CommentDeletedEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - - """ - The user who authored the deleted comment. - """ - deletedCommentAuthor: Actor - id: ID! -} - -""" -Represents a Git commit. -""" -type Commit implements GitObject & Node & Subscribable & UniformResourceLocatable { - """ - An abbreviated version of the Git object ID - """ - abbreviatedOid: String! - - """ - The number of additions in this commit. - """ - additions: Int! - - """ - The merged Pull Request that introduced the commit to the repository. If the - commit is not present in the default branch, additionally returns open Pull - Requests associated with the commit - """ - associatedPullRequests( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for pull requests. - """ - orderBy: PullRequestOrder = {field: CREATED_AT, direction: ASC} - ): PullRequestConnection - - """ - Authorship details of the commit. - """ - author: GitActor - - """ - Check if the committer and the author match. - """ - authoredByCommitter: Boolean! - - """ - The datetime when this commit was authored. - """ - authoredDate: DateTime! - - """ - The list of authors for this commit based on the git author and the Co-authored-by - message trailer. The git author will always be first. - """ - authors( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): GitActorConnection! - - """ - Fetches `git blame` information. - """ - blame( - """ - The file whose Git blame information you want. - """ - path: String! - ): Blame! - - """ - The number of changed files in this commit. - """ - changedFiles: Int! - - """ - The check suites associated with a commit. - """ - checkSuites( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Filters the check suites by this type. - """ - filterBy: CheckSuiteFilter - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): CheckSuiteConnection - - """ - Comments made on the commit. - """ - comments( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): CommitCommentConnection! - - """ - The HTTP path for this Git object - """ - commitResourcePath: URI! - - """ - The HTTP URL for this Git object - """ - commitUrl: URI! - - """ - The datetime when this commit was committed. - """ - committedDate: DateTime! - - """ - Check if committed via GitHub web UI. - """ - committedViaWeb: Boolean! - - """ - Committer details of the commit. - """ - committer: GitActor - - """ - The number of deletions in this commit. - """ - deletions: Int! - - """ - The deployments associated with a commit. - """ - deployments( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Environments to list deployments for - """ - environments: [String!] - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for deployments returned from the connection. - """ - orderBy: DeploymentOrder = {field: CREATED_AT, direction: ASC} - ): DeploymentConnection - - """ - The tree entry representing the file located at the given path. - """ - file( - """ - The path for the file - """ - path: String! - ): TreeEntry - - """ - The linear commit history starting from (and including) this commit, in the same order as `git log`. - """ - history( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - If non-null, filters history to only show commits with matching authorship. - """ - author: CommitAuthor - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - If non-null, filters history to only show commits touching files under this path. - """ - path: String - - """ - Allows specifying a beginning time or date for fetching commits. - """ - since: GitTimestamp - - """ - Allows specifying an ending time or date for fetching commits. - """ - until: GitTimestamp - ): CommitHistoryConnection! - id: ID! - - """ - The Git commit message - """ - message: String! - - """ - The Git commit message body - """ - messageBody: String! - - """ - The commit message body rendered to HTML. - """ - messageBodyHTML: HTML! - - """ - The Git commit message headline - """ - messageHeadline: String! - - """ - The commit message headline rendered to HTML. - """ - messageHeadlineHTML: HTML! - - """ - The Git object ID - """ - oid: GitObjectID! - - """ - The organization this commit was made on behalf of. - """ - onBehalfOf: Organization - - """ - The parents of a commit. - """ - parents( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): CommitConnection! - - """ - The datetime when this commit was pushed. - """ - pushedDate: DateTime - - """ - The Repository this commit belongs to - """ - repository: Repository! - - """ - The HTTP path for this commit - """ - resourcePath: URI! - - """ - Commit signing information, if present. - """ - signature: GitSignature - - """ - Status information for this commit - """ - status: Status - - """ - Check and Status rollup information for this commit. - """ - statusCheckRollup: StatusCheckRollup - - """ - Returns a list of all submodules in this repository as of this Commit parsed from the .gitmodules file. - """ - submodules( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): SubmoduleConnection! - - """ - Returns a URL to download a tarball archive for a repository. - Note: For private repositories, these links are temporary and expire after five minutes. - """ - tarballUrl: URI! - - """ - Commit's root Tree - """ - tree: Tree! - - """ - The HTTP path for the tree of this commit - """ - treeResourcePath: URI! - - """ - The HTTP URL for the tree of this commit - """ - treeUrl: URI! - - """ - The HTTP URL for this commit - """ - url: URI! - - """ - Check if the viewer is able to change their subscription status for the repository. - """ - viewerCanSubscribe: Boolean! - - """ - Identifies if the viewer is watching, not watching, or ignoring the subscribable entity. - """ - viewerSubscription: SubscriptionState - - """ - Returns a URL to download a zipball archive for a repository. - Note: For private repositories, these links are temporary and expire after five minutes. - """ - zipballUrl: URI! -} - -""" -Specifies an author for filtering Git commits. -""" -input CommitAuthor { - """ - Email addresses to filter by. Commits authored by any of the specified email addresses will be returned. - """ - emails: [String!] - - """ - ID of a User to filter by. If non-null, only commits authored by this user - will be returned. This field takes precedence over emails. - """ - id: ID -} - -""" -Represents a comment on a given Commit. -""" -type CommitComment implements Comment & Deletable & Minimizable & Node & Reactable & RepositoryNode & Updatable & UpdatableComment { - """ - The actor who authored the comment. - """ - author: Actor - - """ - Author's association with the subject of the comment. - """ - authorAssociation: CommentAuthorAssociation! - - """ - Identifies the comment body. - """ - body: String! - - """ - The body rendered to HTML. - """ - bodyHTML: HTML! - - """ - The body rendered to text. - """ - bodyText: String! - - """ - Identifies the commit associated with the comment, if the commit exists. - """ - commit: Commit - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Check if this comment was created via an email reply. - """ - createdViaEmail: Boolean! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - - """ - The actor who edited the comment. - """ - editor: Actor - id: ID! - - """ - Check if this comment was edited and includes an edit with the creation data - """ - includesCreatedEdit: Boolean! - - """ - Returns whether or not a comment has been minimized. - """ - isMinimized: Boolean! - - """ - The moment the editor made the last edit - """ - lastEditedAt: DateTime - - """ - Returns why the comment was minimized. - """ - minimizedReason: String - - """ - Identifies the file path associated with the comment. - """ - path: String - - """ - Identifies the line position associated with the comment. - """ - position: Int - - """ - Identifies when the comment was published at. - """ - publishedAt: DateTime - - """ - A list of reactions grouped by content left on the subject. - """ - reactionGroups: [ReactionGroup!] - - """ - A list of Reactions left on the Issue. - """ - reactions( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Allows filtering Reactions by emoji. - """ - content: ReactionContent - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Allows specifying the order in which reactions are returned. - """ - orderBy: ReactionOrder - ): ReactionConnection! - - """ - The repository associated with this node. - """ - repository: Repository! - - """ - The HTTP path permalink for this commit comment. - """ - resourcePath: URI! - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! - - """ - The HTTP URL permalink for this commit comment. - """ - url: URI! - - """ - A list of edits to this content. - """ - userContentEdits( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): UserContentEditConnection - - """ - Check if the current viewer can delete this object. - """ - viewerCanDelete: Boolean! - - """ - Check if the current viewer can minimize this object. - """ - viewerCanMinimize: Boolean! - - """ - Can user react to this subject - """ - viewerCanReact: Boolean! - - """ - Check if the current viewer can update this object. - """ - viewerCanUpdate: Boolean! - - """ - Reasons why the current viewer can not update this comment. - """ - viewerCannotUpdateReasons: [CommentCannotUpdateReason!]! - - """ - Did the viewer author this comment. - """ - viewerDidAuthor: Boolean! -} - -""" -The connection type for CommitComment. -""" -type CommitCommentConnection { - """ - A list of edges. - """ - edges: [CommitCommentEdge] - - """ - A list of nodes. - """ - nodes: [CommitComment] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type CommitCommentEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: CommitComment -} - -""" -A thread of comments on a commit. -""" -type CommitCommentThread implements Node & RepositoryNode { - """ - The comments that exist in this thread. - """ - comments( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): CommitCommentConnection! - - """ - The commit the comments were made on. - """ - commit: Commit - id: ID! - - """ - The file the comments were made on. - """ - path: String - - """ - The position in the diff for the commit that the comment was made on. - """ - position: Int - - """ - The repository associated with this node. - """ - repository: Repository! -} - -""" -The connection type for Commit. -""" -type CommitConnection { - """ - A list of edges. - """ - edges: [CommitEdge] - - """ - A list of nodes. - """ - nodes: [Commit] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -Ordering options for commit contribution connections. -""" -input CommitContributionOrder { - """ - The ordering direction. - """ - direction: OrderDirection! - - """ - The field by which to order commit contributions. - """ - field: CommitContributionOrderField! -} - -""" -Properties by which commit contribution connections can be ordered. -""" -enum CommitContributionOrderField { - """ - Order commit contributions by how many commits they represent. - """ - COMMIT_COUNT - - """ - Order commit contributions by when they were made. - """ - OCCURRED_AT -} - -""" -This aggregates commits made by a user within one repository. -""" -type CommitContributionsByRepository { - """ - The commit contributions, each representing a day. - """ - contributions( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for commit contributions returned from the connection. - """ - orderBy: CommitContributionOrder = {field: OCCURRED_AT, direction: DESC} - ): CreatedCommitContributionConnection! - - """ - The repository in which the commits were made. - """ - repository: Repository! - - """ - The HTTP path for the user's commits to the repository in this time range. - """ - resourcePath: URI! - - """ - The HTTP URL for the user's commits to the repository in this time range. - """ - url: URI! -} - -""" -An edge in a connection. -""" -type CommitEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: Commit -} - -""" -The connection type for Commit. -""" -type CommitHistoryConnection { - """ - A list of edges. - """ - edges: [CommitEdge] - - """ - A list of nodes. - """ - nodes: [Commit] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -Represents a 'connected' event on a given issue or pull request. -""" -type ConnectedEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! - - """ - Reference originated in a different repository. - """ - isCrossRepository: Boolean! - - """ - Issue or pull request that made the reference. - """ - source: ReferencedSubject! - - """ - Issue or pull request which was connected. - """ - subject: ReferencedSubject! -} - -""" -A content attachment -""" -type ContentAttachment { - """ - The body text of the content attachment. This parameter supports markdown. - """ - body: String! - - """ - The content reference that the content attachment is attached to. - """ - contentReference: ContentReference! - - """ - Identifies the primary key from the database. - """ - databaseId: Int! - id: ID! - - """ - The title of the content attachment. - """ - title: String! -} - -""" -A content reference -""" -type ContentReference { - """ - Identifies the primary key from the database. - """ - databaseId: Int! - id: ID! - - """ - The reference of the content reference. - """ - reference: String! -} - -""" -Represents a contribution a user made on GitHub, such as opening an issue. -""" -interface Contribution { - """ - Whether this contribution is associated with a record you do not have access to. For - example, your own 'first issue' contribution may have been made on a repository you can no - longer access. - """ - isRestricted: Boolean! - - """ - When this contribution was made. - """ - occurredAt: DateTime! - - """ - The HTTP path for this contribution. - """ - resourcePath: URI! - - """ - The HTTP URL for this contribution. - """ - url: URI! - - """ - The user who made this contribution. - """ - user: User! -} - -""" -A calendar of contributions made on GitHub by a user. -""" -type ContributionCalendar { - """ - A list of hex color codes used in this calendar. The darker the color, the more contributions it represents. - """ - colors: [String!]! - - """ - Determine if the color set was chosen because it's currently Halloween. - """ - isHalloween: Boolean! - - """ - A list of the months of contributions in this calendar. - """ - months: [ContributionCalendarMonth!]! - - """ - The count of total contributions in the calendar. - """ - totalContributions: Int! - - """ - A list of the weeks of contributions in this calendar. - """ - weeks: [ContributionCalendarWeek!]! -} - -""" -Represents a single day of contributions on GitHub by a user. -""" -type ContributionCalendarDay { - """ - The hex color code that represents how many contributions were made on this day compared to others in the calendar. - """ - color: String! - - """ - How many contributions were made by the user on this day. - """ - contributionCount: Int! - - """ - Indication of contributions, relative to other days. Can be used to indicate - which color to represent this day on a calendar. - """ - contributionLevel: ContributionLevel! - - """ - The day this square represents. - """ - date: Date! - - """ - A number representing which day of the week this square represents, e.g., 1 is Monday. - """ - weekday: Int! -} - -""" -A month of contributions in a user's contribution graph. -""" -type ContributionCalendarMonth { - """ - The date of the first day of this month. - """ - firstDay: Date! - - """ - The name of the month. - """ - name: String! - - """ - How many weeks started in this month. - """ - totalWeeks: Int! - - """ - The year the month occurred in. - """ - year: Int! -} - -""" -A week of contributions in a user's contribution graph. -""" -type ContributionCalendarWeek { - """ - The days of contributions in this week. - """ - contributionDays: [ContributionCalendarDay!]! - - """ - The date of the earliest square in this week. - """ - firstDay: Date! -} - -""" -Varying levels of contributions from none to many. -""" -enum ContributionLevel { - """ - Lowest 25% of days of contributions. - """ - FIRST_QUARTILE - - """ - Highest 25% of days of contributions. More contributions than the third quartile. - """ - FOURTH_QUARTILE - - """ - No contributions occurred. - """ - NONE - - """ - Second lowest 25% of days of contributions. More contributions than the first quartile. - """ - SECOND_QUARTILE - - """ - Second highest 25% of days of contributions. More contributions than second quartile, less than the fourth quartile. - """ - THIRD_QUARTILE -} - -""" -Ordering options for contribution connections. -""" -input ContributionOrder { - """ - The ordering direction. - """ - direction: OrderDirection! -} - -""" -A contributions collection aggregates contributions such as opened issues and commits created by a user. -""" -type ContributionsCollection { - """ - Commit contributions made by the user, grouped by repository. - """ - commitContributionsByRepository( - """ - How many repositories should be included. - """ - maxRepositories: Int = 25 - ): [CommitContributionsByRepository!]! - - """ - A calendar of this user's contributions on GitHub. - """ - contributionCalendar: ContributionCalendar! - - """ - The years the user has been making contributions with the most recent year first. - """ - contributionYears: [Int!]! - - """ - Determine if this collection's time span ends in the current month. - """ - doesEndInCurrentMonth: Boolean! - - """ - The date of the first restricted contribution the user made in this time - period. Can only be non-null when the user has enabled private contribution counts. - """ - earliestRestrictedContributionDate: Date - - """ - The ending date and time of this collection. - """ - endedAt: DateTime! - - """ - The first issue the user opened on GitHub. This will be null if that issue was - opened outside the collection's time range and ignoreTimeRange is false. If - the issue is not visible but the user has opted to show private contributions, - a RestrictedContribution will be returned. - """ - firstIssueContribution: CreatedIssueOrRestrictedContribution - - """ - The first pull request the user opened on GitHub. This will be null if that - pull request was opened outside the collection's time range and - ignoreTimeRange is not true. If the pull request is not visible but the user - has opted to show private contributions, a RestrictedContribution will be returned. - """ - firstPullRequestContribution: CreatedPullRequestOrRestrictedContribution - - """ - The first repository the user created on GitHub. This will be null if that - first repository was created outside the collection's time range and - ignoreTimeRange is false. If the repository is not visible, then a - RestrictedContribution is returned. - """ - firstRepositoryContribution: CreatedRepositoryOrRestrictedContribution - - """ - Does the user have any more activity in the timeline that occurred prior to the collection's time range? - """ - hasActivityInThePast: Boolean! - - """ - Determine if there are any contributions in this collection. - """ - hasAnyContributions: Boolean! - - """ - Determine if the user made any contributions in this time frame whose details - are not visible because they were made in a private repository. Can only be - true if the user enabled private contribution counts. - """ - hasAnyRestrictedContributions: Boolean! - - """ - Whether or not the collector's time span is all within the same day. - """ - isSingleDay: Boolean! - - """ - A list of issues the user opened. - """ - issueContributions( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Should the user's first issue ever be excluded from the result. - """ - excludeFirst: Boolean = false - - """ - Should the user's most commented issue be excluded from the result. - """ - excludePopular: Boolean = false - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for contributions returned from the connection. - """ - orderBy: ContributionOrder = {direction: DESC} - ): CreatedIssueContributionConnection! - - """ - Issue contributions made by the user, grouped by repository. - """ - issueContributionsByRepository( - """ - Should the user's first issue ever be excluded from the result. - """ - excludeFirst: Boolean = false - - """ - Should the user's most commented issue be excluded from the result. - """ - excludePopular: Boolean = false - - """ - How many repositories should be included. - """ - maxRepositories: Int = 25 - ): [IssueContributionsByRepository!]! - - """ - When the user signed up for GitHub. This will be null if that sign up date - falls outside the collection's time range and ignoreTimeRange is false. - """ - joinedGitHubContribution: JoinedGitHubContribution - - """ - The date of the most recent restricted contribution the user made in this time - period. Can only be non-null when the user has enabled private contribution counts. - """ - latestRestrictedContributionDate: Date - - """ - When this collection's time range does not include any activity from the user, use this - to get a different collection from an earlier time range that does have activity. - """ - mostRecentCollectionWithActivity: ContributionsCollection - - """ - Returns a different contributions collection from an earlier time range than this one - that does not have any contributions. - """ - mostRecentCollectionWithoutActivity: ContributionsCollection - - """ - The issue the user opened on GitHub that received the most comments in the specified - time frame. - """ - popularIssueContribution: CreatedIssueContribution - - """ - The pull request the user opened on GitHub that received the most comments in the - specified time frame. - """ - popularPullRequestContribution: CreatedPullRequestContribution - - """ - Pull request contributions made by the user. - """ - pullRequestContributions( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Should the user's first pull request ever be excluded from the result. - """ - excludeFirst: Boolean = false - - """ - Should the user's most commented pull request be excluded from the result. - """ - excludePopular: Boolean = false - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for contributions returned from the connection. - """ - orderBy: ContributionOrder = {direction: DESC} - ): CreatedPullRequestContributionConnection! - - """ - Pull request contributions made by the user, grouped by repository. - """ - pullRequestContributionsByRepository( - """ - Should the user's first pull request ever be excluded from the result. - """ - excludeFirst: Boolean = false - - """ - Should the user's most commented pull request be excluded from the result. - """ - excludePopular: Boolean = false - - """ - How many repositories should be included. - """ - maxRepositories: Int = 25 - ): [PullRequestContributionsByRepository!]! - - """ - Pull request review contributions made by the user. - """ - pullRequestReviewContributions( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for contributions returned from the connection. - """ - orderBy: ContributionOrder = {direction: DESC} - ): CreatedPullRequestReviewContributionConnection! - - """ - Pull request review contributions made by the user, grouped by repository. - """ - pullRequestReviewContributionsByRepository( - """ - How many repositories should be included. - """ - maxRepositories: Int = 25 - ): [PullRequestReviewContributionsByRepository!]! - - """ - A list of repositories owned by the user that the user created in this time range. - """ - repositoryContributions( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Should the user's first repository ever be excluded from the result. - """ - excludeFirst: Boolean = false - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for contributions returned from the connection. - """ - orderBy: ContributionOrder = {direction: DESC} - ): CreatedRepositoryContributionConnection! - - """ - A count of contributions made by the user that the viewer cannot access. Only - non-zero when the user has chosen to share their private contribution counts. - """ - restrictedContributionsCount: Int! - - """ - The beginning date and time of this collection. - """ - startedAt: DateTime! - - """ - How many commits were made by the user in this time span. - """ - totalCommitContributions: Int! - - """ - How many issues the user opened. - """ - totalIssueContributions( - """ - Should the user's first issue ever be excluded from this count. - """ - excludeFirst: Boolean = false - - """ - Should the user's most commented issue be excluded from this count. - """ - excludePopular: Boolean = false - ): Int! - - """ - How many pull requests the user opened. - """ - totalPullRequestContributions( - """ - Should the user's first pull request ever be excluded from this count. - """ - excludeFirst: Boolean = false - - """ - Should the user's most commented pull request be excluded from this count. - """ - excludePopular: Boolean = false - ): Int! - - """ - How many pull request reviews the user left. - """ - totalPullRequestReviewContributions: Int! - - """ - How many different repositories the user committed to. - """ - totalRepositoriesWithContributedCommits: Int! - - """ - How many different repositories the user opened issues in. - """ - totalRepositoriesWithContributedIssues( - """ - Should the user's first issue ever be excluded from this count. - """ - excludeFirst: Boolean = false - - """ - Should the user's most commented issue be excluded from this count. - """ - excludePopular: Boolean = false - ): Int! - - """ - How many different repositories the user left pull request reviews in. - """ - totalRepositoriesWithContributedPullRequestReviews: Int! - - """ - How many different repositories the user opened pull requests in. - """ - totalRepositoriesWithContributedPullRequests( - """ - Should the user's first pull request ever be excluded from this count. - """ - excludeFirst: Boolean = false - - """ - Should the user's most commented pull request be excluded from this count. - """ - excludePopular: Boolean = false - ): Int! - - """ - How many repositories the user created. - """ - totalRepositoryContributions( - """ - Should the user's first repository ever be excluded from this count. - """ - excludeFirst: Boolean = false - ): Int! - - """ - The user who made the contributions in this collection. - """ - user: User! -} - -""" -Autogenerated input type of ConvertProjectCardNoteToIssue -""" -input ConvertProjectCardNoteToIssueInput { - """ - The body of the newly created issue. - """ - body: String - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ProjectCard ID to convert. - """ - projectCardId: ID! @possibleTypes(concreteTypes: ["ProjectCard"]) - - """ - The ID of the repository to create the issue in. - """ - repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) - - """ - The title of the newly created issue. Defaults to the card's note text. - """ - title: String -} - -""" -Autogenerated return type of ConvertProjectCardNoteToIssue -""" -type ConvertProjectCardNoteToIssuePayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The updated ProjectCard. - """ - projectCard: ProjectCard -} - -""" -Represents a 'convert_to_draft' event on a given pull request. -""" -type ConvertToDraftEvent implements Node & UniformResourceLocatable { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! - - """ - PullRequest referenced by event. - """ - pullRequest: PullRequest! - - """ - The HTTP path for this convert to draft event. - """ - resourcePath: URI! - - """ - The HTTP URL for this convert to draft event. - """ - url: URI! -} - -""" -Represents a 'converted_note_to_issue' event on a given issue or pull request. -""" -type ConvertedNoteToIssueEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - id: ID! - - """ - Project referenced by event. - """ - project: Project @preview(toggledBy: "starfox-preview") - - """ - Project card referenced by this project event. - """ - projectCard: ProjectCard @preview(toggledBy: "starfox-preview") - - """ - Column name referenced by this project event. - """ - projectColumnName: String! @preview(toggledBy: "starfox-preview") -} - -""" -Autogenerated input type of CreateBranchProtectionRule -""" -input CreateBranchProtectionRuleInput { - """ - Can this branch be deleted. - """ - allowsDeletions: Boolean - - """ - Are force pushes allowed on this branch. - """ - allowsForcePushes: Boolean - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - Will new commits pushed to matching branches dismiss pull request review approvals. - """ - dismissesStaleReviews: Boolean - - """ - Can admins overwrite branch protection. - """ - isAdminEnforced: Boolean - - """ - The glob-like pattern used to determine matching branches. - """ - pattern: String! - - """ - A list of User, Team or App IDs allowed to push to matching branches. - """ - pushActorIds: [ID!] - - """ - The global relay id of the repository in which a new branch protection rule should be created in. - """ - repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) - - """ - Number of approving reviews required to update matching branches. - """ - requiredApprovingReviewCount: Int - - """ - List of required status check contexts that must pass for commits to be accepted to matching branches. - """ - requiredStatusCheckContexts: [String!] - - """ - Are approving reviews required to update matching branches. - """ - requiresApprovingReviews: Boolean - - """ - Are reviews from code owners required to update matching branches. - """ - requiresCodeOwnerReviews: Boolean - - """ - Are commits required to be signed. - """ - requiresCommitSignatures: Boolean - - """ - Are merge commits prohibited from being pushed to this branch. - """ - requiresLinearHistory: Boolean - - """ - Are status checks required to update matching branches. - """ - requiresStatusChecks: Boolean - - """ - Are branches required to be up to date before merging. - """ - requiresStrictStatusChecks: Boolean - - """ - Is pushing to matching branches restricted. - """ - restrictsPushes: Boolean - - """ - Is dismissal of pull request reviews restricted. - """ - restrictsReviewDismissals: Boolean - - """ - A list of User or Team IDs allowed to dismiss reviews on pull requests targeting matching branches. - """ - reviewDismissalActorIds: [ID!] -} - -""" -Autogenerated return type of CreateBranchProtectionRule -""" -type CreateBranchProtectionRulePayload { - """ - The newly created BranchProtectionRule. - """ - branchProtectionRule: BranchProtectionRule - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String -} - -""" -Autogenerated input type of CreateCheckRun -""" -input CreateCheckRunInput { - """ - Possible further actions the integrator can perform, which a user may trigger. - """ - actions: [CheckRunAction!] - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The time that the check run finished. - """ - completedAt: DateTime - - """ - The final conclusion of the check. - """ - conclusion: CheckConclusionState - - """ - The URL of the integrator's site that has the full details of the check. - """ - detailsUrl: URI - - """ - A reference for the run on the integrator's system. - """ - externalId: String - - """ - The SHA of the head commit. - """ - headSha: GitObjectID! - - """ - The name of the check. - """ - name: String! - - """ - Descriptive details about the run. - """ - output: CheckRunOutput - - """ - The node ID of the repository. - """ - repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) - - """ - The time that the check run began. - """ - startedAt: DateTime - - """ - The current status. - """ - status: RequestableCheckStatusState -} - -""" -Autogenerated return type of CreateCheckRun -""" -type CreateCheckRunPayload { - """ - The newly created check run. - """ - checkRun: CheckRun - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String -} - -""" -Autogenerated input type of CreateCheckSuite -""" -input CreateCheckSuiteInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The SHA of the head commit. - """ - headSha: GitObjectID! - - """ - The Node ID of the repository. - """ - repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) -} - -""" -Autogenerated return type of CreateCheckSuite -""" -type CreateCheckSuitePayload { - """ - The newly created check suite. - """ - checkSuite: CheckSuite - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String -} - -""" -Autogenerated input type of CreateContentAttachment -""" -input CreateContentAttachmentInput { - """ - The body of the content attachment, which may contain markdown. - """ - body: String! - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The node ID of the content_reference. - """ - contentReferenceId: ID! @possibleTypes(concreteTypes: ["ContentReference"]) - - """ - The title of the content attachment. - """ - title: String! -} - -""" -Autogenerated return type of CreateContentAttachment -""" -type CreateContentAttachmentPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The newly created content attachment. - """ - contentAttachment: ContentAttachment -} - -""" -Autogenerated input type of CreateDeployment -""" -input CreateDeploymentInput @preview(toggledBy: "flash-preview") { - """ - Attempt to automatically merge the default branch into the requested ref, defaults to true. - """ - autoMerge: Boolean = true - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - Short description of the deployment. - """ - description: String = "" - - """ - Name for the target deployment environment. - """ - environment: String = "production" - - """ - JSON payload with extra information about the deployment. - """ - payload: String = "{}" - - """ - The node ID of the ref to be deployed. - """ - refId: ID! @possibleTypes(concreteTypes: ["Ref"]) - - """ - The node ID of the repository. - """ - repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) - - """ - The status contexts to verify against commit status checks. To bypass required - contexts, pass an empty array. Defaults to all unique contexts. - """ - requiredContexts: [String!] - - """ - Specifies a task to execute. - """ - task: String = "deploy" -} - -""" -Autogenerated return type of CreateDeployment -""" -type CreateDeploymentPayload @preview(toggledBy: "flash-preview") { - """ - True if the default branch has been auto-merged into the deployment ref. - """ - autoMerged: Boolean - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The new deployment. - """ - deployment: Deployment -} - -""" -Autogenerated input type of CreateDeploymentStatus -""" -input CreateDeploymentStatusInput @preview(toggledBy: "flash-preview") { - """ - Adds a new inactive status to all non-transient, non-production environment - deployments with the same repository and environment name as the created - status's deployment. - """ - autoInactive: Boolean = true - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The node ID of the deployment. - """ - deploymentId: ID! @possibleTypes(concreteTypes: ["Deployment"]) - - """ - A short description of the status. Maximum length of 140 characters. - """ - description: String = "" - - """ - If provided, updates the environment of the deploy. Otherwise, does not modify the environment. - """ - environment: String - - """ - Sets the URL for accessing your environment. - """ - environmentUrl: String = "" - - """ - The log URL to associate with this status. This URL should contain - output to keep the user updated while the task is running or serve as - historical information for what happened in the deployment. - """ - logUrl: String = "" - - """ - The state of the deployment. - """ - state: DeploymentStatusState! -} - -""" -Autogenerated return type of CreateDeploymentStatus -""" -type CreateDeploymentStatusPayload @preview(toggledBy: "flash-preview") { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The new deployment status. - """ - deploymentStatus: DeploymentStatus -} - -""" -Autogenerated input type of CreateEnterpriseOrganization -""" -input CreateEnterpriseOrganizationInput { - """ - The logins for the administrators of the new organization. - """ - adminLogins: [String!]! - - """ - The email used for sending billing receipts. - """ - billingEmail: String! - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the enterprise owning the new organization. - """ - enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) - - """ - The login of the new organization. - """ - login: String! - - """ - The profile name of the new organization. - """ - profileName: String! -} - -""" -Autogenerated return type of CreateEnterpriseOrganization -""" -type CreateEnterpriseOrganizationPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The enterprise that owns the created organization. - """ - enterprise: Enterprise - - """ - The organization that was created. - """ - organization: Organization -} - -""" -Autogenerated input type of CreateIpAllowListEntry -""" -input CreateIpAllowListEntryInput { - """ - An IP address or range of addresses in CIDR notation. - """ - allowListValue: String! - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - Whether the IP allow list entry is active when an IP allow list is enabled. - """ - isActive: Boolean! - - """ - An optional name for the IP allow list entry. - """ - name: String - - """ - The ID of the owner for which to create the new IP allow list entry. - """ - ownerId: ID! @possibleTypes(concreteTypes: ["Enterprise", "Organization"], abstractType: "IpAllowListOwner") -} - -""" -Autogenerated return type of CreateIpAllowListEntry -""" -type CreateIpAllowListEntryPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The IP allow list entry that was created. - """ - ipAllowListEntry: IpAllowListEntry -} - -""" -Autogenerated input type of CreateIssue -""" -input CreateIssueInput { - """ - The Node ID for the user assignee for this issue. - """ - assigneeIds: [ID!] @possibleTypes(concreteTypes: ["User"]) - - """ - The body for the issue description. - """ - body: String - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The name of an issue template in the repository, assigns labels and assignees from the template to the issue - """ - issueTemplate: String - - """ - An array of Node IDs of labels for this issue. - """ - labelIds: [ID!] @possibleTypes(concreteTypes: ["Label"]) - - """ - The Node ID of the milestone for this issue. - """ - milestoneId: ID @possibleTypes(concreteTypes: ["Milestone"]) - - """ - An array of Node IDs for projects associated with this issue. - """ - projectIds: [ID!] @possibleTypes(concreteTypes: ["Project"]) - - """ - The Node ID of the repository. - """ - repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) - - """ - The title for the issue. - """ - title: String! -} - -""" -Autogenerated return type of CreateIssue -""" -type CreateIssuePayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The new issue. - """ - issue: Issue -} - -""" -Autogenerated input type of CreateLabel -""" -input CreateLabelInput @preview(toggledBy: "bane-preview") { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - A 6 character hex code, without the leading #, identifying the color of the label. - """ - color: String! - - """ - A brief description of the label, such as its purpose. - """ - description: String - - """ - The name of the label. - """ - name: String! - - """ - The Node ID of the repository. - """ - repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) -} - -""" -Autogenerated return type of CreateLabel -""" -type CreateLabelPayload @preview(toggledBy: "bane-preview") { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The new label. - """ - label: Label -} - -""" -Autogenerated input type of CreateProject -""" -input CreateProjectInput { - """ - The description of project. - """ - body: String - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The name of project. - """ - name: String! - - """ - The owner ID to create the project under. - """ - ownerId: ID! @possibleTypes(concreteTypes: ["Organization", "Repository", "User"], abstractType: "ProjectOwner") - - """ - A list of repository IDs to create as linked repositories for the project - """ - repositoryIds: [ID!] @possibleTypes(concreteTypes: ["Repository"]) - - """ - The name of the GitHub-provided template. - """ - template: ProjectTemplate -} - -""" -Autogenerated return type of CreateProject -""" -type CreateProjectPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The new project. - """ - project: Project -} - -""" -Autogenerated input type of CreatePullRequest -""" -input CreatePullRequestInput { - """ - The name of the branch you want your changes pulled into. This should be an existing branch - on the current repository. You cannot update the base branch on a pull request to point - to another repository. - """ - baseRefName: String! - - """ - The contents of the pull request. - """ - body: String - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - Indicates whether this pull request should be a draft. - """ - draft: Boolean = false - - """ - The name of the branch where your changes are implemented. For cross-repository pull requests - in the same network, namespace `head_ref_name` with a user like this: `username:branch`. - """ - headRefName: String! - - """ - Indicates whether maintainers can modify the pull request. - """ - maintainerCanModify: Boolean = true - - """ - The Node ID of the repository. - """ - repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) - - """ - The title of the pull request. - """ - title: String! -} - -""" -Autogenerated return type of CreatePullRequest -""" -type CreatePullRequestPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The new pull request. - """ - pullRequest: PullRequest -} - -""" -Autogenerated input type of CreateRef -""" -input CreateRefInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The fully qualified name of the new Ref (ie: `refs/heads/my_new_branch`). - """ - name: String! - - """ - The GitObjectID that the new Ref shall target. Must point to a commit. - """ - oid: GitObjectID! - - """ - The Node ID of the Repository to create the Ref in. - """ - repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) -} - -""" -Autogenerated return type of CreateRef -""" -type CreateRefPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The newly created ref. - """ - ref: Ref -} - -""" -Autogenerated input type of CreateRepository -""" -input CreateRepositoryInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - A short description of the new repository. - """ - description: String - - """ - Indicates if the repository should have the issues feature enabled. - """ - hasIssuesEnabled: Boolean = true - - """ - Indicates if the repository should have the wiki feature enabled. - """ - hasWikiEnabled: Boolean = false - - """ - The URL for a web page about this repository. - """ - homepageUrl: URI - - """ - The name of the new repository. - """ - name: String! - - """ - The ID of the owner for the new repository. - """ - ownerId: ID @possibleTypes(concreteTypes: ["Organization", "User"], abstractType: "RepositoryOwner") - - """ - When an organization is specified as the owner, this ID identifies the team - that should be granted access to the new repository. - """ - teamId: ID @possibleTypes(concreteTypes: ["Team"]) - - """ - Whether this repository should be marked as a template such that anyone who - can access it can create new repositories with the same files and directory structure. - """ - template: Boolean = false - - """ - Indicates the repository's visibility level. - """ - visibility: RepositoryVisibility! -} - -""" -Autogenerated return type of CreateRepository -""" -type CreateRepositoryPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The new repository. - """ - repository: Repository -} - -""" -Autogenerated input type of CreateTeamDiscussionComment -""" -input CreateTeamDiscussionCommentInput { - """ - The content of the comment. - """ - body: String! - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the discussion to which the comment belongs. - """ - discussionId: ID! @possibleTypes(concreteTypes: ["TeamDiscussion"]) -} - -""" -Autogenerated return type of CreateTeamDiscussionComment -""" -type CreateTeamDiscussionCommentPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The new comment. - """ - teamDiscussionComment: TeamDiscussionComment -} - -""" -Autogenerated input type of CreateTeamDiscussion -""" -input CreateTeamDiscussionInput { - """ - The content of the discussion. - """ - body: String! - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - If true, restricts the visibility of this discussion to team members and - organization admins. If false or not specified, allows any organization member - to view this discussion. - """ - private: Boolean - - """ - The ID of the team to which the discussion belongs. - """ - teamId: ID! @possibleTypes(concreteTypes: ["Team"]) - - """ - The title of the discussion. - """ - title: String! -} - -""" -Autogenerated return type of CreateTeamDiscussion -""" -type CreateTeamDiscussionPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The new discussion. - """ - teamDiscussion: TeamDiscussion -} - -""" -Represents the contribution a user made by committing to a repository. -""" -type CreatedCommitContribution implements Contribution { - """ - How many commits were made on this day to this repository by the user. - """ - commitCount: Int! - - """ - Whether this contribution is associated with a record you do not have access to. For - example, your own 'first issue' contribution may have been made on a repository you can no - longer access. - """ - isRestricted: Boolean! - - """ - When this contribution was made. - """ - occurredAt: DateTime! - - """ - The repository the user made a commit in. - """ - repository: Repository! - - """ - The HTTP path for this contribution. - """ - resourcePath: URI! - - """ - The HTTP URL for this contribution. - """ - url: URI! - - """ - The user who made this contribution. - """ - user: User! -} - -""" -The connection type for CreatedCommitContribution. -""" -type CreatedCommitContributionConnection { - """ - A list of edges. - """ - edges: [CreatedCommitContributionEdge] - - """ - A list of nodes. - """ - nodes: [CreatedCommitContribution] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of commits across days and repositories in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type CreatedCommitContributionEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: CreatedCommitContribution -} - -""" -Represents the contribution a user made on GitHub by opening an issue. -""" -type CreatedIssueContribution implements Contribution { - """ - Whether this contribution is associated with a record you do not have access to. For - example, your own 'first issue' contribution may have been made on a repository you can no - longer access. - """ - isRestricted: Boolean! - - """ - The issue that was opened. - """ - issue: Issue! - - """ - When this contribution was made. - """ - occurredAt: DateTime! - - """ - The HTTP path for this contribution. - """ - resourcePath: URI! - - """ - The HTTP URL for this contribution. - """ - url: URI! - - """ - The user who made this contribution. - """ - user: User! -} - -""" -The connection type for CreatedIssueContribution. -""" -type CreatedIssueContributionConnection { - """ - A list of edges. - """ - edges: [CreatedIssueContributionEdge] - - """ - A list of nodes. - """ - nodes: [CreatedIssueContribution] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type CreatedIssueContributionEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: CreatedIssueContribution -} - -""" -Represents either a issue the viewer can access or a restricted contribution. -""" -union CreatedIssueOrRestrictedContribution = CreatedIssueContribution | RestrictedContribution - -""" -Represents the contribution a user made on GitHub by opening a pull request. -""" -type CreatedPullRequestContribution implements Contribution { - """ - Whether this contribution is associated with a record you do not have access to. For - example, your own 'first issue' contribution may have been made on a repository you can no - longer access. - """ - isRestricted: Boolean! - - """ - When this contribution was made. - """ - occurredAt: DateTime! - - """ - The pull request that was opened. - """ - pullRequest: PullRequest! - - """ - The HTTP path for this contribution. - """ - resourcePath: URI! - - """ - The HTTP URL for this contribution. - """ - url: URI! - - """ - The user who made this contribution. - """ - user: User! -} - -""" -The connection type for CreatedPullRequestContribution. -""" -type CreatedPullRequestContributionConnection { - """ - A list of edges. - """ - edges: [CreatedPullRequestContributionEdge] - - """ - A list of nodes. - """ - nodes: [CreatedPullRequestContribution] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type CreatedPullRequestContributionEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: CreatedPullRequestContribution -} - -""" -Represents either a pull request the viewer can access or a restricted contribution. -""" -union CreatedPullRequestOrRestrictedContribution = CreatedPullRequestContribution | RestrictedContribution - -""" -Represents the contribution a user made by leaving a review on a pull request. -""" -type CreatedPullRequestReviewContribution implements Contribution { - """ - Whether this contribution is associated with a record you do not have access to. For - example, your own 'first issue' contribution may have been made on a repository you can no - longer access. - """ - isRestricted: Boolean! - - """ - When this contribution was made. - """ - occurredAt: DateTime! - - """ - The pull request the user reviewed. - """ - pullRequest: PullRequest! - - """ - The review the user left on the pull request. - """ - pullRequestReview: PullRequestReview! - - """ - The repository containing the pull request that the user reviewed. - """ - repository: Repository! - - """ - The HTTP path for this contribution. - """ - resourcePath: URI! - - """ - The HTTP URL for this contribution. - """ - url: URI! - - """ - The user who made this contribution. - """ - user: User! -} - -""" -The connection type for CreatedPullRequestReviewContribution. -""" -type CreatedPullRequestReviewContributionConnection { - """ - A list of edges. - """ - edges: [CreatedPullRequestReviewContributionEdge] - - """ - A list of nodes. - """ - nodes: [CreatedPullRequestReviewContribution] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type CreatedPullRequestReviewContributionEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: CreatedPullRequestReviewContribution -} - -""" -Represents the contribution a user made on GitHub by creating a repository. -""" -type CreatedRepositoryContribution implements Contribution { - """ - Whether this contribution is associated with a record you do not have access to. For - example, your own 'first issue' contribution may have been made on a repository you can no - longer access. - """ - isRestricted: Boolean! - - """ - When this contribution was made. - """ - occurredAt: DateTime! - - """ - The repository that was created. - """ - repository: Repository! - - """ - The HTTP path for this contribution. - """ - resourcePath: URI! - - """ - The HTTP URL for this contribution. - """ - url: URI! - - """ - The user who made this contribution. - """ - user: User! -} - -""" -The connection type for CreatedRepositoryContribution. -""" -type CreatedRepositoryContributionConnection { - """ - A list of edges. - """ - edges: [CreatedRepositoryContributionEdge] - - """ - A list of nodes. - """ - nodes: [CreatedRepositoryContribution] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type CreatedRepositoryContributionEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: CreatedRepositoryContribution -} - -""" -Represents either a repository the viewer can access or a restricted contribution. -""" -union CreatedRepositoryOrRestrictedContribution = CreatedRepositoryContribution | RestrictedContribution - -""" -Represents a mention made by one issue or pull request to another. -""" -type CrossReferencedEvent implements Node & UniformResourceLocatable { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! - - """ - Reference originated in a different repository. - """ - isCrossRepository: Boolean! - - """ - Identifies when the reference was made. - """ - referencedAt: DateTime! - - """ - The HTTP path for this pull request. - """ - resourcePath: URI! - - """ - Issue or pull request that made the reference. - """ - source: ReferencedSubject! - - """ - Issue or pull request to which the reference was made. - """ - target: ReferencedSubject! - - """ - The HTTP URL for this pull request. - """ - url: URI! - - """ - Checks if the target will be closed when the source is merged. - """ - willCloseTarget: Boolean! -} - -""" -An ISO-8601 encoded date string. -""" -scalar Date - -""" -An ISO-8601 encoded UTC date string. -""" -scalar DateTime - -""" -Autogenerated input type of DeclineTopicSuggestion -""" -input DeclineTopicSuggestionInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The name of the suggested topic. - """ - name: String! - - """ - The reason why the suggested topic is declined. - """ - reason: TopicSuggestionDeclineReason! - - """ - The Node ID of the repository. - """ - repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) -} - -""" -Autogenerated return type of DeclineTopicSuggestion -""" -type DeclineTopicSuggestionPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The declined topic. - """ - topic: Topic -} - -""" -The possible default permissions for repositories. -""" -enum DefaultRepositoryPermissionField { - """ - Can read, write, and administrate repos by default - """ - ADMIN - - """ - No access - """ - NONE - - """ - Can read repos by default - """ - READ - - """ - Can read and write repos by default - """ - WRITE -} - -""" -Entities that can be deleted. -""" -interface Deletable { - """ - Check if the current viewer can delete this object. - """ - viewerCanDelete: Boolean! -} - -""" -Autogenerated input type of DeleteBranchProtectionRule -""" -input DeleteBranchProtectionRuleInput { - """ - The global relay id of the branch protection rule to be deleted. - """ - branchProtectionRuleId: ID! @possibleTypes(concreteTypes: ["BranchProtectionRule"]) - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String -} - -""" -Autogenerated return type of DeleteBranchProtectionRule -""" -type DeleteBranchProtectionRulePayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String -} - -""" -Autogenerated input type of DeleteDeployment -""" -input DeleteDeploymentInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The Node ID of the deployment to be deleted. - """ - id: ID! @possibleTypes(concreteTypes: ["Deployment"]) -} - -""" -Autogenerated return type of DeleteDeployment -""" -type DeleteDeploymentPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String -} - -""" -Autogenerated input type of DeleteIpAllowListEntry -""" -input DeleteIpAllowListEntryInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the IP allow list entry to delete. - """ - ipAllowListEntryId: ID! @possibleTypes(concreteTypes: ["IpAllowListEntry"]) -} - -""" -Autogenerated return type of DeleteIpAllowListEntry -""" -type DeleteIpAllowListEntryPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The IP allow list entry that was deleted. - """ - ipAllowListEntry: IpAllowListEntry -} - -""" -Autogenerated input type of DeleteIssueComment -""" -input DeleteIssueCommentInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the comment to delete. - """ - id: ID! @possibleTypes(concreteTypes: ["IssueComment"]) -} - -""" -Autogenerated return type of DeleteIssueComment -""" -type DeleteIssueCommentPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String -} - -""" -Autogenerated input type of DeleteIssue -""" -input DeleteIssueInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the issue to delete. - """ - issueId: ID! @possibleTypes(concreteTypes: ["Issue"]) -} - -""" -Autogenerated return type of DeleteIssue -""" -type DeleteIssuePayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The repository the issue belonged to - """ - repository: Repository -} - -""" -Autogenerated input type of DeleteLabel -""" -input DeleteLabelInput @preview(toggledBy: "bane-preview") { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The Node ID of the label to be deleted. - """ - id: ID! @possibleTypes(concreteTypes: ["Label"]) -} - -""" -Autogenerated return type of DeleteLabel -""" -type DeleteLabelPayload @preview(toggledBy: "bane-preview") { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String -} - -""" -Autogenerated input type of DeletePackageVersion -""" -input DeletePackageVersionInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the package version to be deleted. - """ - packageVersionId: ID! @possibleTypes(concreteTypes: ["PackageVersion"]) -} - -""" -Autogenerated return type of DeletePackageVersion -""" -type DeletePackageVersionPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - Whether or not the operation succeeded. - """ - success: Boolean -} - -""" -Autogenerated input type of DeleteProjectCard -""" -input DeleteProjectCardInput { - """ - The id of the card to delete. - """ - cardId: ID! @possibleTypes(concreteTypes: ["ProjectCard"]) - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String -} - -""" -Autogenerated return type of DeleteProjectCard -""" -type DeleteProjectCardPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The column the deleted card was in. - """ - column: ProjectColumn - - """ - The deleted card ID. - """ - deletedCardId: ID -} - -""" -Autogenerated input type of DeleteProjectColumn -""" -input DeleteProjectColumnInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The id of the column to delete. - """ - columnId: ID! @possibleTypes(concreteTypes: ["ProjectColumn"]) -} - -""" -Autogenerated return type of DeleteProjectColumn -""" -type DeleteProjectColumnPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The deleted column ID. - """ - deletedColumnId: ID - - """ - The project the deleted column was in. - """ - project: Project -} - -""" -Autogenerated input type of DeleteProject -""" -input DeleteProjectInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The Project ID to update. - """ - projectId: ID! @possibleTypes(concreteTypes: ["Project"]) -} - -""" -Autogenerated return type of DeleteProject -""" -type DeleteProjectPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The repository or organization the project was removed from. - """ - owner: ProjectOwner -} - -""" -Autogenerated input type of DeletePullRequestReviewComment -""" -input DeletePullRequestReviewCommentInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the comment to delete. - """ - id: ID! @possibleTypes(concreteTypes: ["PullRequestReviewComment"]) -} - -""" -Autogenerated return type of DeletePullRequestReviewComment -""" -type DeletePullRequestReviewCommentPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The pull request review the deleted comment belonged to. - """ - pullRequestReview: PullRequestReview -} - -""" -Autogenerated input type of DeletePullRequestReview -""" -input DeletePullRequestReviewInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The Node ID of the pull request review to delete. - """ - pullRequestReviewId: ID! @possibleTypes(concreteTypes: ["PullRequestReview"]) -} - -""" -Autogenerated return type of DeletePullRequestReview -""" -type DeletePullRequestReviewPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The deleted pull request review. - """ - pullRequestReview: PullRequestReview -} - -""" -Autogenerated input type of DeleteRef -""" -input DeleteRefInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The Node ID of the Ref to be deleted. - """ - refId: ID! @possibleTypes(concreteTypes: ["Ref"]) -} - -""" -Autogenerated return type of DeleteRef -""" -type DeleteRefPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String -} - -""" -Autogenerated input type of DeleteTeamDiscussionComment -""" -input DeleteTeamDiscussionCommentInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the comment to delete. - """ - id: ID! @possibleTypes(concreteTypes: ["TeamDiscussionComment"]) -} - -""" -Autogenerated return type of DeleteTeamDiscussionComment -""" -type DeleteTeamDiscussionCommentPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String -} - -""" -Autogenerated input type of DeleteTeamDiscussion -""" -input DeleteTeamDiscussionInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The discussion ID to delete. - """ - id: ID! @possibleTypes(concreteTypes: ["TeamDiscussion"]) -} - -""" -Autogenerated return type of DeleteTeamDiscussion -""" -type DeleteTeamDiscussionPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String -} - -""" -Autogenerated input type of DeleteVerifiableDomain -""" -input DeleteVerifiableDomainInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the verifiable domain to delete. - """ - id: ID! @possibleTypes(concreteTypes: ["VerifiableDomain"]) -} - -""" -Autogenerated return type of DeleteVerifiableDomain -""" -type DeleteVerifiableDomainPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The owning account from which the domain was deleted. - """ - owner: VerifiableDomainOwner -} - -""" -Represents a 'demilestoned' event on a given issue or pull request. -""" -type DemilestonedEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! - - """ - Identifies the milestone title associated with the 'demilestoned' event. - """ - milestoneTitle: String! - - """ - Object referenced by event. - """ - subject: MilestoneItem! -} - -""" -A dependency manifest entry -""" -type DependencyGraphDependency @preview(toggledBy: "hawkgirl-preview") { - """ - Does the dependency itself have dependencies? - """ - hasDependencies: Boolean! - - """ - The dependency package manager - """ - packageManager: String - - """ - The required package name - """ - packageName: String! - - """ - The repository containing the package - """ - repository: Repository - - """ - The dependency version requirements - """ - requirements: String! -} - -""" -The connection type for DependencyGraphDependency. -""" -type DependencyGraphDependencyConnection @preview(toggledBy: "hawkgirl-preview") { - """ - A list of edges. - """ - edges: [DependencyGraphDependencyEdge] - - """ - A list of nodes. - """ - nodes: [DependencyGraphDependency] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type DependencyGraphDependencyEdge @preview(toggledBy: "hawkgirl-preview") { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: DependencyGraphDependency -} - -""" -Dependency manifest for a repository -""" -type DependencyGraphManifest implements Node @preview(toggledBy: "hawkgirl-preview") { - """ - Path to view the manifest file blob - """ - blobPath: String! - - """ - A list of manifest dependencies - """ - dependencies( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): DependencyGraphDependencyConnection - - """ - The number of dependencies listed in the manifest - """ - dependenciesCount: Int - - """ - Is the manifest too big to parse? - """ - exceedsMaxSize: Boolean! - - """ - Fully qualified manifest filename - """ - filename: String! - id: ID! - - """ - Were we able to parse the manifest? - """ - parseable: Boolean! - - """ - The repository containing the manifest - """ - repository: Repository! -} - -""" -The connection type for DependencyGraphManifest. -""" -type DependencyGraphManifestConnection @preview(toggledBy: "hawkgirl-preview") { - """ - A list of edges. - """ - edges: [DependencyGraphManifestEdge] - - """ - A list of nodes. - """ - nodes: [DependencyGraphManifest] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type DependencyGraphManifestEdge @preview(toggledBy: "hawkgirl-preview") { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: DependencyGraphManifest -} - -""" -A repository deploy key. -""" -type DeployKey implements Node { - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! - - """ - The deploy key. - """ - key: String! - - """ - Whether or not the deploy key is read only. - """ - readOnly: Boolean! - - """ - The deploy key title. - """ - title: String! - - """ - Whether or not the deploy key has been verified. - """ - verified: Boolean! -} - -""" -The connection type for DeployKey. -""" -type DeployKeyConnection { - """ - A list of edges. - """ - edges: [DeployKeyEdge] - - """ - A list of nodes. - """ - nodes: [DeployKey] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type DeployKeyEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: DeployKey -} - -""" -Represents a 'deployed' event on a given pull request. -""" -type DeployedEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - - """ - The deployment associated with the 'deployed' event. - """ - deployment: Deployment! - id: ID! - - """ - PullRequest referenced by event. - """ - pullRequest: PullRequest! - - """ - The ref associated with the 'deployed' event. - """ - ref: Ref -} - -""" -Represents triggered deployment instance. -""" -type Deployment implements Node { - """ - Identifies the commit sha of the deployment. - """ - commit: Commit - - """ - Identifies the oid of the deployment commit, even if the commit has been deleted. - """ - commitOid: String! - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Identifies the actor who triggered the deployment. - """ - creator: Actor! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - - """ - The deployment description. - """ - description: String - - """ - The latest environment to which this deployment was made. - """ - environment: String - id: ID! - - """ - The latest environment to which this deployment was made. - """ - latestEnvironment: String - - """ - The latest status of this deployment. - """ - latestStatus: DeploymentStatus - - """ - The original environment to which this deployment was made. - """ - originalEnvironment: String - - """ - Extra information that a deployment system might need. - """ - payload: String - - """ - Identifies the Ref of the deployment, if the deployment was created by ref. - """ - ref: Ref - - """ - Identifies the repository associated with the deployment. - """ - repository: Repository! - - """ - The current state of the deployment. - """ - state: DeploymentState - - """ - A list of statuses associated with the deployment. - """ - statuses( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): DeploymentStatusConnection - - """ - The deployment task. - """ - task: String - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! -} - -""" -The connection type for Deployment. -""" -type DeploymentConnection { - """ - A list of edges. - """ - edges: [DeploymentEdge] - - """ - A list of nodes. - """ - nodes: [Deployment] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type DeploymentEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: Deployment -} - -""" -Represents a 'deployment_environment_changed' event on a given pull request. -""" -type DeploymentEnvironmentChangedEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - The deployment status that updated the deployment environment. - """ - deploymentStatus: DeploymentStatus! - id: ID! - - """ - PullRequest referenced by event. - """ - pullRequest: PullRequest! -} - -""" -Ordering options for deployment connections -""" -input DeploymentOrder { - """ - The ordering direction. - """ - direction: OrderDirection! - - """ - The field to order deployments by. - """ - field: DeploymentOrderField! -} - -""" -Properties by which deployment connections can be ordered. -""" -enum DeploymentOrderField { - """ - Order collection by creation time - """ - CREATED_AT -} - -""" -The possible states in which a deployment can be. -""" -enum DeploymentState { - """ - The pending deployment was not updated after 30 minutes. - """ - ABANDONED - - """ - The deployment is currently active. - """ - ACTIVE - - """ - An inactive transient deployment. - """ - DESTROYED - - """ - The deployment experienced an error. - """ - ERROR - - """ - The deployment has failed. - """ - FAILURE - - """ - The deployment is inactive. - """ - INACTIVE - - """ - The deployment is in progress. - """ - IN_PROGRESS - - """ - The deployment is pending. - """ - PENDING - - """ - The deployment has queued - """ - QUEUED - - """ - The deployment is waiting. - """ - WAITING -} - -""" -Describes the status of a given deployment attempt. -""" -type DeploymentStatus implements Node { - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Identifies the actor who triggered the deployment. - """ - creator: Actor! - - """ - Identifies the deployment associated with status. - """ - deployment: Deployment! - - """ - Identifies the description of the deployment. - """ - description: String - - """ - Identifies the environment of the deployment at the time of this deployment status - """ - environment: String @preview(toggledBy: "flash-preview") - - """ - Identifies the environment URL of the deployment. - """ - environmentUrl: URI - id: ID! - - """ - Identifies the log URL of the deployment. - """ - logUrl: URI - - """ - Identifies the current state of the deployment. - """ - state: DeploymentStatusState! - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! -} - -""" -The connection type for DeploymentStatus. -""" -type DeploymentStatusConnection { - """ - A list of edges. - """ - edges: [DeploymentStatusEdge] - - """ - A list of nodes. - """ - nodes: [DeploymentStatus] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type DeploymentStatusEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: DeploymentStatus -} - -""" -The possible states for a deployment status. -""" -enum DeploymentStatusState { - """ - The deployment experienced an error. - """ - ERROR - - """ - The deployment has failed. - """ - FAILURE - - """ - The deployment is inactive. - """ - INACTIVE - - """ - The deployment is in progress. - """ - IN_PROGRESS - - """ - The deployment is pending. - """ - PENDING - - """ - The deployment is queued - """ - QUEUED - - """ - The deployment was successful. - """ - SUCCESS - - """ - The deployment is waiting. - """ - WAITING -} - -""" -The possible sides of a diff. -""" -enum DiffSide { - """ - The left side of the diff. - """ - LEFT - - """ - The right side of the diff. - """ - RIGHT -} - -""" -Autogenerated input type of DisablePullRequestAutoMerge -""" -input DisablePullRequestAutoMergeInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - ID of the pull request to disable auto merge on. - """ - pullRequestId: ID! @possibleTypes(concreteTypes: ["PullRequest"]) -} - -""" -Autogenerated return type of DisablePullRequestAutoMerge -""" -type DisablePullRequestAutoMergePayload { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The pull request auto merge was disabled on. - """ - pullRequest: PullRequest -} - -""" -Represents a 'disconnected' event on a given issue or pull request. -""" -type DisconnectedEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! - - """ - Reference originated in a different repository. - """ - isCrossRepository: Boolean! - - """ - Issue or pull request from which the issue was disconnected. - """ - source: ReferencedSubject! - - """ - Issue or pull request which was disconnected. - """ - subject: ReferencedSubject! -} - -""" -Autogenerated input type of DismissPullRequestReview -""" -input DismissPullRequestReviewInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The contents of the pull request review dismissal message. - """ - message: String! - - """ - The Node ID of the pull request review to modify. - """ - pullRequestReviewId: ID! @possibleTypes(concreteTypes: ["PullRequestReview"]) -} - -""" -Autogenerated return type of DismissPullRequestReview -""" -type DismissPullRequestReviewPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The dismissed pull request review. - """ - pullRequestReview: PullRequestReview -} - -""" -Specifies a review comment to be left with a Pull Request Review. -""" -input DraftPullRequestReviewComment { - """ - Body of the comment to leave. - """ - body: String! - - """ - Path to the file being commented on. - """ - path: String! - - """ - Position in the file to leave a comment on. - """ - position: Int! -} - -""" -Specifies a review comment thread to be left with a Pull Request Review. -""" -input DraftPullRequestReviewThread { - """ - Body of the comment to leave. - """ - body: String! - - """ - The line of the blob to which the thread refers. The end of the line range for multi-line comments. - """ - line: Int! - - """ - Path to the file being commented on. - """ - path: String! - - """ - The side of the diff on which the line resides. For multi-line comments, this is the side for the end of the line range. - """ - side: DiffSide = RIGHT - - """ - The first line of the range to which the comment refers. - """ - startLine: Int - - """ - The side of the diff on which the start line resides. - """ - startSide: DiffSide = RIGHT -} - -""" -Autogenerated input type of EnablePullRequestAutoMerge -""" -input EnablePullRequestAutoMergeInput { - """ - The email address to associate with this merge. - """ - authorEmail: String - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - Commit body to use for the commit when the PR is mergable; if omitted, a default message will be used. - """ - commitBody: String - - """ - Commit headline to use for the commit when the PR is mergable; if omitted, a default message will be used. - """ - commitHeadline: String - - """ - The merge method to use. If omitted, defaults to 'MERGE' - """ - mergeMethod: PullRequestMergeMethod = MERGE - - """ - ID of the pull request to enable auto-merge on. - """ - pullRequestId: ID! @possibleTypes(concreteTypes: ["PullRequest"]) -} - -""" -Autogenerated return type of EnablePullRequestAutoMerge -""" -type EnablePullRequestAutoMergePayload { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The pull request auto-merge was enabled on. - """ - pullRequest: PullRequest -} - -""" -An account to manage multiple organizations with consolidated policy and billing. -""" -type Enterprise implements Node { - """ - A URL pointing to the enterprise's public avatar. - """ - avatarUrl( - """ - The size of the resulting square image. - """ - size: Int - ): URI! - - """ - Enterprise billing information visible to enterprise billing managers. - """ - billingInfo: EnterpriseBillingInfo - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - - """ - The description of the enterprise. - """ - description: String - - """ - The description of the enterprise as HTML. - """ - descriptionHTML: HTML! - id: ID! - - """ - The location of the enterprise. - """ - location: String - - """ - A list of users who are members of this enterprise. - """ - members( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Only return members within the selected GitHub Enterprise deployment - """ - deployment: EnterpriseUserDeployment - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for members returned from the connection. - """ - orderBy: EnterpriseMemberOrder = {field: LOGIN, direction: ASC} - - """ - Only return members within the organizations with these logins - """ - organizationLogins: [String!] - - """ - The search string to look for. - """ - query: String - - """ - The role of the user in the enterprise organization or server. - """ - role: EnterpriseUserAccountMembershipRole - ): EnterpriseMemberConnection! - - """ - The name of the enterprise. - """ - name: String! - - """ - A list of organizations that belong to this enterprise. - """ - organizations( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for organizations returned from the connection. - """ - orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} - - """ - The search string to look for. - """ - query: String - ): OrganizationConnection! - - """ - Enterprise information only visible to enterprise owners. - """ - ownerInfo: EnterpriseOwnerInfo - - """ - The HTTP path for this enterprise. - """ - resourcePath: URI! - - """ - The URL-friendly identifier for the enterprise. - """ - slug: String! - - """ - The HTTP URL for this enterprise. - """ - url: URI! - - """ - A list of user accounts on this enterprise. - """ - userAccounts( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): EnterpriseUserAccountConnection! - - """ - Is the current viewer an admin of this enterprise? - """ - viewerIsAdmin: Boolean! - - """ - The URL of the enterprise website. - """ - websiteUrl: URI -} - -""" -The connection type for User. -""" -type EnterpriseAdministratorConnection { - """ - A list of edges. - """ - edges: [EnterpriseAdministratorEdge] - - """ - A list of nodes. - """ - nodes: [User] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -A User who is an administrator of an enterprise. -""" -type EnterpriseAdministratorEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: User - - """ - The role of the administrator. - """ - role: EnterpriseAdministratorRole! -} - -""" -An invitation for a user to become an owner or billing manager of an enterprise. -""" -type EnterpriseAdministratorInvitation implements Node { - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - The email of the person who was invited to the enterprise. - """ - email: String - - """ - The enterprise the invitation is for. - """ - enterprise: Enterprise! - id: ID! - - """ - The user who was invited to the enterprise. - """ - invitee: User - - """ - The user who created the invitation. - """ - inviter: User - - """ - The invitee's pending role in the enterprise (owner or billing_manager). - """ - role: EnterpriseAdministratorRole! -} - -""" -The connection type for EnterpriseAdministratorInvitation. -""" -type EnterpriseAdministratorInvitationConnection { - """ - A list of edges. - """ - edges: [EnterpriseAdministratorInvitationEdge] - - """ - A list of nodes. - """ - nodes: [EnterpriseAdministratorInvitation] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type EnterpriseAdministratorInvitationEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: EnterpriseAdministratorInvitation -} - -""" -Ordering options for enterprise administrator invitation connections -""" -input EnterpriseAdministratorInvitationOrder { - """ - The ordering direction. - """ - direction: OrderDirection! - - """ - The field to order enterprise administrator invitations by. - """ - field: EnterpriseAdministratorInvitationOrderField! -} - -""" -Properties by which enterprise administrator invitation connections can be ordered. -""" -enum EnterpriseAdministratorInvitationOrderField { - """ - Order enterprise administrator member invitations by creation time - """ - CREATED_AT -} - -""" -The possible administrator roles in an enterprise account. -""" -enum EnterpriseAdministratorRole { - """ - Represents a billing manager of the enterprise account. - """ - BILLING_MANAGER - - """ - Represents an owner of the enterprise account. - """ - OWNER -} - -""" -Metadata for an audit entry containing enterprise account information. -""" -interface EnterpriseAuditEntryData { - """ - The HTTP path for this enterprise. - """ - enterpriseResourcePath: URI - - """ - The slug of the enterprise. - """ - enterpriseSlug: String - - """ - The HTTP URL for this enterprise. - """ - enterpriseUrl: URI -} - -""" -Enterprise billing information visible to enterprise billing managers and owners. -""" -type EnterpriseBillingInfo { - """ - The number of licenseable users/emails across the enterprise. - """ - allLicensableUsersCount: Int! - - """ - The number of data packs used by all organizations owned by the enterprise. - """ - assetPacks: Int! - - """ - The number of available seats across all owned organizations based on the unique number of billable users. - """ - availableSeats: Int! @deprecated(reason: "`availableSeats` will be replaced with `totalAvailableLicenses` to provide more clarity on the value being returned Use EnterpriseBillingInfo.totalAvailableLicenses instead. Removal on 2020-01-01 UTC.") - - """ - The bandwidth quota in GB for all organizations owned by the enterprise. - """ - bandwidthQuota: Float! - - """ - The bandwidth usage in GB for all organizations owned by the enterprise. - """ - bandwidthUsage: Float! - - """ - The bandwidth usage as a percentage of the bandwidth quota. - """ - bandwidthUsagePercentage: Int! - - """ - The total seats across all organizations owned by the enterprise. - """ - seats: Int! @deprecated(reason: "`seats` will be replaced with `totalLicenses` to provide more clarity on the value being returned Use EnterpriseBillingInfo.totalLicenses instead. Removal on 2020-01-01 UTC.") - - """ - The storage quota in GB for all organizations owned by the enterprise. - """ - storageQuota: Float! - - """ - The storage usage in GB for all organizations owned by the enterprise. - """ - storageUsage: Float! - - """ - The storage usage as a percentage of the storage quota. - """ - storageUsagePercentage: Int! - - """ - The number of available licenses across all owned organizations based on the unique number of billable users. - """ - totalAvailableLicenses: Int! - - """ - The total number of licenses allocated. - """ - totalLicenses: Int! -} - -""" -The possible values for the enterprise default repository permission setting. -""" -enum EnterpriseDefaultRepositoryPermissionSettingValue { - """ - Organization members will be able to clone, pull, push, and add new collaborators to all organization repositories. - """ - ADMIN - - """ - Organization members will only be able to clone and pull public repositories. - """ - NONE - - """ - Organizations in the enterprise choose default repository permissions for their members. - """ - NO_POLICY - - """ - Organization members will be able to clone and pull all organization repositories. - """ - READ - - """ - Organization members will be able to clone, pull, and push all organization repositories. - """ - WRITE -} - -""" -The possible values for an enabled/disabled enterprise setting. -""" -enum EnterpriseEnabledDisabledSettingValue { - """ - The setting is disabled for organizations in the enterprise. - """ - DISABLED - - """ - The setting is enabled for organizations in the enterprise. - """ - ENABLED - - """ - There is no policy set for organizations in the enterprise. - """ - NO_POLICY -} - -""" -The possible values for an enabled/no policy enterprise setting. -""" -enum EnterpriseEnabledSettingValue { - """ - The setting is enabled for organizations in the enterprise. - """ - ENABLED - - """ - There is no policy set for organizations in the enterprise. - """ - NO_POLICY -} - -""" -An identity provider configured to provision identities for an enterprise. -""" -type EnterpriseIdentityProvider implements Node { - """ - The digest algorithm used to sign SAML requests for the identity provider. - """ - digestMethod: SamlDigestAlgorithm - - """ - The enterprise this identity provider belongs to. - """ - enterprise: Enterprise - - """ - ExternalIdentities provisioned by this identity provider. - """ - externalIdentities( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): ExternalIdentityConnection! - id: ID! - - """ - The x509 certificate used by the identity provider to sign assertions and responses. - """ - idpCertificate: X509Certificate - - """ - The Issuer Entity ID for the SAML identity provider. - """ - issuer: String - - """ - Recovery codes that can be used by admins to access the enterprise if the identity provider is unavailable. - """ - recoveryCodes: [String!] - - """ - The signature algorithm used to sign SAML requests for the identity provider. - """ - signatureMethod: SamlSignatureAlgorithm - - """ - The URL endpoint for the identity provider's SAML SSO. - """ - ssoUrl: URI -} - -""" -An object that is a member of an enterprise. -""" -union EnterpriseMember = EnterpriseUserAccount | User - -""" -The connection type for EnterpriseMember. -""" -type EnterpriseMemberConnection { - """ - A list of edges. - """ - edges: [EnterpriseMemberEdge] - - """ - A list of nodes. - """ - nodes: [EnterpriseMember] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -A User who is a member of an enterprise through one or more organizations. -""" -type EnterpriseMemberEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - Whether the user does not have a license for the enterprise. - """ - isUnlicensed: Boolean! @deprecated(reason: "All members consume a license Removal on 2021-01-01 UTC.") - - """ - The item at the end of the edge. - """ - node: EnterpriseMember -} - -""" -Ordering options for enterprise member connections. -""" -input EnterpriseMemberOrder { - """ - The ordering direction. - """ - direction: OrderDirection! - - """ - The field to order enterprise members by. - """ - field: EnterpriseMemberOrderField! -} - -""" -Properties by which enterprise member connections can be ordered. -""" -enum EnterpriseMemberOrderField { - """ - Order enterprise members by creation time - """ - CREATED_AT - - """ - Order enterprise members by login - """ - LOGIN -} - -""" -The possible values for the enterprise members can create repositories setting. -""" -enum EnterpriseMembersCanCreateRepositoriesSettingValue { - """ - Members will be able to create public and private repositories. - """ - ALL - - """ - Members will not be able to create public or private repositories. - """ - DISABLED - - """ - Organization administrators choose whether to allow members to create repositories. - """ - NO_POLICY - - """ - Members will be able to create only private repositories. - """ - PRIVATE - - """ - Members will be able to create only public repositories. - """ - PUBLIC -} - -""" -The possible values for the members can make purchases setting. -""" -enum EnterpriseMembersCanMakePurchasesSettingValue { - """ - The setting is disabled for organizations in the enterprise. - """ - DISABLED - - """ - The setting is enabled for organizations in the enterprise. - """ - ENABLED -} - -""" -The connection type for Organization. -""" -type EnterpriseOrganizationMembershipConnection { - """ - A list of edges. - """ - edges: [EnterpriseOrganizationMembershipEdge] - - """ - A list of nodes. - """ - nodes: [Organization] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An enterprise organization that a user is a member of. -""" -type EnterpriseOrganizationMembershipEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: Organization - - """ - The role of the user in the enterprise membership. - """ - role: EnterpriseUserAccountMembershipRole! -} - -""" -The connection type for User. -""" -type EnterpriseOutsideCollaboratorConnection { - """ - A list of edges. - """ - edges: [EnterpriseOutsideCollaboratorEdge] - - """ - A list of nodes. - """ - nodes: [User] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -A User who is an outside collaborator of an enterprise through one or more organizations. -""" -type EnterpriseOutsideCollaboratorEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - Whether the outside collaborator does not have a license for the enterprise. - """ - isUnlicensed: Boolean! @deprecated(reason: "All outside collaborators consume a license Removal on 2021-01-01 UTC.") - - """ - The item at the end of the edge. - """ - node: User - - """ - The enterprise organization repositories this user is a member of. - """ - repositories( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for repositories. - """ - orderBy: RepositoryOrder = {field: NAME, direction: ASC} - ): EnterpriseRepositoryInfoConnection! -} - -""" -Enterprise information only visible to enterprise owners. -""" -type EnterpriseOwnerInfo { - """ - A list of all of the administrators for this enterprise. - """ - admins( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for administrators returned from the connection. - """ - orderBy: EnterpriseMemberOrder = {field: LOGIN, direction: ASC} - - """ - The search string to look for. - """ - query: String - - """ - The role to filter by. - """ - role: EnterpriseAdministratorRole - ): EnterpriseAdministratorConnection! - - """ - A list of users in the enterprise who currently have two-factor authentication disabled. - """ - affiliatedUsersWithTwoFactorDisabled( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): UserConnection! - - """ - Whether or not affiliated users with two-factor authentication disabled exist in the enterprise. - """ - affiliatedUsersWithTwoFactorDisabledExist: Boolean! - - """ - The setting value for whether private repository forking is enabled for repositories in organizations in this enterprise. - """ - allowPrivateRepositoryForkingSetting: EnterpriseEnabledDisabledSettingValue! - - """ - A list of enterprise organizations configured with the provided private repository forking setting value. - """ - allowPrivateRepositoryForkingSettingOrganizations( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for organizations with this setting. - """ - orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} - - """ - The setting value to find organizations for. - """ - value: Boolean! - ): OrganizationConnection! - - """ - The setting value for base repository permissions for organizations in this enterprise. - """ - defaultRepositoryPermissionSetting: EnterpriseDefaultRepositoryPermissionSettingValue! - - """ - A list of enterprise organizations configured with the provided default repository permission. - """ - defaultRepositoryPermissionSettingOrganizations( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for organizations with this setting. - """ - orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} - - """ - The permission to find organizations for. - """ - value: DefaultRepositoryPermissionField! - ): OrganizationConnection! - - """ - A list of domains owned by the enterprise. - """ - domains( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Filter whether or not the domain is verified. - """ - isVerified: Boolean = null - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for verifiable domains returned. - """ - orderBy: VerifiableDomainOrder = {field: DOMAIN, direction: ASC} - ): VerifiableDomainConnection! - - """ - Enterprise Server installations owned by the enterprise. - """ - enterpriseServerInstallations( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Whether or not to only return installations discovered via GitHub Connect. - """ - connectedOnly: Boolean = false - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for Enterprise Server installations returned. - """ - orderBy: EnterpriseServerInstallationOrder = {field: HOST_NAME, direction: ASC} - ): EnterpriseServerInstallationConnection! - - """ - The setting value for whether the enterprise has an IP allow list enabled. - """ - ipAllowListEnabledSetting: IpAllowListEnabledSettingValue! - - """ - The IP addresses that are allowed to access resources owned by the enterprise. - """ - ipAllowListEntries( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for IP allow list entries returned. - """ - orderBy: IpAllowListEntryOrder = {field: ALLOW_LIST_VALUE, direction: ASC} - ): IpAllowListEntryConnection! - - """ - Whether or not the default repository permission is currently being updated. - """ - isUpdatingDefaultRepositoryPermission: Boolean! - - """ - Whether the two-factor authentication requirement is currently being enforced. - """ - isUpdatingTwoFactorRequirement: Boolean! - - """ - The setting value for whether organization members with admin permissions on a - repository can change repository visibility. - """ - membersCanChangeRepositoryVisibilitySetting: EnterpriseEnabledDisabledSettingValue! - - """ - A list of enterprise organizations configured with the provided can change repository visibility setting value. - """ - membersCanChangeRepositoryVisibilitySettingOrganizations( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for organizations with this setting. - """ - orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} - - """ - The setting value to find organizations for. - """ - value: Boolean! - ): OrganizationConnection! - - """ - The setting value for whether members of organizations in the enterprise can create internal repositories. - """ - membersCanCreateInternalRepositoriesSetting: Boolean - - """ - The setting value for whether members of organizations in the enterprise can create private repositories. - """ - membersCanCreatePrivateRepositoriesSetting: Boolean - - """ - The setting value for whether members of organizations in the enterprise can create public repositories. - """ - membersCanCreatePublicRepositoriesSetting: Boolean - - """ - The setting value for whether members of organizations in the enterprise can create repositories. - """ - membersCanCreateRepositoriesSetting: EnterpriseMembersCanCreateRepositoriesSettingValue - - """ - A list of enterprise organizations configured with the provided repository creation setting value. - """ - membersCanCreateRepositoriesSettingOrganizations( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for organizations with this setting. - """ - orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} - - """ - The setting to find organizations for. - """ - value: OrganizationMembersCanCreateRepositoriesSettingValue! - ): OrganizationConnection! - - """ - The setting value for whether members with admin permissions for repositories can delete issues. - """ - membersCanDeleteIssuesSetting: EnterpriseEnabledDisabledSettingValue! - - """ - A list of enterprise organizations configured with the provided members can delete issues setting value. - """ - membersCanDeleteIssuesSettingOrganizations( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for organizations with this setting. - """ - orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} - - """ - The setting value to find organizations for. - """ - value: Boolean! - ): OrganizationConnection! - - """ - The setting value for whether members with admin permissions for repositories can delete or transfer repositories. - """ - membersCanDeleteRepositoriesSetting: EnterpriseEnabledDisabledSettingValue! - - """ - A list of enterprise organizations configured with the provided members can delete repositories setting value. - """ - membersCanDeleteRepositoriesSettingOrganizations( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for organizations with this setting. - """ - orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} - - """ - The setting value to find organizations for. - """ - value: Boolean! - ): OrganizationConnection! - - """ - The setting value for whether members of organizations in the enterprise can invite outside collaborators. - """ - membersCanInviteCollaboratorsSetting: EnterpriseEnabledDisabledSettingValue! - - """ - A list of enterprise organizations configured with the provided members can invite collaborators setting value. - """ - membersCanInviteCollaboratorsSettingOrganizations( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for organizations with this setting. - """ - orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} - - """ - The setting value to find organizations for. - """ - value: Boolean! - ): OrganizationConnection! - - """ - Indicates whether members of this enterprise's organizations can purchase additional services for those organizations. - """ - membersCanMakePurchasesSetting: EnterpriseMembersCanMakePurchasesSettingValue! - - """ - The setting value for whether members with admin permissions for repositories can update protected branches. - """ - membersCanUpdateProtectedBranchesSetting: EnterpriseEnabledDisabledSettingValue! - - """ - A list of enterprise organizations configured with the provided members can update protected branches setting value. - """ - membersCanUpdateProtectedBranchesSettingOrganizations( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for organizations with this setting. - """ - orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} - - """ - The setting value to find organizations for. - """ - value: Boolean! - ): OrganizationConnection! - - """ - The setting value for whether members can view dependency insights. - """ - membersCanViewDependencyInsightsSetting: EnterpriseEnabledDisabledSettingValue! - - """ - A list of enterprise organizations configured with the provided members can view dependency insights setting value. - """ - membersCanViewDependencyInsightsSettingOrganizations( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for organizations with this setting. - """ - orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} - - """ - The setting value to find organizations for. - """ - value: Boolean! - ): OrganizationConnection! - - """ - Indicates if email notification delivery for this enterprise is restricted to verified domains. - """ - notificationDeliveryRestrictionEnabledSetting: NotificationRestrictionSettingValue! - - """ - The setting value for whether organization projects are enabled for organizations in this enterprise. - """ - organizationProjectsSetting: EnterpriseEnabledDisabledSettingValue! - - """ - A list of enterprise organizations configured with the provided organization projects setting value. - """ - organizationProjectsSettingOrganizations( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for organizations with this setting. - """ - orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} - - """ - The setting value to find organizations for. - """ - value: Boolean! - ): OrganizationConnection! - - """ - A list of outside collaborators across the repositories in the enterprise. - """ - outsideCollaborators( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - The login of one specific outside collaborator. - """ - login: String - - """ - Ordering options for outside collaborators returned from the connection. - """ - orderBy: EnterpriseMemberOrder = {field: LOGIN, direction: ASC} - - """ - The search string to look for. - """ - query: String - - """ - Only return outside collaborators on repositories with this visibility. - """ - visibility: RepositoryVisibility - ): EnterpriseOutsideCollaboratorConnection! - - """ - A list of pending administrator invitations for the enterprise. - """ - pendingAdminInvitations( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for pending enterprise administrator invitations returned from the connection. - """ - orderBy: EnterpriseAdministratorInvitationOrder = {field: CREATED_AT, direction: DESC} - - """ - The search string to look for. - """ - query: String - - """ - The role to filter by. - """ - role: EnterpriseAdministratorRole - ): EnterpriseAdministratorInvitationConnection! - - """ - A list of pending collaborator invitations across the repositories in the enterprise. - """ - pendingCollaboratorInvitations( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for pending repository collaborator invitations returned from the connection. - """ - orderBy: RepositoryInvitationOrder = {field: CREATED_AT, direction: DESC} - - """ - The search string to look for. - """ - query: String - ): RepositoryInvitationConnection! - - """ - A list of pending collaborators across the repositories in the enterprise. - """ - pendingCollaborators( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for pending repository collaborator invitations returned from the connection. - """ - orderBy: RepositoryInvitationOrder = {field: CREATED_AT, direction: DESC} - - """ - The search string to look for. - """ - query: String - ): EnterprisePendingCollaboratorConnection! @deprecated(reason: "Repository invitations can now be associated with an email, not only an invitee. Use the `pendingCollaboratorInvitations` field instead. Removal on 2020-10-01 UTC.") - - """ - A list of pending member invitations for organizations in the enterprise. - """ - pendingMemberInvitations( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - The search string to look for. - """ - query: String - ): EnterprisePendingMemberInvitationConnection! - - """ - The setting value for whether repository projects are enabled in this enterprise. - """ - repositoryProjectsSetting: EnterpriseEnabledDisabledSettingValue! - - """ - A list of enterprise organizations configured with the provided repository projects setting value. - """ - repositoryProjectsSettingOrganizations( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for organizations with this setting. - """ - orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} - - """ - The setting value to find organizations for. - """ - value: Boolean! - ): OrganizationConnection! - - """ - The SAML Identity Provider for the enterprise. - """ - samlIdentityProvider: EnterpriseIdentityProvider - - """ - A list of enterprise organizations configured with the SAML single sign-on setting value. - """ - samlIdentityProviderSettingOrganizations( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for organizations with this setting. - """ - orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} - - """ - The setting value to find organizations for. - """ - value: IdentityProviderConfigurationState! - ): OrganizationConnection! - - """ - A list of members with a support entitlement. - """ - supportEntitlements( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for support entitlement users returned from the connection. - """ - orderBy: EnterpriseMemberOrder = {field: LOGIN, direction: ASC} - ): EnterpriseMemberConnection! - - """ - The setting value for whether team discussions are enabled for organizations in this enterprise. - """ - teamDiscussionsSetting: EnterpriseEnabledDisabledSettingValue! - - """ - A list of enterprise organizations configured with the provided team discussions setting value. - """ - teamDiscussionsSettingOrganizations( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for organizations with this setting. - """ - orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} - - """ - The setting value to find organizations for. - """ - value: Boolean! - ): OrganizationConnection! - - """ - The setting value for whether the enterprise requires two-factor authentication for its organizations and users. - """ - twoFactorRequiredSetting: EnterpriseEnabledSettingValue! - - """ - A list of enterprise organizations configured with the two-factor authentication setting value. - """ - twoFactorRequiredSettingOrganizations( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for organizations with this setting. - """ - orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} - - """ - The setting value to find organizations for. - """ - value: Boolean! - ): OrganizationConnection! -} - -""" -The connection type for User. -""" -type EnterprisePendingCollaboratorConnection { - """ - A list of edges. - """ - edges: [EnterprisePendingCollaboratorEdge] - - """ - A list of nodes. - """ - nodes: [User] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -A user with an invitation to be a collaborator on a repository owned by an organization in an enterprise. -""" -type EnterprisePendingCollaboratorEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - Whether the invited collaborator does not have a license for the enterprise. - """ - isUnlicensed: Boolean! @deprecated(reason: "All pending collaborators consume a license Removal on 2021-01-01 UTC.") - - """ - The item at the end of the edge. - """ - node: User - - """ - The enterprise organization repositories this user is a member of. - """ - repositories( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for repositories. - """ - orderBy: RepositoryOrder = {field: NAME, direction: ASC} - ): EnterpriseRepositoryInfoConnection! -} - -""" -The connection type for OrganizationInvitation. -""" -type EnterprisePendingMemberInvitationConnection { - """ - A list of edges. - """ - edges: [EnterprisePendingMemberInvitationEdge] - - """ - A list of nodes. - """ - nodes: [OrganizationInvitation] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! - - """ - Identifies the total count of unique users in the connection. - """ - totalUniqueUserCount: Int! -} - -""" -An invitation to be a member in an enterprise organization. -""" -type EnterprisePendingMemberInvitationEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - Whether the invitation has a license for the enterprise. - """ - isUnlicensed: Boolean! @deprecated(reason: "All pending members consume a license Removal on 2020-07-01 UTC.") - - """ - The item at the end of the edge. - """ - node: OrganizationInvitation -} - -""" -A subset of repository information queryable from an enterprise. -""" -type EnterpriseRepositoryInfo implements Node { - id: ID! - - """ - Identifies if the repository is private or internal. - """ - isPrivate: Boolean! - - """ - The repository's name. - """ - name: String! - - """ - The repository's name with owner. - """ - nameWithOwner: String! -} - -""" -The connection type for EnterpriseRepositoryInfo. -""" -type EnterpriseRepositoryInfoConnection { - """ - A list of edges. - """ - edges: [EnterpriseRepositoryInfoEdge] - - """ - A list of nodes. - """ - nodes: [EnterpriseRepositoryInfo] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type EnterpriseRepositoryInfoEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: EnterpriseRepositoryInfo -} - -""" -An Enterprise Server installation. -""" -type EnterpriseServerInstallation implements Node { - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - The customer name to which the Enterprise Server installation belongs. - """ - customerName: String! - - """ - The host name of the Enterprise Server installation. - """ - hostName: String! - id: ID! - - """ - Whether or not the installation is connected to an Enterprise Server installation via GitHub Connect. - """ - isConnected: Boolean! - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! - - """ - User accounts on this Enterprise Server installation. - """ - userAccounts( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for Enterprise Server user accounts returned from the connection. - """ - orderBy: EnterpriseServerUserAccountOrder = {field: LOGIN, direction: ASC} - ): EnterpriseServerUserAccountConnection! - - """ - User accounts uploads for the Enterprise Server installation. - """ - userAccountsUploads( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for Enterprise Server user accounts uploads returned from the connection. - """ - orderBy: EnterpriseServerUserAccountsUploadOrder = {field: CREATED_AT, direction: DESC} - ): EnterpriseServerUserAccountsUploadConnection! -} - -""" -The connection type for EnterpriseServerInstallation. -""" -type EnterpriseServerInstallationConnection { - """ - A list of edges. - """ - edges: [EnterpriseServerInstallationEdge] - - """ - A list of nodes. - """ - nodes: [EnterpriseServerInstallation] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type EnterpriseServerInstallationEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: EnterpriseServerInstallation -} - -""" -Ordering options for Enterprise Server installation connections. -""" -input EnterpriseServerInstallationOrder { - """ - The ordering direction. - """ - direction: OrderDirection! - - """ - The field to order Enterprise Server installations by. - """ - field: EnterpriseServerInstallationOrderField! -} - -""" -Properties by which Enterprise Server installation connections can be ordered. -""" -enum EnterpriseServerInstallationOrderField { - """ - Order Enterprise Server installations by creation time - """ - CREATED_AT - - """ - Order Enterprise Server installations by customer name - """ - CUSTOMER_NAME - - """ - Order Enterprise Server installations by host name - """ - HOST_NAME -} - -""" -A user account on an Enterprise Server installation. -""" -type EnterpriseServerUserAccount implements Node { - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - User emails belonging to this user account. - """ - emails( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for Enterprise Server user account emails returned from the connection. - """ - orderBy: EnterpriseServerUserAccountEmailOrder = {field: EMAIL, direction: ASC} - ): EnterpriseServerUserAccountEmailConnection! - - """ - The Enterprise Server installation on which this user account exists. - """ - enterpriseServerInstallation: EnterpriseServerInstallation! - id: ID! - - """ - Whether the user account is a site administrator on the Enterprise Server installation. - """ - isSiteAdmin: Boolean! - - """ - The login of the user account on the Enterprise Server installation. - """ - login: String! - - """ - The profile name of the user account on the Enterprise Server installation. - """ - profileName: String - - """ - The date and time when the user account was created on the Enterprise Server installation. - """ - remoteCreatedAt: DateTime! - - """ - The ID of the user account on the Enterprise Server installation. - """ - remoteUserId: Int! - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! -} - -""" -The connection type for EnterpriseServerUserAccount. -""" -type EnterpriseServerUserAccountConnection { - """ - A list of edges. - """ - edges: [EnterpriseServerUserAccountEdge] - - """ - A list of nodes. - """ - nodes: [EnterpriseServerUserAccount] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type EnterpriseServerUserAccountEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: EnterpriseServerUserAccount -} - -""" -An email belonging to a user account on an Enterprise Server installation. -""" -type EnterpriseServerUserAccountEmail implements Node { - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - The email address. - """ - email: String! - id: ID! - - """ - Indicates whether this is the primary email of the associated user account. - """ - isPrimary: Boolean! - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! - - """ - The user account to which the email belongs. - """ - userAccount: EnterpriseServerUserAccount! -} - -""" -The connection type for EnterpriseServerUserAccountEmail. -""" -type EnterpriseServerUserAccountEmailConnection { - """ - A list of edges. - """ - edges: [EnterpriseServerUserAccountEmailEdge] - - """ - A list of nodes. - """ - nodes: [EnterpriseServerUserAccountEmail] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type EnterpriseServerUserAccountEmailEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: EnterpriseServerUserAccountEmail -} - -""" -Ordering options for Enterprise Server user account email connections. -""" -input EnterpriseServerUserAccountEmailOrder { - """ - The ordering direction. - """ - direction: OrderDirection! - - """ - The field to order emails by. - """ - field: EnterpriseServerUserAccountEmailOrderField! -} - -""" -Properties by which Enterprise Server user account email connections can be ordered. -""" -enum EnterpriseServerUserAccountEmailOrderField { - """ - Order emails by email - """ - EMAIL -} - -""" -Ordering options for Enterprise Server user account connections. -""" -input EnterpriseServerUserAccountOrder { - """ - The ordering direction. - """ - direction: OrderDirection! - - """ - The field to order user accounts by. - """ - field: EnterpriseServerUserAccountOrderField! -} - -""" -Properties by which Enterprise Server user account connections can be ordered. -""" -enum EnterpriseServerUserAccountOrderField { - """ - Order user accounts by login - """ - LOGIN - - """ - Order user accounts by creation time on the Enterprise Server installation - """ - REMOTE_CREATED_AT -} - -""" -A user accounts upload from an Enterprise Server installation. -""" -type EnterpriseServerUserAccountsUpload implements Node { - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - The enterprise to which this upload belongs. - """ - enterprise: Enterprise! - - """ - The Enterprise Server installation for which this upload was generated. - """ - enterpriseServerInstallation: EnterpriseServerInstallation! - id: ID! - - """ - The name of the file uploaded. - """ - name: String! - - """ - The synchronization state of the upload - """ - syncState: EnterpriseServerUserAccountsUploadSyncState! - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! -} - -""" -The connection type for EnterpriseServerUserAccountsUpload. -""" -type EnterpriseServerUserAccountsUploadConnection { - """ - A list of edges. - """ - edges: [EnterpriseServerUserAccountsUploadEdge] - - """ - A list of nodes. - """ - nodes: [EnterpriseServerUserAccountsUpload] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type EnterpriseServerUserAccountsUploadEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: EnterpriseServerUserAccountsUpload -} - -""" -Ordering options for Enterprise Server user accounts upload connections. -""" -input EnterpriseServerUserAccountsUploadOrder { - """ - The ordering direction. - """ - direction: OrderDirection! - - """ - The field to order user accounts uploads by. - """ - field: EnterpriseServerUserAccountsUploadOrderField! -} - -""" -Properties by which Enterprise Server user accounts upload connections can be ordered. -""" -enum EnterpriseServerUserAccountsUploadOrderField { - """ - Order user accounts uploads by creation time - """ - CREATED_AT -} - -""" -Synchronization state of the Enterprise Server user accounts upload -""" -enum EnterpriseServerUserAccountsUploadSyncState { - """ - The synchronization of the upload failed. - """ - FAILURE - - """ - The synchronization of the upload is pending. - """ - PENDING - - """ - The synchronization of the upload succeeded. - """ - SUCCESS -} - -""" -An account for a user who is an admin of an enterprise or a member of an enterprise through one or more organizations. -""" -type EnterpriseUserAccount implements Actor & Node { - """ - A URL pointing to the enterprise user account's public avatar. - """ - avatarUrl( - """ - The size of the resulting square image. - """ - size: Int - ): URI! - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - The enterprise in which this user account exists. - """ - enterprise: Enterprise! - id: ID! - - """ - An identifier for the enterprise user account, a login or email address - """ - login: String! - - """ - The name of the enterprise user account - """ - name: String - - """ - A list of enterprise organizations this user is a member of. - """ - organizations( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for organizations returned from the connection. - """ - orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} - - """ - The search string to look for. - """ - query: String - - """ - The role of the user in the enterprise organization. - """ - role: EnterpriseUserAccountMembershipRole - ): EnterpriseOrganizationMembershipConnection! - - """ - The HTTP path for this user. - """ - resourcePath: URI! - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! - - """ - The HTTP URL for this user. - """ - url: URI! - - """ - The user within the enterprise. - """ - user: User -} - -""" -The connection type for EnterpriseUserAccount. -""" -type EnterpriseUserAccountConnection { - """ - A list of edges. - """ - edges: [EnterpriseUserAccountEdge] - - """ - A list of nodes. - """ - nodes: [EnterpriseUserAccount] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type EnterpriseUserAccountEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: EnterpriseUserAccount -} - -""" -The possible roles for enterprise membership. -""" -enum EnterpriseUserAccountMembershipRole { - """ - The user is a member of the enterprise membership. - """ - MEMBER - - """ - The user is an owner of the enterprise membership. - """ - OWNER -} - -""" -The possible GitHub Enterprise deployments where this user can exist. -""" -enum EnterpriseUserDeployment { - """ - The user is part of a GitHub Enterprise Cloud deployment. - """ - CLOUD - - """ - The user is part of a GitHub Enterprise Server deployment. - """ - SERVER -} - -""" -An external identity provisioned by SAML SSO or SCIM. -""" -type ExternalIdentity implements Node { - """ - The GUID for this identity - """ - guid: String! - id: ID! - - """ - Organization invitation for this SCIM-provisioned external identity - """ - organizationInvitation: OrganizationInvitation - - """ - SAML Identity attributes - """ - samlIdentity: ExternalIdentitySamlAttributes - - """ - SCIM Identity attributes - """ - scimIdentity: ExternalIdentityScimAttributes - - """ - User linked to this external identity. Will be NULL if this identity has not been claimed by an organization member. - """ - user: User -} - -""" -The connection type for ExternalIdentity. -""" -type ExternalIdentityConnection { - """ - A list of edges. - """ - edges: [ExternalIdentityEdge] - - """ - A list of nodes. - """ - nodes: [ExternalIdentity] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type ExternalIdentityEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: ExternalIdentity -} - -""" -SAML attributes for the External Identity -""" -type ExternalIdentitySamlAttributes { - """ - The emails associated with the SAML identity - """ - emails: [UserEmailMetadata!] - - """ - Family name of the SAML identity - """ - familyName: String - - """ - Given name of the SAML identity - """ - givenName: String - - """ - The groups linked to this identity in IDP - """ - groups: [String!] - - """ - The NameID of the SAML identity - """ - nameId: String - - """ - The userName of the SAML identity - """ - username: String -} - -""" -SCIM attributes for the External Identity -""" -type ExternalIdentityScimAttributes { - """ - The emails associated with the SCIM identity - """ - emails: [UserEmailMetadata!] - - """ - Family name of the SCIM identity - """ - familyName: String - - """ - Given name of the SCIM identity - """ - givenName: String - - """ - The groups linked to this identity in IDP - """ - groups: [String!] - - """ - The userName of the SCIM identity - """ - username: String -} - -""" -The possible viewed states of a file . -""" -enum FileViewedState { - """ - The file has new changes since last viewed. - """ - DISMISSED - - """ - The file has not been marked as viewed. - """ - UNVIEWED - - """ - The file has been marked as viewed. - """ - VIEWED -} - -""" -Autogenerated input type of FollowUser -""" -input FollowUserInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - ID of the user to follow. - """ - userId: ID! @possibleTypes(concreteTypes: ["User"]) -} - -""" -Autogenerated return type of FollowUser -""" -type FollowUserPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The user that was followed. - """ - user: User -} - -""" -The connection type for User. -""" -type FollowerConnection { - """ - A list of edges. - """ - edges: [UserEdge] - - """ - A list of nodes. - """ - nodes: [User] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -The connection type for User. -""" -type FollowingConnection { - """ - A list of edges. - """ - edges: [UserEdge] - - """ - A list of nodes. - """ - nodes: [User] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -A funding platform link for a repository. -""" -type FundingLink { - """ - The funding platform this link is for. - """ - platform: FundingPlatform! - - """ - The configured URL for this funding link. - """ - url: URI! -} - -""" -The possible funding platforms for repository funding links. -""" -enum FundingPlatform { - """ - Community Bridge funding platform. - """ - COMMUNITY_BRIDGE - - """ - Custom funding platform. - """ - CUSTOM - - """ - GitHub funding platform. - """ - GITHUB - - """ - IssueHunt funding platform. - """ - ISSUEHUNT - - """ - Ko-fi funding platform. - """ - KO_FI - - """ - Liberapay funding platform. - """ - LIBERAPAY - - """ - Open Collective funding platform. - """ - OPEN_COLLECTIVE - - """ - Otechie funding platform. - """ - OTECHIE - - """ - Patreon funding platform. - """ - PATREON - - """ - Tidelift funding platform. - """ - TIDELIFT -} - -""" -A generic hovercard context with a message and icon -""" -type GenericHovercardContext implements HovercardContext { - """ - A string describing this context - """ - message: String! - - """ - An octicon to accompany this context - """ - octicon: String! -} - -""" -A Gist. -""" -type Gist implements Node & Starrable & UniformResourceLocatable { - """ - A list of comments associated with the gist - """ - comments( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): GistCommentConnection! - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - The gist description. - """ - description: String - - """ - The files in this gist. - """ - files( - """ - The maximum number of files to return. - """ - limit: Int = 10 - - """ - The oid of the files to return - """ - oid: GitObjectID - ): [GistFile] - - """ - A list of forks associated with the gist - """ - forks( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for gists returned from the connection - """ - orderBy: GistOrder - ): GistConnection! - id: ID! - - """ - Identifies if the gist is a fork. - """ - isFork: Boolean! - - """ - Whether the gist is public or not. - """ - isPublic: Boolean! - - """ - The gist name. - """ - name: String! - - """ - The gist owner. - """ - owner: RepositoryOwner - - """ - Identifies when the gist was last pushed to. - """ - pushedAt: DateTime - - """ - The HTML path to this resource. - """ - resourcePath: URI! - - """ - Returns a count of how many stargazers there are on this object - """ - stargazerCount: Int! - - """ - A list of users who have starred this starrable. - """ - stargazers( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Order for connection - """ - orderBy: StarOrder - ): StargazerConnection! - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! - - """ - The HTTP URL for this Gist. - """ - url: URI! - - """ - Returns a boolean indicating whether the viewing user has starred this starrable. - """ - viewerHasStarred: Boolean! -} - -""" -Represents a comment on an Gist. -""" -type GistComment implements Comment & Deletable & Minimizable & Node & Updatable & UpdatableComment { - """ - The actor who authored the comment. - """ - author: Actor - - """ - Author's association with the gist. - """ - authorAssociation: CommentAuthorAssociation! - - """ - Identifies the comment body. - """ - body: String! - - """ - The body rendered to HTML. - """ - bodyHTML: HTML! - - """ - The body rendered to text. - """ - bodyText: String! - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Check if this comment was created via an email reply. - """ - createdViaEmail: Boolean! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - - """ - The actor who edited the comment. - """ - editor: Actor - - """ - The associated gist. - """ - gist: Gist! - id: ID! - - """ - Check if this comment was edited and includes an edit with the creation data - """ - includesCreatedEdit: Boolean! - - """ - Returns whether or not a comment has been minimized. - """ - isMinimized: Boolean! - - """ - The moment the editor made the last edit - """ - lastEditedAt: DateTime - - """ - Returns why the comment was minimized. - """ - minimizedReason: String - - """ - Identifies when the comment was published at. - """ - publishedAt: DateTime - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! - - """ - A list of edits to this content. - """ - userContentEdits( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): UserContentEditConnection - - """ - Check if the current viewer can delete this object. - """ - viewerCanDelete: Boolean! - - """ - Check if the current viewer can minimize this object. - """ - viewerCanMinimize: Boolean! - - """ - Check if the current viewer can update this object. - """ - viewerCanUpdate: Boolean! - - """ - Reasons why the current viewer can not update this comment. - """ - viewerCannotUpdateReasons: [CommentCannotUpdateReason!]! - - """ - Did the viewer author this comment. - """ - viewerDidAuthor: Boolean! -} - -""" -The connection type for GistComment. -""" -type GistCommentConnection { - """ - A list of edges. - """ - edges: [GistCommentEdge] - - """ - A list of nodes. - """ - nodes: [GistComment] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type GistCommentEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: GistComment -} - -""" -The connection type for Gist. -""" -type GistConnection { - """ - A list of edges. - """ - edges: [GistEdge] - - """ - A list of nodes. - """ - nodes: [Gist] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type GistEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: Gist -} - -""" -A file in a gist. -""" -type GistFile { - """ - The file name encoded to remove characters that are invalid in URL paths. - """ - encodedName: String - - """ - The gist file encoding. - """ - encoding: String - - """ - The file extension from the file name. - """ - extension: String - - """ - Indicates if this file is an image. - """ - isImage: Boolean! - - """ - Whether the file's contents were truncated. - """ - isTruncated: Boolean! - - """ - The programming language this file is written in. - """ - language: Language - - """ - The gist file name. - """ - name: String - - """ - The gist file size in bytes. - """ - size: Int - - """ - UTF8 text data or null if the file is binary - """ - text( - """ - Optionally truncate the returned file to this length. - """ - truncate: Int - ): String -} - -""" -Ordering options for gist connections -""" -input GistOrder { - """ - The ordering direction. - """ - direction: OrderDirection! - - """ - The field to order repositories by. - """ - field: GistOrderField! -} - -""" -Properties by which gist connections can be ordered. -""" -enum GistOrderField { - """ - Order gists by creation time - """ - CREATED_AT - - """ - Order gists by push time - """ - PUSHED_AT - - """ - Order gists by update time - """ - UPDATED_AT -} - -""" -The privacy of a Gist -""" -enum GistPrivacy { - """ - Gists that are public and secret - """ - ALL - - """ - Public - """ - PUBLIC - - """ - Secret - """ - SECRET -} - -""" -Represents an actor in a Git commit (ie. an author or committer). -""" -type GitActor { - """ - A URL pointing to the author's public avatar. - """ - avatarUrl( - """ - The size of the resulting square image. - """ - size: Int - ): URI! - - """ - The timestamp of the Git action (authoring or committing). - """ - date: GitTimestamp - - """ - The email in the Git commit. - """ - email: String - - """ - The name in the Git commit. - """ - name: String - - """ - The GitHub user corresponding to the email field. Null if no such user exists. - """ - user: User -} - -""" -The connection type for GitActor. -""" -type GitActorConnection { - """ - A list of edges. - """ - edges: [GitActorEdge] - - """ - A list of nodes. - """ - nodes: [GitActor] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type GitActorEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: GitActor -} - -""" -Represents information about the GitHub instance. -""" -type GitHubMetadata { - """ - Returns a String that's a SHA of `github-services` - """ - gitHubServicesSha: GitObjectID! - - """ - IP addresses that users connect to for git operations - """ - gitIpAddresses: [String!] - - """ - IP addresses that service hooks are sent from - """ - hookIpAddresses: [String!] - - """ - IP addresses that the importer connects from - """ - importerIpAddresses: [String!] - - """ - Whether or not users are verified - """ - isPasswordAuthenticationVerifiable: Boolean! - - """ - IP addresses for GitHub Pages' A records - """ - pagesIpAddresses: [String!] -} - -""" -Represents a Git object. -""" -interface GitObject { - """ - An abbreviated version of the Git object ID - """ - abbreviatedOid: String! - - """ - The HTTP path for this Git object - """ - commitResourcePath: URI! - - """ - The HTTP URL for this Git object - """ - commitUrl: URI! - id: ID! - - """ - The Git object ID - """ - oid: GitObjectID! - - """ - The Repository the Git object belongs to - """ - repository: Repository! -} - -""" -A Git object ID. -""" -scalar GitObjectID - -""" -A fully qualified reference name (e.g. `refs/heads/master`). -""" -scalar GitRefname @preview(toggledBy: "update-refs-preview") - -""" -Git SSH string -""" -scalar GitSSHRemote - -""" -Information about a signature (GPG or S/MIME) on a Commit or Tag. -""" -interface GitSignature { - """ - Email used to sign this object. - """ - email: String! - - """ - True if the signature is valid and verified by GitHub. - """ - isValid: Boolean! - - """ - Payload for GPG signing object. Raw ODB object without the signature header. - """ - payload: String! - - """ - ASCII-armored signature header from object. - """ - signature: String! - - """ - GitHub user corresponding to the email signing this commit. - """ - signer: User - - """ - The state of this signature. `VALID` if signature is valid and verified by - GitHub, otherwise represents reason why signature is considered invalid. - """ - state: GitSignatureState! - - """ - True if the signature was made with GitHub's signing key. - """ - wasSignedByGitHub: Boolean! -} - -""" -The state of a Git signature. -""" -enum GitSignatureState { - """ - The signing certificate or its chain could not be verified - """ - BAD_CERT - - """ - Invalid email used for signing - """ - BAD_EMAIL - - """ - Signing key expired - """ - EXPIRED_KEY - - """ - Internal error - the GPG verification service misbehaved - """ - GPGVERIFY_ERROR - - """ - Internal error - the GPG verification service is unavailable at the moment - """ - GPGVERIFY_UNAVAILABLE - - """ - Invalid signature - """ - INVALID - - """ - Malformed signature - """ - MALFORMED_SIG - - """ - The usage flags for the key that signed this don't allow signing - """ - NOT_SIGNING_KEY - - """ - Email used for signing not known to GitHub - """ - NO_USER - - """ - Valid signature, though certificate revocation check failed - """ - OCSP_ERROR - - """ - Valid signature, pending certificate revocation checking - """ - OCSP_PENDING - - """ - One or more certificates in chain has been revoked - """ - OCSP_REVOKED - - """ - Key used for signing not known to GitHub - """ - UNKNOWN_KEY - - """ - Unknown signature type - """ - UNKNOWN_SIG_TYPE - - """ - Unsigned - """ - UNSIGNED - - """ - Email used for signing unverified on GitHub - """ - UNVERIFIED_EMAIL - - """ - Valid signature and verified by GitHub - """ - VALID -} - -""" -An ISO-8601 encoded date string. Unlike the DateTime type, GitTimestamp is not converted in UTC. -""" -scalar GitTimestamp - -""" -Represents a GPG signature on a Commit or Tag. -""" -type GpgSignature implements GitSignature { - """ - Email used to sign this object. - """ - email: String! - - """ - True if the signature is valid and verified by GitHub. - """ - isValid: Boolean! - - """ - Hex-encoded ID of the key that signed this object. - """ - keyId: String - - """ - Payload for GPG signing object. Raw ODB object without the signature header. - """ - payload: String! - - """ - ASCII-armored signature header from object. - """ - signature: String! - - """ - GitHub user corresponding to the email signing this commit. - """ - signer: User - - """ - The state of this signature. `VALID` if signature is valid and verified by - GitHub, otherwise represents reason why signature is considered invalid. - """ - state: GitSignatureState! - - """ - True if the signature was made with GitHub's signing key. - """ - wasSignedByGitHub: Boolean! -} - -""" -A string containing HTML code. -""" -scalar HTML - -""" -Represents a 'head_ref_deleted' event on a given pull request. -""" -type HeadRefDeletedEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Identifies the Ref associated with the `head_ref_deleted` event. - """ - headRef: Ref - - """ - Identifies the name of the Ref associated with the `head_ref_deleted` event. - """ - headRefName: String! - id: ID! - - """ - PullRequest referenced by event. - """ - pullRequest: PullRequest! -} - -""" -Represents a 'head_ref_force_pushed' event on a given pull request. -""" -type HeadRefForcePushedEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the after commit SHA for the 'head_ref_force_pushed' event. - """ - afterCommit: Commit - - """ - Identifies the before commit SHA for the 'head_ref_force_pushed' event. - """ - beforeCommit: Commit - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! - - """ - PullRequest referenced by event. - """ - pullRequest: PullRequest! - - """ - Identifies the fully qualified ref name for the 'head_ref_force_pushed' event. - """ - ref: Ref -} - -""" -Represents a 'head_ref_restored' event on a given pull request. -""" -type HeadRefRestoredEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! - - """ - PullRequest referenced by event. - """ - pullRequest: PullRequest! -} - -""" -Detail needed to display a hovercard for a user -""" -type Hovercard { - """ - Each of the contexts for this hovercard - """ - contexts: [HovercardContext!]! -} - -""" -An individual line of a hovercard -""" -interface HovercardContext { - """ - A string describing this context - """ - message: String! - - """ - An octicon to accompany this context - """ - octicon: String! -} - -""" -The possible states in which authentication can be configured with an identity provider. -""" -enum IdentityProviderConfigurationState { - """ - Authentication with an identity provider is configured but not enforced. - """ - CONFIGURED - - """ - Authentication with an identity provider is configured and enforced. - """ - ENFORCED - - """ - Authentication with an identity provider is not configured. - """ - UNCONFIGURED -} - -""" -Autogenerated input type of ImportProject -""" -input ImportProjectInput { - """ - The description of Project. - """ - body: String - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - A list of columns containing issues and pull requests. - """ - columnImports: [ProjectColumnImport!]! - - """ - The name of Project. - """ - name: String! - - """ - The name of the Organization or User to create the Project under. - """ - ownerName: String! - - """ - Whether the Project is public or not. - """ - public: Boolean = false -} - -""" -Autogenerated return type of ImportProject -""" -type ImportProjectPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The new Project! - """ - project: Project -} - -""" -Autogenerated input type of InviteEnterpriseAdmin -""" -input InviteEnterpriseAdminInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The email of the person to invite as an administrator. - """ - email: String - - """ - The ID of the enterprise to which you want to invite an administrator. - """ - enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) - - """ - The login of a user to invite as an administrator. - """ - invitee: String - - """ - The role of the administrator. - """ - role: EnterpriseAdministratorRole -} - -""" -Autogenerated return type of InviteEnterpriseAdmin -""" -type InviteEnterpriseAdminPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The created enterprise administrator invitation. - """ - invitation: EnterpriseAdministratorInvitation -} - -""" -The possible values for the IP allow list enabled setting. -""" -enum IpAllowListEnabledSettingValue { - """ - The setting is disabled for the owner. - """ - DISABLED - - """ - The setting is enabled for the owner. - """ - ENABLED -} - -""" -An IP address or range of addresses that is allowed to access an owner's resources. -""" -type IpAllowListEntry implements Node { - """ - A single IP address or range of IP addresses in CIDR notation. - """ - allowListValue: String! - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! - - """ - Whether the entry is currently active. - """ - isActive: Boolean! - - """ - The name of the IP allow list entry. - """ - name: String - - """ - The owner of the IP allow list entry. - """ - owner: IpAllowListOwner! - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! -} - -""" -The connection type for IpAllowListEntry. -""" -type IpAllowListEntryConnection { - """ - A list of edges. - """ - edges: [IpAllowListEntryEdge] - - """ - A list of nodes. - """ - nodes: [IpAllowListEntry] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type IpAllowListEntryEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: IpAllowListEntry -} - -""" -Ordering options for IP allow list entry connections. -""" -input IpAllowListEntryOrder { - """ - The ordering direction. - """ - direction: OrderDirection! - - """ - The field to order IP allow list entries by. - """ - field: IpAllowListEntryOrderField! -} - -""" -Properties by which IP allow list entry connections can be ordered. -""" -enum IpAllowListEntryOrderField { - """ - Order IP allow list entries by the allow list value. - """ - ALLOW_LIST_VALUE - - """ - Order IP allow list entries by creation time. - """ - CREATED_AT -} - -""" -Types that can own an IP allow list. -""" -union IpAllowListOwner = Enterprise | Organization - -""" -An Issue is a place to discuss ideas, enhancements, tasks, and bugs for a project. -""" -type Issue implements Assignable & Closable & Comment & Labelable & Lockable & Node & Reactable & RepositoryNode & Subscribable & UniformResourceLocatable & Updatable & UpdatableComment { - """ - Reason that the conversation was locked. - """ - activeLockReason: LockReason - - """ - A list of Users assigned to this object. - """ - assignees( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): UserConnection! - - """ - The actor who authored the comment. - """ - author: Actor - - """ - Author's association with the subject of the comment. - """ - authorAssociation: CommentAuthorAssociation! - - """ - Identifies the body of the issue. - """ - body: String! - - """ - The body rendered to HTML. - """ - bodyHTML: HTML! - - """ - The http path for this issue body - """ - bodyResourcePath: URI! - - """ - Identifies the body of the issue rendered to text. - """ - bodyText: String! - - """ - The http URL for this issue body - """ - bodyUrl: URI! - - """ - `true` if the object is closed (definition of closed may depend on type) - """ - closed: Boolean! - - """ - Identifies the date and time when the object was closed. - """ - closedAt: DateTime - - """ - A list of comments associated with the Issue. - """ - comments( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for issue comments returned from the connection. - """ - orderBy: IssueCommentOrder - ): IssueCommentConnection! - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Check if this comment was created via an email reply. - """ - createdViaEmail: Boolean! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - - """ - The actor who edited the comment. - """ - editor: Actor - - """ - The hovercard information for this issue - """ - hovercard( - """ - Whether or not to include notification contexts - """ - includeNotificationContexts: Boolean = true - ): Hovercard! - id: ID! - - """ - Check if this comment was edited and includes an edit with the creation data - """ - includesCreatedEdit: Boolean! - - """ - Indicates whether or not this issue is currently pinned to the repository issues list - """ - isPinned: Boolean - - """ - Is this issue read by the viewer - """ - isReadByViewer: Boolean - - """ - A list of labels associated with the object. - """ - labels( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for labels returned from the connection. - """ - orderBy: LabelOrder = {field: CREATED_AT, direction: ASC} - ): LabelConnection - - """ - The moment the editor made the last edit - """ - lastEditedAt: DateTime - - """ - `true` if the object is locked - """ - locked: Boolean! - - """ - Identifies the milestone associated with the issue. - """ - milestone: Milestone - - """ - Identifies the issue number. - """ - number: Int! - - """ - A list of Users that are participating in the Issue conversation. - """ - participants( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): UserConnection! - - """ - List of project cards associated with this issue. - """ - projectCards( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - A list of archived states to filter the cards by - """ - archivedStates: [ProjectCardArchivedState] = [ARCHIVED, NOT_ARCHIVED] - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): ProjectCardConnection! - - """ - Identifies when the comment was published at. - """ - publishedAt: DateTime - - """ - A list of reactions grouped by content left on the subject. - """ - reactionGroups: [ReactionGroup!] - - """ - A list of Reactions left on the Issue. - """ - reactions( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Allows filtering Reactions by emoji. - """ - content: ReactionContent - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Allows specifying the order in which reactions are returned. - """ - orderBy: ReactionOrder - ): ReactionConnection! - - """ - The repository associated with this node. - """ - repository: Repository! - - """ - The HTTP path for this issue - """ - resourcePath: URI! - - """ - Identifies the state of the issue. - """ - state: IssueState! - - """ - A list of events, comments, commits, etc. associated with the issue. - """ - timeline( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Allows filtering timeline events by a `since` timestamp. - """ - since: DateTime - ): IssueTimelineConnection! @deprecated(reason: "`timeline` will be removed Use Issue.timelineItems instead. Removal on 2020-10-01 UTC.") - - """ - A list of events, comments, commits, etc. associated with the issue. - """ - timelineItems( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Filter timeline items by type. - """ - itemTypes: [IssueTimelineItemsItemType!] - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Filter timeline items by a `since` timestamp. - """ - since: DateTime - - """ - Skips the first _n_ elements in the list. - """ - skip: Int - ): IssueTimelineItemsConnection! - - """ - Identifies the issue title. - """ - title: String! - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! - - """ - The HTTP URL for this issue - """ - url: URI! - - """ - A list of edits to this content. - """ - userContentEdits( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): UserContentEditConnection - - """ - Can user react to this subject - """ - viewerCanReact: Boolean! - - """ - Check if the viewer is able to change their subscription status for the repository. - """ - viewerCanSubscribe: Boolean! - - """ - Check if the current viewer can update this object. - """ - viewerCanUpdate: Boolean! - - """ - Reasons why the current viewer can not update this comment. - """ - viewerCannotUpdateReasons: [CommentCannotUpdateReason!]! - - """ - Did the viewer author this comment. - """ - viewerDidAuthor: Boolean! - - """ - Identifies if the viewer is watching, not watching, or ignoring the subscribable entity. - """ - viewerSubscription: SubscriptionState -} - -""" -Represents a comment on an Issue. -""" -type IssueComment implements Comment & Deletable & Minimizable & Node & Reactable & RepositoryNode & Updatable & UpdatableComment { - """ - The actor who authored the comment. - """ - author: Actor - - """ - Author's association with the subject of the comment. - """ - authorAssociation: CommentAuthorAssociation! - - """ - The body as Markdown. - """ - body: String! - - """ - The body rendered to HTML. - """ - bodyHTML: HTML! - - """ - The body rendered to text. - """ - bodyText: String! - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Check if this comment was created via an email reply. - """ - createdViaEmail: Boolean! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - - """ - The actor who edited the comment. - """ - editor: Actor - id: ID! - - """ - Check if this comment was edited and includes an edit with the creation data - """ - includesCreatedEdit: Boolean! - - """ - Returns whether or not a comment has been minimized. - """ - isMinimized: Boolean! - - """ - Identifies the issue associated with the comment. - """ - issue: Issue! - - """ - The moment the editor made the last edit - """ - lastEditedAt: DateTime - - """ - Returns why the comment was minimized. - """ - minimizedReason: String - - """ - Identifies when the comment was published at. - """ - publishedAt: DateTime - - """ - Returns the pull request associated with the comment, if this comment was made on a - pull request. - """ - pullRequest: PullRequest - - """ - A list of reactions grouped by content left on the subject. - """ - reactionGroups: [ReactionGroup!] - - """ - A list of Reactions left on the Issue. - """ - reactions( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Allows filtering Reactions by emoji. - """ - content: ReactionContent - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Allows specifying the order in which reactions are returned. - """ - orderBy: ReactionOrder - ): ReactionConnection! - - """ - The repository associated with this node. - """ - repository: Repository! - - """ - The HTTP path for this issue comment - """ - resourcePath: URI! - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! - - """ - The HTTP URL for this issue comment - """ - url: URI! - - """ - A list of edits to this content. - """ - userContentEdits( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): UserContentEditConnection - - """ - Check if the current viewer can delete this object. - """ - viewerCanDelete: Boolean! - - """ - Check if the current viewer can minimize this object. - """ - viewerCanMinimize: Boolean! - - """ - Can user react to this subject - """ - viewerCanReact: Boolean! - - """ - Check if the current viewer can update this object. - """ - viewerCanUpdate: Boolean! - - """ - Reasons why the current viewer can not update this comment. - """ - viewerCannotUpdateReasons: [CommentCannotUpdateReason!]! - - """ - Did the viewer author this comment. - """ - viewerDidAuthor: Boolean! -} - -""" -The connection type for IssueComment. -""" -type IssueCommentConnection { - """ - A list of edges. - """ - edges: [IssueCommentEdge] - - """ - A list of nodes. - """ - nodes: [IssueComment] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type IssueCommentEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: IssueComment -} - -""" -Ways in which lists of issue comments can be ordered upon return. -""" -input IssueCommentOrder { - """ - The direction in which to order issue comments by the specified field. - """ - direction: OrderDirection! - - """ - The field in which to order issue comments by. - """ - field: IssueCommentOrderField! -} - -""" -Properties by which issue comment connections can be ordered. -""" -enum IssueCommentOrderField { - """ - Order issue comments by update time - """ - UPDATED_AT -} - -""" -The connection type for Issue. -""" -type IssueConnection { - """ - A list of edges. - """ - edges: [IssueEdge] - - """ - A list of nodes. - """ - nodes: [Issue] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -This aggregates issues opened by a user within one repository. -""" -type IssueContributionsByRepository { - """ - The issue contributions. - """ - contributions( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for contributions returned from the connection. - """ - orderBy: ContributionOrder = {direction: DESC} - ): CreatedIssueContributionConnection! - - """ - The repository in which the issues were opened. - """ - repository: Repository! -} - -""" -An edge in a connection. -""" -type IssueEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: Issue -} - -""" -Ways in which to filter lists of issues. -""" -input IssueFilters { - """ - List issues assigned to given name. Pass in `null` for issues with no assigned - user, and `*` for issues assigned to any user. - """ - assignee: String - - """ - List issues created by given name. - """ - createdBy: String - - """ - List issues where the list of label names exist on the issue. - """ - labels: [String!] - - """ - List issues where the given name is mentioned in the issue. - """ - mentioned: String - - """ - List issues by given milestone argument. If an string representation of an - integer is passed, it should refer to a milestone by its number field. Pass in - `null` for issues with no milestone, and `*` for issues that are assigned to any milestone. - """ - milestone: String - - """ - List issues that have been updated at or after the given date. - """ - since: DateTime - - """ - List issues filtered by the list of states given. - """ - states: [IssueState!] - - """ - List issues subscribed to by viewer. - """ - viewerSubscribed: Boolean = false -} - -""" -Used for return value of Repository.issueOrPullRequest. -""" -union IssueOrPullRequest = Issue | PullRequest - -""" -Ways in which lists of issues can be ordered upon return. -""" -input IssueOrder { - """ - The direction in which to order issues by the specified field. - """ - direction: OrderDirection! - - """ - The field in which to order issues by. - """ - field: IssueOrderField! -} - -""" -Properties by which issue connections can be ordered. -""" -enum IssueOrderField { - """ - Order issues by comment count - """ - COMMENTS - - """ - Order issues by creation time - """ - CREATED_AT - - """ - Order issues by update time - """ - UPDATED_AT -} - -""" -The possible states of an issue. -""" -enum IssueState { - """ - An issue that has been closed - """ - CLOSED - - """ - An issue that is still open - """ - OPEN -} - -""" -A repository issue template. -""" -type IssueTemplate { - """ - The template purpose. - """ - about: String - - """ - The suggested issue body. - """ - body: String - - """ - The template name. - """ - name: String! - - """ - The suggested issue title. - """ - title: String -} - -""" -The connection type for IssueTimelineItem. -""" -type IssueTimelineConnection { - """ - A list of edges. - """ - edges: [IssueTimelineItemEdge] - - """ - A list of nodes. - """ - nodes: [IssueTimelineItem] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An item in an issue timeline -""" -union IssueTimelineItem = AssignedEvent | ClosedEvent | Commit | CrossReferencedEvent | DemilestonedEvent | IssueComment | LabeledEvent | LockedEvent | MilestonedEvent | ReferencedEvent | RenamedTitleEvent | ReopenedEvent | SubscribedEvent | TransferredEvent | UnassignedEvent | UnlabeledEvent | UnlockedEvent | UnsubscribedEvent | UserBlockedEvent - -""" -An edge in a connection. -""" -type IssueTimelineItemEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: IssueTimelineItem -} - -""" -An item in an issue timeline -""" -union IssueTimelineItems = AddedToProjectEvent | AssignedEvent | ClosedEvent | CommentDeletedEvent | ConnectedEvent | ConvertedNoteToIssueEvent | CrossReferencedEvent | DemilestonedEvent | DisconnectedEvent | IssueComment | LabeledEvent | LockedEvent | MarkedAsDuplicateEvent | MentionedEvent | MilestonedEvent | MovedColumnsInProjectEvent | PinnedEvent | ReferencedEvent | RemovedFromProjectEvent | RenamedTitleEvent | ReopenedEvent | SubscribedEvent | TransferredEvent | UnassignedEvent | UnlabeledEvent | UnlockedEvent | UnmarkedAsDuplicateEvent | UnpinnedEvent | UnsubscribedEvent | UserBlockedEvent - -""" -The connection type for IssueTimelineItems. -""" -type IssueTimelineItemsConnection { - """ - A list of edges. - """ - edges: [IssueTimelineItemsEdge] - - """ - Identifies the count of items after applying `before` and `after` filters. - """ - filteredCount: Int! - - """ - A list of nodes. - """ - nodes: [IssueTimelineItems] - - """ - Identifies the count of items after applying `before`/`after` filters and `first`/`last`/`skip` slicing. - """ - pageCount: Int! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! - - """ - Identifies the date and time when the timeline was last updated. - """ - updatedAt: DateTime! -} - -""" -An edge in a connection. -""" -type IssueTimelineItemsEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: IssueTimelineItems -} - -""" -The possible item types found in a timeline. -""" -enum IssueTimelineItemsItemType { - """ - Represents a 'added_to_project' event on a given issue or pull request. - """ - ADDED_TO_PROJECT_EVENT - - """ - Represents an 'assigned' event on any assignable object. - """ - ASSIGNED_EVENT - - """ - Represents a 'closed' event on any `Closable`. - """ - CLOSED_EVENT - - """ - Represents a 'comment_deleted' event on a given issue or pull request. - """ - COMMENT_DELETED_EVENT - - """ - Represents a 'connected' event on a given issue or pull request. - """ - CONNECTED_EVENT - - """ - Represents a 'converted_note_to_issue' event on a given issue or pull request. - """ - CONVERTED_NOTE_TO_ISSUE_EVENT - - """ - Represents a mention made by one issue or pull request to another. - """ - CROSS_REFERENCED_EVENT - - """ - Represents a 'demilestoned' event on a given issue or pull request. - """ - DEMILESTONED_EVENT - - """ - Represents a 'disconnected' event on a given issue or pull request. - """ - DISCONNECTED_EVENT - - """ - Represents a comment on an Issue. - """ - ISSUE_COMMENT - - """ - Represents a 'labeled' event on a given issue or pull request. - """ - LABELED_EVENT - - """ - Represents a 'locked' event on a given issue or pull request. - """ - LOCKED_EVENT - - """ - Represents a 'marked_as_duplicate' event on a given issue or pull request. - """ - MARKED_AS_DUPLICATE_EVENT - - """ - Represents a 'mentioned' event on a given issue or pull request. - """ - MENTIONED_EVENT - - """ - Represents a 'milestoned' event on a given issue or pull request. - """ - MILESTONED_EVENT - - """ - Represents a 'moved_columns_in_project' event on a given issue or pull request. - """ - MOVED_COLUMNS_IN_PROJECT_EVENT - - """ - Represents a 'pinned' event on a given issue or pull request. - """ - PINNED_EVENT - - """ - Represents a 'referenced' event on a given `ReferencedSubject`. - """ - REFERENCED_EVENT - - """ - Represents a 'removed_from_project' event on a given issue or pull request. - """ - REMOVED_FROM_PROJECT_EVENT - - """ - Represents a 'renamed' event on a given issue or pull request - """ - RENAMED_TITLE_EVENT - - """ - Represents a 'reopened' event on any `Closable`. - """ - REOPENED_EVENT - - """ - Represents a 'subscribed' event on a given `Subscribable`. - """ - SUBSCRIBED_EVENT - - """ - Represents a 'transferred' event on a given issue or pull request. - """ - TRANSFERRED_EVENT - - """ - Represents an 'unassigned' event on any assignable object. - """ - UNASSIGNED_EVENT - - """ - Represents an 'unlabeled' event on a given issue or pull request. - """ - UNLABELED_EVENT - - """ - Represents an 'unlocked' event on a given issue or pull request. - """ - UNLOCKED_EVENT - - """ - Represents an 'unmarked_as_duplicate' event on a given issue or pull request. - """ - UNMARKED_AS_DUPLICATE_EVENT - - """ - Represents an 'unpinned' event on a given issue or pull request. - """ - UNPINNED_EVENT - - """ - Represents an 'unsubscribed' event on a given `Subscribable`. - """ - UNSUBSCRIBED_EVENT - - """ - Represents a 'user_blocked' event on a given user. - """ - USER_BLOCKED_EVENT -} - -""" -Represents a user signing up for a GitHub account. -""" -type JoinedGitHubContribution implements Contribution { - """ - Whether this contribution is associated with a record you do not have access to. For - example, your own 'first issue' contribution may have been made on a repository you can no - longer access. - """ - isRestricted: Boolean! - - """ - When this contribution was made. - """ - occurredAt: DateTime! - - """ - The HTTP path for this contribution. - """ - resourcePath: URI! - - """ - The HTTP URL for this contribution. - """ - url: URI! - - """ - The user who made this contribution. - """ - user: User! -} - -""" -A label for categorizing Issues or Milestones with a given Repository. -""" -type Label implements Node { - """ - Identifies the label color. - """ - color: String! - - """ - Identifies the date and time when the label was created. - """ - createdAt: DateTime - - """ - A brief description of this label. - """ - description: String - id: ID! - - """ - Indicates whether or not this is a default label. - """ - isDefault: Boolean! - - """ - A list of issues associated with this label. - """ - issues( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Filtering options for issues returned from the connection. - """ - filterBy: IssueFilters - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - A list of label names to filter the pull requests by. - """ - labels: [String!] - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for issues returned from the connection. - """ - orderBy: IssueOrder - - """ - A list of states to filter the issues by. - """ - states: [IssueState!] - ): IssueConnection! - - """ - Identifies the label name. - """ - name: String! - - """ - A list of pull requests associated with this label. - """ - pullRequests( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - The base ref name to filter the pull requests by. - """ - baseRefName: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - The head ref name to filter the pull requests by. - """ - headRefName: String - - """ - A list of label names to filter the pull requests by. - """ - labels: [String!] - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for pull requests returned from the connection. - """ - orderBy: IssueOrder - - """ - A list of states to filter the pull requests by. - """ - states: [PullRequestState!] - ): PullRequestConnection! - - """ - The repository associated with this label. - """ - repository: Repository! - - """ - The HTTP path for this label. - """ - resourcePath: URI! - - """ - Identifies the date and time when the label was last updated. - """ - updatedAt: DateTime - - """ - The HTTP URL for this label. - """ - url: URI! -} - -""" -The connection type for Label. -""" -type LabelConnection { - """ - A list of edges. - """ - edges: [LabelEdge] - - """ - A list of nodes. - """ - nodes: [Label] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type LabelEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: Label -} - -""" -Ways in which lists of labels can be ordered upon return. -""" -input LabelOrder { - """ - The direction in which to order labels by the specified field. - """ - direction: OrderDirection! - - """ - The field in which to order labels by. - """ - field: LabelOrderField! -} - -""" -Properties by which label connections can be ordered. -""" -enum LabelOrderField { - """ - Order labels by creation time - """ - CREATED_AT - - """ - Order labels by name - """ - NAME -} - -""" -An object that can have labels assigned to it. -""" -interface Labelable { - """ - A list of labels associated with the object. - """ - labels( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for labels returned from the connection. - """ - orderBy: LabelOrder = {field: CREATED_AT, direction: ASC} - ): LabelConnection -} - -""" -Represents a 'labeled' event on a given issue or pull request. -""" -type LabeledEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! - - """ - Identifies the label associated with the 'labeled' event. - """ - label: Label! - - """ - Identifies the `Labelable` associated with the event. - """ - labelable: Labelable! -} - -""" -Represents a given language found in repositories. -""" -type Language implements Node { - """ - The color defined for the current language. - """ - color: String - id: ID! - - """ - The name of the current language. - """ - name: String! -} - -""" -A list of languages associated with the parent. -""" -type LanguageConnection { - """ - A list of edges. - """ - edges: [LanguageEdge] - - """ - A list of nodes. - """ - nodes: [Language] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! - - """ - The total size in bytes of files written in that language. - """ - totalSize: Int! -} - -""" -Represents the language of a repository. -""" -type LanguageEdge { - cursor: String! - node: Language! - - """ - The number of bytes of code written in the language. - """ - size: Int! -} - -""" -Ordering options for language connections. -""" -input LanguageOrder { - """ - The ordering direction. - """ - direction: OrderDirection! - - """ - The field to order languages by. - """ - field: LanguageOrderField! -} - -""" -Properties by which language connections can be ordered. -""" -enum LanguageOrderField { - """ - Order languages by the size of all files containing the language - """ - SIZE -} - -""" -A repository's open source license -""" -type License implements Node { - """ - The full text of the license - """ - body: String! - - """ - The conditions set by the license - """ - conditions: [LicenseRule]! - - """ - A human-readable description of the license - """ - description: String - - """ - Whether the license should be featured - """ - featured: Boolean! - - """ - Whether the license should be displayed in license pickers - """ - hidden: Boolean! - id: ID! - - """ - Instructions on how to implement the license - """ - implementation: String - - """ - The lowercased SPDX ID of the license - """ - key: String! - - """ - The limitations set by the license - """ - limitations: [LicenseRule]! - - """ - The license full name specified by - """ - name: String! - - """ - Customary short name if applicable (e.g, GPLv3) - """ - nickname: String - - """ - The permissions set by the license - """ - permissions: [LicenseRule]! - - """ - Whether the license is a pseudo-license placeholder (e.g., other, no-license) - """ - pseudoLicense: Boolean! - - """ - Short identifier specified by - """ - spdxId: String - - """ - URL to the license on - """ - url: URI -} - -""" -Describes a License's conditions, permissions, and limitations -""" -type LicenseRule { - """ - A description of the rule - """ - description: String! - - """ - The machine-readable rule key - """ - key: String! - - """ - The human-readable rule label - """ - label: String! -} - -""" -Autogenerated input type of LinkRepositoryToProject -""" -input LinkRepositoryToProjectInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the Project to link to a Repository - """ - projectId: ID! @possibleTypes(concreteTypes: ["Project"]) - - """ - The ID of the Repository to link to a Project. - """ - repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) -} - -""" -Autogenerated return type of LinkRepositoryToProject -""" -type LinkRepositoryToProjectPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The linked Project. - """ - project: Project - - """ - The linked Repository. - """ - repository: Repository -} - -""" -Autogenerated input type of LockLockable -""" -input LockLockableInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - A reason for why the item will be locked. - """ - lockReason: LockReason - - """ - ID of the item to be locked. - """ - lockableId: ID! @possibleTypes(concreteTypes: ["Issue", "PullRequest"], abstractType: "Lockable") -} - -""" -Autogenerated return type of LockLockable -""" -type LockLockablePayload { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The item that was locked. - """ - lockedRecord: Lockable -} - -""" -The possible reasons that an issue or pull request was locked. -""" -enum LockReason { - """ - The issue or pull request was locked because the conversation was off-topic. - """ - OFF_TOPIC - - """ - The issue or pull request was locked because the conversation was resolved. - """ - RESOLVED - - """ - The issue or pull request was locked because the conversation was spam. - """ - SPAM - - """ - The issue or pull request was locked because the conversation was too heated. - """ - TOO_HEATED -} - -""" -An object that can be locked. -""" -interface Lockable { - """ - Reason that the conversation was locked. - """ - activeLockReason: LockReason - - """ - `true` if the object is locked - """ - locked: Boolean! -} - -""" -Represents a 'locked' event on a given issue or pull request. -""" -type LockedEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! - - """ - Reason that the conversation was locked (optional). - """ - lockReason: LockReason - - """ - Object that was locked. - """ - lockable: Lockable! -} - -""" -A placeholder user for attribution of imported data on GitHub. -""" -type Mannequin implements Actor & Node & UniformResourceLocatable { - """ - A URL pointing to the GitHub App's public avatar. - """ - avatarUrl( - """ - The size of the resulting square image. - """ - size: Int - ): URI! - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - - """ - The mannequin's email on the source instance. - """ - email: String - id: ID! - - """ - The username of the actor. - """ - login: String! - - """ - The HTML path to this resource. - """ - resourcePath: URI! - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! - - """ - The URL to this resource. - """ - url: URI! -} - -""" -Autogenerated input type of MarkFileAsViewed -""" -input MarkFileAsViewedInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The path of the file to mark as viewed - """ - path: String! - - """ - The Node ID of the pull request. - """ - pullRequestId: ID! @possibleTypes(concreteTypes: ["PullRequest"]) -} - -""" -Autogenerated return type of MarkFileAsViewed -""" -type MarkFileAsViewedPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The updated pull request. - """ - pullRequest: PullRequest -} - -""" -Autogenerated input type of MarkPullRequestReadyForReview -""" -input MarkPullRequestReadyForReviewInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - ID of the pull request to be marked as ready for review. - """ - pullRequestId: ID! @possibleTypes(concreteTypes: ["PullRequest"]) -} - -""" -Autogenerated return type of MarkPullRequestReadyForReview -""" -type MarkPullRequestReadyForReviewPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The pull request that is ready for review. - """ - pullRequest: PullRequest -} - -""" -Represents a 'marked_as_duplicate' event on a given issue or pull request. -""" -type MarkedAsDuplicateEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - The authoritative issue or pull request which has been duplicated by another. - """ - canonical: IssueOrPullRequest - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - The issue or pull request which has been marked as a duplicate of another. - """ - duplicate: IssueOrPullRequest - id: ID! - - """ - Canonical and duplicate belong to different repositories. - """ - isCrossRepository: Boolean! -} - -""" -A public description of a Marketplace category. -""" -type MarketplaceCategory implements Node { - """ - The category's description. - """ - description: String - - """ - The technical description of how apps listed in this category work with GitHub. - """ - howItWorks: String - id: ID! - - """ - The category's name. - """ - name: String! - - """ - How many Marketplace listings have this as their primary category. - """ - primaryListingCount: Int! - - """ - The HTTP path for this Marketplace category. - """ - resourcePath: URI! - - """ - How many Marketplace listings have this as their secondary category. - """ - secondaryListingCount: Int! - - """ - The short name of the category used in its URL. - """ - slug: String! - - """ - The HTTP URL for this Marketplace category. - """ - url: URI! -} - -""" -A listing in the GitHub integration marketplace. -""" -type MarketplaceListing implements Node { - """ - The GitHub App this listing represents. - """ - app: App - - """ - URL to the listing owner's company site. - """ - companyUrl: URI - - """ - The HTTP path for configuring access to the listing's integration or OAuth app - """ - configurationResourcePath: URI! - - """ - The HTTP URL for configuring access to the listing's integration or OAuth app - """ - configurationUrl: URI! - - """ - URL to the listing's documentation. - """ - documentationUrl: URI - - """ - The listing's detailed description. - """ - extendedDescription: String - - """ - The listing's detailed description rendered to HTML. - """ - extendedDescriptionHTML: HTML! - - """ - The listing's introductory description. - """ - fullDescription: String! - - """ - The listing's introductory description rendered to HTML. - """ - fullDescriptionHTML: HTML! - - """ - Does this listing have any plans with a free trial? - """ - hasPublishedFreeTrialPlans: Boolean! - - """ - Does this listing have a terms of service link? - """ - hasTermsOfService: Boolean! - - """ - Whether the creator of the app is a verified org - """ - hasVerifiedOwner: Boolean! - - """ - A technical description of how this app works with GitHub. - """ - howItWorks: String - - """ - The listing's technical description rendered to HTML. - """ - howItWorksHTML: HTML! - id: ID! - - """ - URL to install the product to the viewer's account or organization. - """ - installationUrl: URI - - """ - Whether this listing's app has been installed for the current viewer - """ - installedForViewer: Boolean! - - """ - Whether this listing has been removed from the Marketplace. - """ - isArchived: Boolean! - - """ - Whether this listing is still an editable draft that has not been submitted - for review and is not publicly visible in the Marketplace. - """ - isDraft: Boolean! - - """ - Whether the product this listing represents is available as part of a paid plan. - """ - isPaid: Boolean! - - """ - Whether this listing has been approved for display in the Marketplace. - """ - isPublic: Boolean! - - """ - Whether this listing has been rejected by GitHub for display in the Marketplace. - """ - isRejected: Boolean! - - """ - Whether this listing has been approved for unverified display in the Marketplace. - """ - isUnverified: Boolean! - - """ - Whether this draft listing has been submitted for review for approval to be unverified in the Marketplace. - """ - isUnverifiedPending: Boolean! - - """ - Whether this draft listing has been submitted for review from GitHub for approval to be verified in the Marketplace. - """ - isVerificationPendingFromDraft: Boolean! - - """ - Whether this unverified listing has been submitted for review from GitHub for approval to be verified in the Marketplace. - """ - isVerificationPendingFromUnverified: Boolean! - - """ - Whether this listing has been approved for verified display in the Marketplace. - """ - isVerified: Boolean! - - """ - The hex color code, without the leading '#', for the logo background. - """ - logoBackgroundColor: String! - - """ - URL for the listing's logo image. - """ - logoUrl( - """ - The size in pixels of the resulting square image. - """ - size: Int = 400 - ): URI - - """ - The listing's full name. - """ - name: String! - - """ - The listing's very short description without a trailing period or ampersands. - """ - normalizedShortDescription: String! - - """ - URL to the listing's detailed pricing. - """ - pricingUrl: URI - - """ - The category that best describes the listing. - """ - primaryCategory: MarketplaceCategory! - - """ - URL to the listing's privacy policy, may return an empty string for listings that do not require a privacy policy URL. - """ - privacyPolicyUrl: URI! - - """ - The HTTP path for the Marketplace listing. - """ - resourcePath: URI! - - """ - The URLs for the listing's screenshots. - """ - screenshotUrls: [String]! - - """ - An alternate category that describes the listing. - """ - secondaryCategory: MarketplaceCategory - - """ - The listing's very short description. - """ - shortDescription: String! - - """ - The short name of the listing used in its URL. - """ - slug: String! - - """ - URL to the listing's status page. - """ - statusUrl: URI - - """ - An email address for support for this listing's app. - """ - supportEmail: String - - """ - Either a URL or an email address for support for this listing's app, may - return an empty string for listings that do not require a support URL. - """ - supportUrl: URI! - - """ - URL to the listing's terms of service. - """ - termsOfServiceUrl: URI - - """ - The HTTP URL for the Marketplace listing. - """ - url: URI! - - """ - Can the current viewer add plans for this Marketplace listing. - """ - viewerCanAddPlans: Boolean! - - """ - Can the current viewer approve this Marketplace listing. - """ - viewerCanApprove: Boolean! - - """ - Can the current viewer delist this Marketplace listing. - """ - viewerCanDelist: Boolean! - - """ - Can the current viewer edit this Marketplace listing. - """ - viewerCanEdit: Boolean! - - """ - Can the current viewer edit the primary and secondary category of this - Marketplace listing. - """ - viewerCanEditCategories: Boolean! - - """ - Can the current viewer edit the plans for this Marketplace listing. - """ - viewerCanEditPlans: Boolean! - - """ - Can the current viewer return this Marketplace listing to draft state - so it becomes editable again. - """ - viewerCanRedraft: Boolean! - - """ - Can the current viewer reject this Marketplace listing by returning it to - an editable draft state or rejecting it entirely. - """ - viewerCanReject: Boolean! - - """ - Can the current viewer request this listing be reviewed for display in - the Marketplace as verified. - """ - viewerCanRequestApproval: Boolean! - - """ - Indicates whether the current user has an active subscription to this Marketplace listing. - """ - viewerHasPurchased: Boolean! - - """ - Indicates if the current user has purchased a subscription to this Marketplace listing - for all of the organizations the user owns. - """ - viewerHasPurchasedForAllOrganizations: Boolean! - - """ - Does the current viewer role allow them to administer this Marketplace listing. - """ - viewerIsListingAdmin: Boolean! -} - -""" -Look up Marketplace Listings -""" -type MarketplaceListingConnection { - """ - A list of edges. - """ - edges: [MarketplaceListingEdge] - - """ - A list of nodes. - """ - nodes: [MarketplaceListing] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type MarketplaceListingEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: MarketplaceListing -} - -""" -Entities that have members who can set status messages. -""" -interface MemberStatusable { - """ - Get the status messages members of this entity have set that are either public or visible only to the organization. - """ - memberStatuses( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for user statuses returned from the connection. - """ - orderBy: UserStatusOrder = {field: UPDATED_AT, direction: DESC} - ): UserStatusConnection! -} - -""" -Audit log entry for a members_can_delete_repos.clear event. -""" -type MembersCanDeleteReposClearAuditEntry implements AuditEntry & EnterpriseAuditEntryData & Node & OrganizationAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - - """ - The HTTP path for this enterprise. - """ - enterpriseResourcePath: URI - - """ - The slug of the enterprise. - """ - enterpriseSlug: String - - """ - The HTTP URL for this enterprise. - """ - enterpriseUrl: URI - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a members_can_delete_repos.disable event. -""" -type MembersCanDeleteReposDisableAuditEntry implements AuditEntry & EnterpriseAuditEntryData & Node & OrganizationAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - - """ - The HTTP path for this enterprise. - """ - enterpriseResourcePath: URI - - """ - The slug of the enterprise. - """ - enterpriseSlug: String - - """ - The HTTP URL for this enterprise. - """ - enterpriseUrl: URI - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a members_can_delete_repos.enable event. -""" -type MembersCanDeleteReposEnableAuditEntry implements AuditEntry & EnterpriseAuditEntryData & Node & OrganizationAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - - """ - The HTTP path for this enterprise. - """ - enterpriseResourcePath: URI - - """ - The slug of the enterprise. - """ - enterpriseSlug: String - - """ - The HTTP URL for this enterprise. - """ - enterpriseUrl: URI - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Represents a 'mentioned' event on a given issue or pull request. -""" -type MentionedEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - id: ID! -} - -""" -Autogenerated input type of MergeBranch -""" -input MergeBranchInput { - """ - The email address to associate with this commit. - """ - authorEmail: String - - """ - The name of the base branch that the provided head will be merged into. - """ - base: String! - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - Message to use for the merge commit. If omitted, a default will be used. - """ - commitMessage: String - - """ - The head to merge into the base branch. This can be a branch name or a commit GitObjectID. - """ - head: String! - - """ - The Node ID of the Repository containing the base branch that will be modified. - """ - repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) -} - -""" -Autogenerated return type of MergeBranch -""" -type MergeBranchPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The resulting merge Commit. - """ - mergeCommit: Commit -} - -""" -Autogenerated input type of MergePullRequest -""" -input MergePullRequestInput { - """ - The email address to associate with this merge. - """ - authorEmail: String - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - Commit body to use for the merge commit; if omitted, a default message will be used - """ - commitBody: String - - """ - Commit headline to use for the merge commit; if omitted, a default message will be used. - """ - commitHeadline: String - - """ - OID that the pull request head ref must match to allow merge; if omitted, no check is performed. - """ - expectedHeadOid: GitObjectID - - """ - The merge method to use. If omitted, defaults to 'MERGE' - """ - mergeMethod: PullRequestMergeMethod = MERGE - - """ - ID of the pull request to be merged. - """ - pullRequestId: ID! @possibleTypes(concreteTypes: ["PullRequest"]) -} - -""" -Autogenerated return type of MergePullRequest -""" -type MergePullRequestPayload { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The pull request that was merged. - """ - pullRequest: PullRequest -} - -""" -Detailed status information about a pull request merge. -""" -enum MergeStateStatus { - """ - The head ref is out of date. - """ - BEHIND - - """ - The merge is blocked. - """ - BLOCKED - - """ - Mergeable and passing commit status. - """ - CLEAN - - """ - The merge commit cannot be cleanly created. - """ - DIRTY - - """ - The merge is blocked due to the pull request being a draft. - """ - DRAFT @deprecated(reason: "DRAFT state will be removed from this enum and `isDraft` should be used instead Use PullRequest.isDraft instead. Removal on 2021-01-01 UTC.") - - """ - Mergeable with passing commit status and pre-receive hooks. - """ - HAS_HOOKS - - """ - The state cannot currently be determined. - """ - UNKNOWN - - """ - Mergeable with non-passing commit status. - """ - UNSTABLE -} - -""" -Whether or not a PullRequest can be merged. -""" -enum MergeableState { - """ - The pull request cannot be merged due to merge conflicts. - """ - CONFLICTING - - """ - The pull request can be merged. - """ - MERGEABLE - - """ - The mergeability of the pull request is still being calculated. - """ - UNKNOWN -} - -""" -Represents a 'merged' event on a given pull request. -""" -type MergedEvent implements Node & UniformResourceLocatable { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the commit associated with the `merge` event. - """ - commit: Commit - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! - - """ - Identifies the Ref associated with the `merge` event. - """ - mergeRef: Ref - - """ - Identifies the name of the Ref associated with the `merge` event. - """ - mergeRefName: String! - - """ - PullRequest referenced by event. - """ - pullRequest: PullRequest! - - """ - The HTTP path for this merged event. - """ - resourcePath: URI! - - """ - The HTTP URL for this merged event. - """ - url: URI! -} - -""" -Represents a Milestone object on a given repository. -""" -type Milestone implements Closable & Node & UniformResourceLocatable { - """ - `true` if the object is closed (definition of closed may depend on type) - """ - closed: Boolean! - - """ - Identifies the date and time when the object was closed. - """ - closedAt: DateTime - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Identifies the actor who created the milestone. - """ - creator: Actor - - """ - Identifies the description of the milestone. - """ - description: String - - """ - Identifies the due date of the milestone. - """ - dueOn: DateTime - id: ID! - - """ - A list of issues associated with the milestone. - """ - issues( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Filtering options for issues returned from the connection. - """ - filterBy: IssueFilters - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - A list of label names to filter the pull requests by. - """ - labels: [String!] - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for issues returned from the connection. - """ - orderBy: IssueOrder - - """ - A list of states to filter the issues by. - """ - states: [IssueState!] - ): IssueConnection! - - """ - Identifies the number of the milestone. - """ - number: Int! - - """ - Identifies the percentage complete for the milestone - """ - progressPercentage: Float! - - """ - A list of pull requests associated with the milestone. - """ - pullRequests( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - The base ref name to filter the pull requests by. - """ - baseRefName: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - The head ref name to filter the pull requests by. - """ - headRefName: String - - """ - A list of label names to filter the pull requests by. - """ - labels: [String!] - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for pull requests returned from the connection. - """ - orderBy: IssueOrder - - """ - A list of states to filter the pull requests by. - """ - states: [PullRequestState!] - ): PullRequestConnection! - - """ - The repository associated with this milestone. - """ - repository: Repository! - - """ - The HTTP path for this milestone - """ - resourcePath: URI! - - """ - Identifies the state of the milestone. - """ - state: MilestoneState! - - """ - Identifies the title of the milestone. - """ - title: String! - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! - - """ - The HTTP URL for this milestone - """ - url: URI! -} - -""" -The connection type for Milestone. -""" -type MilestoneConnection { - """ - A list of edges. - """ - edges: [MilestoneEdge] - - """ - A list of nodes. - """ - nodes: [Milestone] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type MilestoneEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: Milestone -} - -""" -Types that can be inside a Milestone. -""" -union MilestoneItem = Issue | PullRequest - -""" -Ordering options for milestone connections. -""" -input MilestoneOrder { - """ - The ordering direction. - """ - direction: OrderDirection! - - """ - The field to order milestones by. - """ - field: MilestoneOrderField! -} - -""" -Properties by which milestone connections can be ordered. -""" -enum MilestoneOrderField { - """ - Order milestones by when they were created. - """ - CREATED_AT - - """ - Order milestones by when they are due. - """ - DUE_DATE - - """ - Order milestones by their number. - """ - NUMBER - - """ - Order milestones by when they were last updated. - """ - UPDATED_AT -} - -""" -The possible states of a milestone. -""" -enum MilestoneState { - """ - A milestone that has been closed. - """ - CLOSED - - """ - A milestone that is still open. - """ - OPEN -} - -""" -Represents a 'milestoned' event on a given issue or pull request. -""" -type MilestonedEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! - - """ - Identifies the milestone title associated with the 'milestoned' event. - """ - milestoneTitle: String! - - """ - Object referenced by event. - """ - subject: MilestoneItem! -} - -""" -Entities that can be minimized. -""" -interface Minimizable { - """ - Returns whether or not a comment has been minimized. - """ - isMinimized: Boolean! - - """ - Returns why the comment was minimized. - """ - minimizedReason: String - - """ - Check if the current viewer can minimize this object. - """ - viewerCanMinimize: Boolean! -} - -""" -Autogenerated input type of MinimizeComment -""" -input MinimizeCommentInput { - """ - The classification of comment - """ - classifier: ReportedContentClassifiers! - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The Node ID of the subject to modify. - """ - subjectId: ID! @possibleTypes(concreteTypes: ["CommitComment", "GistComment", "IssueComment", "PullRequestReviewComment"], abstractType: "Minimizable") -} - -""" -Autogenerated return type of MinimizeComment -""" -type MinimizeCommentPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The comment that was minimized. - """ - minimizedComment: Minimizable -} - -""" -Autogenerated input type of MoveProjectCard -""" -input MoveProjectCardInput { - """ - Place the new card after the card with this id. Pass null to place it at the top. - """ - afterCardId: ID @possibleTypes(concreteTypes: ["ProjectCard"]) - - """ - The id of the card to move. - """ - cardId: ID! @possibleTypes(concreteTypes: ["ProjectCard"]) - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The id of the column to move it into. - """ - columnId: ID! @possibleTypes(concreteTypes: ["ProjectColumn"]) -} - -""" -Autogenerated return type of MoveProjectCard -""" -type MoveProjectCardPayload { - """ - The new edge of the moved card. - """ - cardEdge: ProjectCardEdge - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String -} - -""" -Autogenerated input type of MoveProjectColumn -""" -input MoveProjectColumnInput { - """ - Place the new column after the column with this id. Pass null to place it at the front. - """ - afterColumnId: ID @possibleTypes(concreteTypes: ["ProjectColumn"]) - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The id of the column to move. - """ - columnId: ID! @possibleTypes(concreteTypes: ["ProjectColumn"]) -} - -""" -Autogenerated return type of MoveProjectColumn -""" -type MoveProjectColumnPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The new edge of the moved column. - """ - columnEdge: ProjectColumnEdge -} - -""" -Represents a 'moved_columns_in_project' event on a given issue or pull request. -""" -type MovedColumnsInProjectEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - id: ID! - - """ - Column name the issue or pull request was moved from. - """ - previousProjectColumnName: String! @preview(toggledBy: "starfox-preview") - - """ - Project referenced by event. - """ - project: Project @preview(toggledBy: "starfox-preview") - - """ - Project card referenced by this project event. - """ - projectCard: ProjectCard @preview(toggledBy: "starfox-preview") - - """ - Column name the issue or pull request was moved to. - """ - projectColumnName: String! @preview(toggledBy: "starfox-preview") -} - -""" -The root query for implementing GraphQL mutations. -""" -type Mutation { - """ - Accepts a pending invitation for a user to become an administrator of an enterprise. - """ - acceptEnterpriseAdministratorInvitation( - """ - Parameters for AcceptEnterpriseAdministratorInvitation - """ - input: AcceptEnterpriseAdministratorInvitationInput! - ): AcceptEnterpriseAdministratorInvitationPayload - - """ - Applies a suggested topic to the repository. - """ - acceptTopicSuggestion( - """ - Parameters for AcceptTopicSuggestion - """ - input: AcceptTopicSuggestionInput! - ): AcceptTopicSuggestionPayload - - """ - Adds assignees to an assignable object. - """ - addAssigneesToAssignable( - """ - Parameters for AddAssigneesToAssignable - """ - input: AddAssigneesToAssignableInput! - ): AddAssigneesToAssignablePayload - - """ - Adds a comment to an Issue or Pull Request. - """ - addComment( - """ - Parameters for AddComment - """ - input: AddCommentInput! - ): AddCommentPayload - - """ - Adds a support entitlement to an enterprise member. - """ - addEnterpriseSupportEntitlement( - """ - Parameters for AddEnterpriseSupportEntitlement - """ - input: AddEnterpriseSupportEntitlementInput! - ): AddEnterpriseSupportEntitlementPayload - - """ - Adds labels to a labelable object. - """ - addLabelsToLabelable( - """ - Parameters for AddLabelsToLabelable - """ - input: AddLabelsToLabelableInput! - ): AddLabelsToLabelablePayload - - """ - Adds a card to a ProjectColumn. Either `contentId` or `note` must be provided but **not** both. - """ - addProjectCard( - """ - Parameters for AddProjectCard - """ - input: AddProjectCardInput! - ): AddProjectCardPayload - - """ - Adds a column to a Project. - """ - addProjectColumn( - """ - Parameters for AddProjectColumn - """ - input: AddProjectColumnInput! - ): AddProjectColumnPayload - - """ - Adds a review to a Pull Request. - """ - addPullRequestReview( - """ - Parameters for AddPullRequestReview - """ - input: AddPullRequestReviewInput! - ): AddPullRequestReviewPayload - - """ - Adds a comment to a review. - """ - addPullRequestReviewComment( - """ - Parameters for AddPullRequestReviewComment - """ - input: AddPullRequestReviewCommentInput! - ): AddPullRequestReviewCommentPayload - - """ - Adds a new thread to a pending Pull Request Review. - """ - addPullRequestReviewThread( - """ - Parameters for AddPullRequestReviewThread - """ - input: AddPullRequestReviewThreadInput! - ): AddPullRequestReviewThreadPayload - - """ - Adds a reaction to a subject. - """ - addReaction( - """ - Parameters for AddReaction - """ - input: AddReactionInput! - ): AddReactionPayload - - """ - Adds a star to a Starrable. - """ - addStar( - """ - Parameters for AddStar - """ - input: AddStarInput! - ): AddStarPayload - - """ - Adds a verifiable domain to an owning account. - """ - addVerifiableDomain( - """ - Parameters for AddVerifiableDomain - """ - input: AddVerifiableDomainInput! - ): AddVerifiableDomainPayload - - """ - Approve a verifiable domain for notification delivery. - """ - approveVerifiableDomain( - """ - Parameters for ApproveVerifiableDomain - """ - input: ApproveVerifiableDomainInput! - ): ApproveVerifiableDomainPayload - - """ - Marks a repository as archived. - """ - archiveRepository( - """ - Parameters for ArchiveRepository - """ - input: ArchiveRepositoryInput! - ): ArchiveRepositoryPayload - - """ - Cancels a pending invitation for an administrator to join an enterprise. - """ - cancelEnterpriseAdminInvitation( - """ - Parameters for CancelEnterpriseAdminInvitation - """ - input: CancelEnterpriseAdminInvitationInput! - ): CancelEnterpriseAdminInvitationPayload - - """ - Update your status on GitHub. - """ - changeUserStatus( - """ - Parameters for ChangeUserStatus - """ - input: ChangeUserStatusInput! - ): ChangeUserStatusPayload - - """ - Clears all labels from a labelable object. - """ - clearLabelsFromLabelable( - """ - Parameters for ClearLabelsFromLabelable - """ - input: ClearLabelsFromLabelableInput! - ): ClearLabelsFromLabelablePayload - - """ - Creates a new project by cloning configuration from an existing project. - """ - cloneProject( - """ - Parameters for CloneProject - """ - input: CloneProjectInput! - ): CloneProjectPayload - - """ - Create a new repository with the same files and directory structure as a template repository. - """ - cloneTemplateRepository( - """ - Parameters for CloneTemplateRepository - """ - input: CloneTemplateRepositoryInput! - ): CloneTemplateRepositoryPayload - - """ - Close an issue. - """ - closeIssue( - """ - Parameters for CloseIssue - """ - input: CloseIssueInput! - ): CloseIssuePayload - - """ - Close a pull request. - """ - closePullRequest( - """ - Parameters for ClosePullRequest - """ - input: ClosePullRequestInput! - ): ClosePullRequestPayload - - """ - Convert a project note card to one associated with a newly created issue. - """ - convertProjectCardNoteToIssue( - """ - Parameters for ConvertProjectCardNoteToIssue - """ - input: ConvertProjectCardNoteToIssueInput! - ): ConvertProjectCardNoteToIssuePayload - - """ - Create a new branch protection rule - """ - createBranchProtectionRule( - """ - Parameters for CreateBranchProtectionRule - """ - input: CreateBranchProtectionRuleInput! - ): CreateBranchProtectionRulePayload - - """ - Create a check run. - """ - createCheckRun( - """ - Parameters for CreateCheckRun - """ - input: CreateCheckRunInput! - ): CreateCheckRunPayload - - """ - Create a check suite - """ - createCheckSuite( - """ - Parameters for CreateCheckSuite - """ - input: CreateCheckSuiteInput! - ): CreateCheckSuitePayload - - """ - Create a content attachment. - """ - createContentAttachment( - """ - Parameters for CreateContentAttachment - """ - input: CreateContentAttachmentInput! - ): CreateContentAttachmentPayload @preview(toggledBy: "corsair-preview") - - """ - Creates a new deployment event. - """ - createDeployment( - """ - Parameters for CreateDeployment - """ - input: CreateDeploymentInput! - ): CreateDeploymentPayload @preview(toggledBy: "flash-preview") - - """ - Create a deployment status. - """ - createDeploymentStatus( - """ - Parameters for CreateDeploymentStatus - """ - input: CreateDeploymentStatusInput! - ): CreateDeploymentStatusPayload @preview(toggledBy: "flash-preview") - - """ - Creates an organization as part of an enterprise account. - """ - createEnterpriseOrganization( - """ - Parameters for CreateEnterpriseOrganization - """ - input: CreateEnterpriseOrganizationInput! - ): CreateEnterpriseOrganizationPayload - - """ - Creates a new IP allow list entry. - """ - createIpAllowListEntry( - """ - Parameters for CreateIpAllowListEntry - """ - input: CreateIpAllowListEntryInput! - ): CreateIpAllowListEntryPayload - - """ - Creates a new issue. - """ - createIssue( - """ - Parameters for CreateIssue - """ - input: CreateIssueInput! - ): CreateIssuePayload - - """ - Creates a new label. - """ - createLabel( - """ - Parameters for CreateLabel - """ - input: CreateLabelInput! - ): CreateLabelPayload @preview(toggledBy: "bane-preview") - - """ - Creates a new project. - """ - createProject( - """ - Parameters for CreateProject - """ - input: CreateProjectInput! - ): CreateProjectPayload - - """ - Create a new pull request - """ - createPullRequest( - """ - Parameters for CreatePullRequest - """ - input: CreatePullRequestInput! - ): CreatePullRequestPayload - - """ - Create a new Git Ref. - """ - createRef( - """ - Parameters for CreateRef - """ - input: CreateRefInput! - ): CreateRefPayload - - """ - Create a new repository. - """ - createRepository( - """ - Parameters for CreateRepository - """ - input: CreateRepositoryInput! - ): CreateRepositoryPayload - - """ - Creates a new team discussion. - """ - createTeamDiscussion( - """ - Parameters for CreateTeamDiscussion - """ - input: CreateTeamDiscussionInput! - ): CreateTeamDiscussionPayload - - """ - Creates a new team discussion comment. - """ - createTeamDiscussionComment( - """ - Parameters for CreateTeamDiscussionComment - """ - input: CreateTeamDiscussionCommentInput! - ): CreateTeamDiscussionCommentPayload - - """ - Rejects a suggested topic for the repository. - """ - declineTopicSuggestion( - """ - Parameters for DeclineTopicSuggestion - """ - input: DeclineTopicSuggestionInput! - ): DeclineTopicSuggestionPayload - - """ - Delete a branch protection rule - """ - deleteBranchProtectionRule( - """ - Parameters for DeleteBranchProtectionRule - """ - input: DeleteBranchProtectionRuleInput! - ): DeleteBranchProtectionRulePayload - - """ - Deletes a deployment. - """ - deleteDeployment( - """ - Parameters for DeleteDeployment - """ - input: DeleteDeploymentInput! - ): DeleteDeploymentPayload - - """ - Deletes an IP allow list entry. - """ - deleteIpAllowListEntry( - """ - Parameters for DeleteIpAllowListEntry - """ - input: DeleteIpAllowListEntryInput! - ): DeleteIpAllowListEntryPayload - - """ - Deletes an Issue object. - """ - deleteIssue( - """ - Parameters for DeleteIssue - """ - input: DeleteIssueInput! - ): DeleteIssuePayload - - """ - Deletes an IssueComment object. - """ - deleteIssueComment( - """ - Parameters for DeleteIssueComment - """ - input: DeleteIssueCommentInput! - ): DeleteIssueCommentPayload - - """ - Deletes a label. - """ - deleteLabel( - """ - Parameters for DeleteLabel - """ - input: DeleteLabelInput! - ): DeleteLabelPayload @preview(toggledBy: "bane-preview") - - """ - Delete a package version. - """ - deletePackageVersion( - """ - Parameters for DeletePackageVersion - """ - input: DeletePackageVersionInput! - ): DeletePackageVersionPayload @preview(toggledBy: "package-deletes-preview") - - """ - Deletes a project. - """ - deleteProject( - """ - Parameters for DeleteProject - """ - input: DeleteProjectInput! - ): DeleteProjectPayload - - """ - Deletes a project card. - """ - deleteProjectCard( - """ - Parameters for DeleteProjectCard - """ - input: DeleteProjectCardInput! - ): DeleteProjectCardPayload - - """ - Deletes a project column. - """ - deleteProjectColumn( - """ - Parameters for DeleteProjectColumn - """ - input: DeleteProjectColumnInput! - ): DeleteProjectColumnPayload - - """ - Deletes a pull request review. - """ - deletePullRequestReview( - """ - Parameters for DeletePullRequestReview - """ - input: DeletePullRequestReviewInput! - ): DeletePullRequestReviewPayload - - """ - Deletes a pull request review comment. - """ - deletePullRequestReviewComment( - """ - Parameters for DeletePullRequestReviewComment - """ - input: DeletePullRequestReviewCommentInput! - ): DeletePullRequestReviewCommentPayload - - """ - Delete a Git Ref. - """ - deleteRef( - """ - Parameters for DeleteRef - """ - input: DeleteRefInput! - ): DeleteRefPayload - - """ - Deletes a team discussion. - """ - deleteTeamDiscussion( - """ - Parameters for DeleteTeamDiscussion - """ - input: DeleteTeamDiscussionInput! - ): DeleteTeamDiscussionPayload - - """ - Deletes a team discussion comment. - """ - deleteTeamDiscussionComment( - """ - Parameters for DeleteTeamDiscussionComment - """ - input: DeleteTeamDiscussionCommentInput! - ): DeleteTeamDiscussionCommentPayload - - """ - Deletes a verifiable domain. - """ - deleteVerifiableDomain( - """ - Parameters for DeleteVerifiableDomain - """ - input: DeleteVerifiableDomainInput! - ): DeleteVerifiableDomainPayload - - """ - Disable auto merge on the given pull request - """ - disablePullRequestAutoMerge( - """ - Parameters for DisablePullRequestAutoMerge - """ - input: DisablePullRequestAutoMergeInput! - ): DisablePullRequestAutoMergePayload - - """ - Dismisses an approved or rejected pull request review. - """ - dismissPullRequestReview( - """ - Parameters for DismissPullRequestReview - """ - input: DismissPullRequestReviewInput! - ): DismissPullRequestReviewPayload - - """ - Enable the default auto-merge on a pull request. - """ - enablePullRequestAutoMerge( - """ - Parameters for EnablePullRequestAutoMerge - """ - input: EnablePullRequestAutoMergeInput! - ): EnablePullRequestAutoMergePayload - - """ - Follow a user. - """ - followUser( - """ - Parameters for FollowUser - """ - input: FollowUserInput! - ): FollowUserPayload - - """ - Creates a new project by importing columns and a list of issues/PRs. - """ - importProject( - """ - Parameters for ImportProject - """ - input: ImportProjectInput! - ): ImportProjectPayload @preview(toggledBy: "slothette-preview") - - """ - Invite someone to become an administrator of the enterprise. - """ - inviteEnterpriseAdmin( - """ - Parameters for InviteEnterpriseAdmin - """ - input: InviteEnterpriseAdminInput! - ): InviteEnterpriseAdminPayload - - """ - Creates a repository link for a project. - """ - linkRepositoryToProject( - """ - Parameters for LinkRepositoryToProject - """ - input: LinkRepositoryToProjectInput! - ): LinkRepositoryToProjectPayload - - """ - Lock a lockable object - """ - lockLockable( - """ - Parameters for LockLockable - """ - input: LockLockableInput! - ): LockLockablePayload - - """ - Mark a pull request file as viewed - """ - markFileAsViewed( - """ - Parameters for MarkFileAsViewed - """ - input: MarkFileAsViewedInput! - ): MarkFileAsViewedPayload - - """ - Marks a pull request ready for review. - """ - markPullRequestReadyForReview( - """ - Parameters for MarkPullRequestReadyForReview - """ - input: MarkPullRequestReadyForReviewInput! - ): MarkPullRequestReadyForReviewPayload - - """ - Merge a head into a branch. - """ - mergeBranch( - """ - Parameters for MergeBranch - """ - input: MergeBranchInput! - ): MergeBranchPayload - - """ - Merge a pull request. - """ - mergePullRequest( - """ - Parameters for MergePullRequest - """ - input: MergePullRequestInput! - ): MergePullRequestPayload - - """ - Minimizes a comment on an Issue, Commit, Pull Request, or Gist - """ - minimizeComment( - """ - Parameters for MinimizeComment - """ - input: MinimizeCommentInput! - ): MinimizeCommentPayload - - """ - Moves a project card to another place. - """ - moveProjectCard( - """ - Parameters for MoveProjectCard - """ - input: MoveProjectCardInput! - ): MoveProjectCardPayload - - """ - Moves a project column to another place. - """ - moveProjectColumn( - """ - Parameters for MoveProjectColumn - """ - input: MoveProjectColumnInput! - ): MoveProjectColumnPayload - - """ - Pin an issue to a repository - """ - pinIssue( - """ - Parameters for PinIssue - """ - input: PinIssueInput! - ): PinIssuePayload - - """ - Regenerates the identity provider recovery codes for an enterprise - """ - regenerateEnterpriseIdentityProviderRecoveryCodes( - """ - Parameters for RegenerateEnterpriseIdentityProviderRecoveryCodes - """ - input: RegenerateEnterpriseIdentityProviderRecoveryCodesInput! - ): RegenerateEnterpriseIdentityProviderRecoveryCodesPayload - - """ - Regenerates a verifiable domain's verification token. - """ - regenerateVerifiableDomainToken( - """ - Parameters for RegenerateVerifiableDomainToken - """ - input: RegenerateVerifiableDomainTokenInput! - ): RegenerateVerifiableDomainTokenPayload - - """ - Removes assignees from an assignable object. - """ - removeAssigneesFromAssignable( - """ - Parameters for RemoveAssigneesFromAssignable - """ - input: RemoveAssigneesFromAssignableInput! - ): RemoveAssigneesFromAssignablePayload - - """ - Removes an administrator from the enterprise. - """ - removeEnterpriseAdmin( - """ - Parameters for RemoveEnterpriseAdmin - """ - input: RemoveEnterpriseAdminInput! - ): RemoveEnterpriseAdminPayload - - """ - Removes the identity provider from an enterprise - """ - removeEnterpriseIdentityProvider( - """ - Parameters for RemoveEnterpriseIdentityProvider - """ - input: RemoveEnterpriseIdentityProviderInput! - ): RemoveEnterpriseIdentityProviderPayload - - """ - Removes an organization from the enterprise - """ - removeEnterpriseOrganization( - """ - Parameters for RemoveEnterpriseOrganization - """ - input: RemoveEnterpriseOrganizationInput! - ): RemoveEnterpriseOrganizationPayload - - """ - Removes a support entitlement from an enterprise member. - """ - removeEnterpriseSupportEntitlement( - """ - Parameters for RemoveEnterpriseSupportEntitlement - """ - input: RemoveEnterpriseSupportEntitlementInput! - ): RemoveEnterpriseSupportEntitlementPayload - - """ - Removes labels from a Labelable object. - """ - removeLabelsFromLabelable( - """ - Parameters for RemoveLabelsFromLabelable - """ - input: RemoveLabelsFromLabelableInput! - ): RemoveLabelsFromLabelablePayload - - """ - Removes outside collaborator from all repositories in an organization. - """ - removeOutsideCollaborator( - """ - Parameters for RemoveOutsideCollaborator - """ - input: RemoveOutsideCollaboratorInput! - ): RemoveOutsideCollaboratorPayload - - """ - Removes a reaction from a subject. - """ - removeReaction( - """ - Parameters for RemoveReaction - """ - input: RemoveReactionInput! - ): RemoveReactionPayload - - """ - Removes a star from a Starrable. - """ - removeStar( - """ - Parameters for RemoveStar - """ - input: RemoveStarInput! - ): RemoveStarPayload - - """ - Reopen a issue. - """ - reopenIssue( - """ - Parameters for ReopenIssue - """ - input: ReopenIssueInput! - ): ReopenIssuePayload - - """ - Reopen a pull request. - """ - reopenPullRequest( - """ - Parameters for ReopenPullRequest - """ - input: ReopenPullRequestInput! - ): ReopenPullRequestPayload - - """ - Set review requests on a pull request. - """ - requestReviews( - """ - Parameters for RequestReviews - """ - input: RequestReviewsInput! - ): RequestReviewsPayload - - """ - Rerequests an existing check suite. - """ - rerequestCheckSuite( - """ - Parameters for RerequestCheckSuite - """ - input: RerequestCheckSuiteInput! - ): RerequestCheckSuitePayload - - """ - Marks a review thread as resolved. - """ - resolveReviewThread( - """ - Parameters for ResolveReviewThread - """ - input: ResolveReviewThreadInput! - ): ResolveReviewThreadPayload - - """ - Creates or updates the identity provider for an enterprise. - """ - setEnterpriseIdentityProvider( - """ - Parameters for SetEnterpriseIdentityProvider - """ - input: SetEnterpriseIdentityProviderInput! - ): SetEnterpriseIdentityProviderPayload - - """ - Set an organization level interaction limit for an organization's public repositories. - """ - setOrganizationInteractionLimit( - """ - Parameters for SetOrganizationInteractionLimit - """ - input: SetOrganizationInteractionLimitInput! - ): SetOrganizationInteractionLimitPayload - - """ - Sets an interaction limit setting for a repository. - """ - setRepositoryInteractionLimit( - """ - Parameters for SetRepositoryInteractionLimit - """ - input: SetRepositoryInteractionLimitInput! - ): SetRepositoryInteractionLimitPayload - - """ - Set a user level interaction limit for an user's public repositories. - """ - setUserInteractionLimit( - """ - Parameters for SetUserInteractionLimit - """ - input: SetUserInteractionLimitInput! - ): SetUserInteractionLimitPayload - - """ - Submits a pending pull request review. - """ - submitPullRequestReview( - """ - Parameters for SubmitPullRequestReview - """ - input: SubmitPullRequestReviewInput! - ): SubmitPullRequestReviewPayload - - """ - Transfer an issue to a different repository - """ - transferIssue( - """ - Parameters for TransferIssue - """ - input: TransferIssueInput! - ): TransferIssuePayload - - """ - Unarchives a repository. - """ - unarchiveRepository( - """ - Parameters for UnarchiveRepository - """ - input: UnarchiveRepositoryInput! - ): UnarchiveRepositoryPayload - - """ - Unfollow a user. - """ - unfollowUser( - """ - Parameters for UnfollowUser - """ - input: UnfollowUserInput! - ): UnfollowUserPayload - - """ - Deletes a repository link from a project. - """ - unlinkRepositoryFromProject( - """ - Parameters for UnlinkRepositoryFromProject - """ - input: UnlinkRepositoryFromProjectInput! - ): UnlinkRepositoryFromProjectPayload - - """ - Unlock a lockable object - """ - unlockLockable( - """ - Parameters for UnlockLockable - """ - input: UnlockLockableInput! - ): UnlockLockablePayload - - """ - Unmark a pull request file as viewed - """ - unmarkFileAsViewed( - """ - Parameters for UnmarkFileAsViewed - """ - input: UnmarkFileAsViewedInput! - ): UnmarkFileAsViewedPayload - - """ - Unmark an issue as a duplicate of another issue. - """ - unmarkIssueAsDuplicate( - """ - Parameters for UnmarkIssueAsDuplicate - """ - input: UnmarkIssueAsDuplicateInput! - ): UnmarkIssueAsDuplicatePayload - - """ - Unminimizes a comment on an Issue, Commit, Pull Request, or Gist - """ - unminimizeComment( - """ - Parameters for UnminimizeComment - """ - input: UnminimizeCommentInput! - ): UnminimizeCommentPayload - - """ - Unpin a pinned issue from a repository - """ - unpinIssue( - """ - Parameters for UnpinIssue - """ - input: UnpinIssueInput! - ): UnpinIssuePayload - - """ - Marks a review thread as unresolved. - """ - unresolveReviewThread( - """ - Parameters for UnresolveReviewThread - """ - input: UnresolveReviewThreadInput! - ): UnresolveReviewThreadPayload - - """ - Create a new branch protection rule - """ - updateBranchProtectionRule( - """ - Parameters for UpdateBranchProtectionRule - """ - input: UpdateBranchProtectionRuleInput! - ): UpdateBranchProtectionRulePayload - - """ - Update a check run - """ - updateCheckRun( - """ - Parameters for UpdateCheckRun - """ - input: UpdateCheckRunInput! - ): UpdateCheckRunPayload - - """ - Modifies the settings of an existing check suite - """ - updateCheckSuitePreferences( - """ - Parameters for UpdateCheckSuitePreferences - """ - input: UpdateCheckSuitePreferencesInput! - ): UpdateCheckSuitePreferencesPayload - - """ - Updates the role of an enterprise administrator. - """ - updateEnterpriseAdministratorRole( - """ - Parameters for UpdateEnterpriseAdministratorRole - """ - input: UpdateEnterpriseAdministratorRoleInput! - ): UpdateEnterpriseAdministratorRolePayload - - """ - Sets whether private repository forks are enabled for an enterprise. - """ - updateEnterpriseAllowPrivateRepositoryForkingSetting( - """ - Parameters for UpdateEnterpriseAllowPrivateRepositoryForkingSetting - """ - input: UpdateEnterpriseAllowPrivateRepositoryForkingSettingInput! - ): UpdateEnterpriseAllowPrivateRepositoryForkingSettingPayload - - """ - Sets the default repository permission for organizations in an enterprise. - """ - updateEnterpriseDefaultRepositoryPermissionSetting( - """ - Parameters for UpdateEnterpriseDefaultRepositoryPermissionSetting - """ - input: UpdateEnterpriseDefaultRepositoryPermissionSettingInput! - ): UpdateEnterpriseDefaultRepositoryPermissionSettingPayload - - """ - Sets whether organization members with admin permissions on a repository can change repository visibility. - """ - updateEnterpriseMembersCanChangeRepositoryVisibilitySetting( - """ - Parameters for UpdateEnterpriseMembersCanChangeRepositoryVisibilitySetting - """ - input: UpdateEnterpriseMembersCanChangeRepositoryVisibilitySettingInput! - ): UpdateEnterpriseMembersCanChangeRepositoryVisibilitySettingPayload - - """ - Sets the members can create repositories setting for an enterprise. - """ - updateEnterpriseMembersCanCreateRepositoriesSetting( - """ - Parameters for UpdateEnterpriseMembersCanCreateRepositoriesSetting - """ - input: UpdateEnterpriseMembersCanCreateRepositoriesSettingInput! - ): UpdateEnterpriseMembersCanCreateRepositoriesSettingPayload - - """ - Sets the members can delete issues setting for an enterprise. - """ - updateEnterpriseMembersCanDeleteIssuesSetting( - """ - Parameters for UpdateEnterpriseMembersCanDeleteIssuesSetting - """ - input: UpdateEnterpriseMembersCanDeleteIssuesSettingInput! - ): UpdateEnterpriseMembersCanDeleteIssuesSettingPayload - - """ - Sets the members can delete repositories setting for an enterprise. - """ - updateEnterpriseMembersCanDeleteRepositoriesSetting( - """ - Parameters for UpdateEnterpriseMembersCanDeleteRepositoriesSetting - """ - input: UpdateEnterpriseMembersCanDeleteRepositoriesSettingInput! - ): UpdateEnterpriseMembersCanDeleteRepositoriesSettingPayload - - """ - Sets whether members can invite collaborators are enabled for an enterprise. - """ - updateEnterpriseMembersCanInviteCollaboratorsSetting( - """ - Parameters for UpdateEnterpriseMembersCanInviteCollaboratorsSetting - """ - input: UpdateEnterpriseMembersCanInviteCollaboratorsSettingInput! - ): UpdateEnterpriseMembersCanInviteCollaboratorsSettingPayload - - """ - Sets whether or not an organization admin can make purchases. - """ - updateEnterpriseMembersCanMakePurchasesSetting( - """ - Parameters for UpdateEnterpriseMembersCanMakePurchasesSetting - """ - input: UpdateEnterpriseMembersCanMakePurchasesSettingInput! - ): UpdateEnterpriseMembersCanMakePurchasesSettingPayload - - """ - Sets the members can update protected branches setting for an enterprise. - """ - updateEnterpriseMembersCanUpdateProtectedBranchesSetting( - """ - Parameters for UpdateEnterpriseMembersCanUpdateProtectedBranchesSetting - """ - input: UpdateEnterpriseMembersCanUpdateProtectedBranchesSettingInput! - ): UpdateEnterpriseMembersCanUpdateProtectedBranchesSettingPayload - - """ - Sets the members can view dependency insights for an enterprise. - """ - updateEnterpriseMembersCanViewDependencyInsightsSetting( - """ - Parameters for UpdateEnterpriseMembersCanViewDependencyInsightsSetting - """ - input: UpdateEnterpriseMembersCanViewDependencyInsightsSettingInput! - ): UpdateEnterpriseMembersCanViewDependencyInsightsSettingPayload - - """ - Sets whether organization projects are enabled for an enterprise. - """ - updateEnterpriseOrganizationProjectsSetting( - """ - Parameters for UpdateEnterpriseOrganizationProjectsSetting - """ - input: UpdateEnterpriseOrganizationProjectsSettingInput! - ): UpdateEnterpriseOrganizationProjectsSettingPayload - - """ - Updates an enterprise's profile. - """ - updateEnterpriseProfile( - """ - Parameters for UpdateEnterpriseProfile - """ - input: UpdateEnterpriseProfileInput! - ): UpdateEnterpriseProfilePayload - - """ - Sets whether repository projects are enabled for a enterprise. - """ - updateEnterpriseRepositoryProjectsSetting( - """ - Parameters for UpdateEnterpriseRepositoryProjectsSetting - """ - input: UpdateEnterpriseRepositoryProjectsSettingInput! - ): UpdateEnterpriseRepositoryProjectsSettingPayload - - """ - Sets whether team discussions are enabled for an enterprise. - """ - updateEnterpriseTeamDiscussionsSetting( - """ - Parameters for UpdateEnterpriseTeamDiscussionsSetting - """ - input: UpdateEnterpriseTeamDiscussionsSettingInput! - ): UpdateEnterpriseTeamDiscussionsSettingPayload - - """ - Sets whether two factor authentication is required for all users in an enterprise. - """ - updateEnterpriseTwoFactorAuthenticationRequiredSetting( - """ - Parameters for UpdateEnterpriseTwoFactorAuthenticationRequiredSetting - """ - input: UpdateEnterpriseTwoFactorAuthenticationRequiredSettingInput! - ): UpdateEnterpriseTwoFactorAuthenticationRequiredSettingPayload - - """ - Sets whether an IP allow list is enabled on an owner. - """ - updateIpAllowListEnabledSetting( - """ - Parameters for UpdateIpAllowListEnabledSetting - """ - input: UpdateIpAllowListEnabledSettingInput! - ): UpdateIpAllowListEnabledSettingPayload - - """ - Updates an IP allow list entry. - """ - updateIpAllowListEntry( - """ - Parameters for UpdateIpAllowListEntry - """ - input: UpdateIpAllowListEntryInput! - ): UpdateIpAllowListEntryPayload - - """ - Updates an Issue. - """ - updateIssue( - """ - Parameters for UpdateIssue - """ - input: UpdateIssueInput! - ): UpdateIssuePayload - - """ - Updates an IssueComment object. - """ - updateIssueComment( - """ - Parameters for UpdateIssueComment - """ - input: UpdateIssueCommentInput! - ): UpdateIssueCommentPayload - - """ - Updates an existing label. - """ - updateLabel( - """ - Parameters for UpdateLabel - """ - input: UpdateLabelInput! - ): UpdateLabelPayload @preview(toggledBy: "bane-preview") - - """ - Update the setting to restrict notifications to only verified domains available to an owner. - """ - updateNotificationRestrictionSetting( - """ - Parameters for UpdateNotificationRestrictionSetting - """ - input: UpdateNotificationRestrictionSettingInput! - ): UpdateNotificationRestrictionSettingPayload - - """ - Updates an existing project. - """ - updateProject( - """ - Parameters for UpdateProject - """ - input: UpdateProjectInput! - ): UpdateProjectPayload - - """ - Updates an existing project card. - """ - updateProjectCard( - """ - Parameters for UpdateProjectCard - """ - input: UpdateProjectCardInput! - ): UpdateProjectCardPayload - - """ - Updates an existing project column. - """ - updateProjectColumn( - """ - Parameters for UpdateProjectColumn - """ - input: UpdateProjectColumnInput! - ): UpdateProjectColumnPayload - - """ - Update a pull request - """ - updatePullRequest( - """ - Parameters for UpdatePullRequest - """ - input: UpdatePullRequestInput! - ): UpdatePullRequestPayload - - """ - Updates the body of a pull request review. - """ - updatePullRequestReview( - """ - Parameters for UpdatePullRequestReview - """ - input: UpdatePullRequestReviewInput! - ): UpdatePullRequestReviewPayload - - """ - Updates a pull request review comment. - """ - updatePullRequestReviewComment( - """ - Parameters for UpdatePullRequestReviewComment - """ - input: UpdatePullRequestReviewCommentInput! - ): UpdatePullRequestReviewCommentPayload - - """ - Update a Git Ref. - """ - updateRef( - """ - Parameters for UpdateRef - """ - input: UpdateRefInput! - ): UpdateRefPayload - - """ - Creates, updates and/or deletes multiple refs in a repository. - - This mutation takes a list of `RefUpdate`s and performs these updates - on the repository. All updates are performed atomically, meaning that - if one of them is rejected, no other ref will be modified. - - `RefUpdate.beforeOid` specifies that the given reference needs to point - to the given value before performing any updates. A value of - `0000000000000000000000000000000000000000` can be used to verify that - the references should not exist. - - `RefUpdate.afterOid` specifies the value that the given reference - will point to after performing all updates. A value of - `0000000000000000000000000000000000000000` can be used to delete a - reference. - - If `RefUpdate.force` is set to `true`, a non-fast-forward updates - for the given reference will be allowed. - """ - updateRefs( - """ - Parameters for UpdateRefs - """ - input: UpdateRefsInput! - ): UpdateRefsPayload @preview(toggledBy: "update-refs-preview") - - """ - Update information about a repository. - """ - updateRepository( - """ - Parameters for UpdateRepository - """ - input: UpdateRepositoryInput! - ): UpdateRepositoryPayload - - """ - Updates the state for subscribable subjects. - """ - updateSubscription( - """ - Parameters for UpdateSubscription - """ - input: UpdateSubscriptionInput! - ): UpdateSubscriptionPayload - - """ - Updates a team discussion. - """ - updateTeamDiscussion( - """ - Parameters for UpdateTeamDiscussion - """ - input: UpdateTeamDiscussionInput! - ): UpdateTeamDiscussionPayload - - """ - Updates a discussion comment. - """ - updateTeamDiscussionComment( - """ - Parameters for UpdateTeamDiscussionComment - """ - input: UpdateTeamDiscussionCommentInput! - ): UpdateTeamDiscussionCommentPayload - - """ - Updates team review assignment. - """ - updateTeamReviewAssignment( - """ - Parameters for UpdateTeamReviewAssignment - """ - input: UpdateTeamReviewAssignmentInput! - ): UpdateTeamReviewAssignmentPayload @preview(toggledBy: "stone-crop-preview") - - """ - Replaces the repository's topics with the given topics. - """ - updateTopics( - """ - Parameters for UpdateTopics - """ - input: UpdateTopicsInput! - ): UpdateTopicsPayload - - """ - Verify that a verifiable domain has the expected DNS record. - """ - verifyVerifiableDomain( - """ - Parameters for VerifyVerifiableDomain - """ - input: VerifyVerifiableDomainInput! - ): VerifyVerifiableDomainPayload -} - -""" -An object with an ID. -""" -interface Node { - """ - ID of the object. - """ - id: ID! -} - -""" -The possible values for the notification restriction setting. -""" -enum NotificationRestrictionSettingValue { - """ - The setting is disabled for the owner. - """ - DISABLED - - """ - The setting is enabled for the owner. - """ - ENABLED -} - -""" -Metadata for an audit entry with action oauth_application.* -""" -interface OauthApplicationAuditEntryData { - """ - The name of the OAuth Application. - """ - oauthApplicationName: String - - """ - The HTTP path for the OAuth Application - """ - oauthApplicationResourcePath: URI - - """ - The HTTP URL for the OAuth Application - """ - oauthApplicationUrl: URI -} - -""" -Audit log entry for a oauth_application.create event. -""" -type OauthApplicationCreateAuditEntry implements AuditEntry & Node & OauthApplicationAuditEntryData & OrganizationAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The application URL of the OAuth Application. - """ - applicationUrl: URI - - """ - The callback URL of the OAuth Application. - """ - callbackUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The name of the OAuth Application. - """ - oauthApplicationName: String - - """ - The HTTP path for the OAuth Application - """ - oauthApplicationResourcePath: URI - - """ - The HTTP URL for the OAuth Application - """ - oauthApplicationUrl: URI - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The rate limit of the OAuth Application. - """ - rateLimit: Int - - """ - The state of the OAuth Application. - """ - state: OauthApplicationCreateAuditEntryState - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -The state of an OAuth Application when it was created. -""" -enum OauthApplicationCreateAuditEntryState { - """ - The OAuth Application was active and allowed to have OAuth Accesses. - """ - ACTIVE - - """ - The OAuth Application was in the process of being deleted. - """ - PENDING_DELETION - - """ - The OAuth Application was suspended from generating OAuth Accesses due to abuse or security concerns. - """ - SUSPENDED -} - -""" -The corresponding operation type for the action -""" -enum OperationType { - """ - An existing resource was accessed - """ - ACCESS - - """ - A resource performed an authentication event - """ - AUTHENTICATION - - """ - A new resource was created - """ - CREATE - - """ - An existing resource was modified - """ - MODIFY - - """ - An existing resource was removed - """ - REMOVE - - """ - An existing resource was restored - """ - RESTORE - - """ - An existing resource was transferred between multiple resources - """ - TRANSFER -} - -""" -Possible directions in which to order a list of items when provided an `orderBy` argument. -""" -enum OrderDirection { - """ - Specifies an ascending order for a given `orderBy` argument. - """ - ASC - - """ - Specifies a descending order for a given `orderBy` argument. - """ - DESC -} - -""" -Audit log entry for a org.add_billing_manager -""" -type OrgAddBillingManagerAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The email address used to invite a billing manager for the organization. - """ - invitationEmail: String - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a org.add_member -""" -type OrgAddMemberAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The permission level of the member added to the organization. - """ - permission: OrgAddMemberAuditEntryPermission - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -The permissions available to members on an Organization. -""" -enum OrgAddMemberAuditEntryPermission { - """ - Can read, clone, push, and add collaborators to repositories. - """ - ADMIN - - """ - Can read and clone repositories. - """ - READ -} - -""" -Audit log entry for a org.block_user -""" -type OrgBlockUserAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The blocked user. - """ - blockedUser: User - - """ - The username of the blocked user. - """ - blockedUserName: String - - """ - The HTTP path for the blocked user. - """ - blockedUserResourcePath: URI - - """ - The HTTP URL for the blocked user. - """ - blockedUserUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a org.config.disable_collaborators_only event. -""" -type OrgConfigDisableCollaboratorsOnlyAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a org.config.enable_collaborators_only event. -""" -type OrgConfigEnableCollaboratorsOnlyAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a org.create event. -""" -type OrgCreateAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The billing plan for the Organization. - """ - billingPlan: OrgCreateAuditEntryBillingPlan - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -The billing plans available for organizations. -""" -enum OrgCreateAuditEntryBillingPlan { - """ - Team Plan - """ - BUSINESS - - """ - Enterprise Cloud Plan - """ - BUSINESS_PLUS - - """ - Free Plan - """ - FREE - - """ - Tiered Per Seat Plan - """ - TIERED_PER_SEAT - - """ - Legacy Unlimited Plan - """ - UNLIMITED -} - -""" -Audit log entry for a org.disable_oauth_app_restrictions event. -""" -type OrgDisableOauthAppRestrictionsAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a org.disable_saml event. -""" -type OrgDisableSamlAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - - """ - The SAML provider's digest algorithm URL. - """ - digestMethodUrl: URI - id: ID! - - """ - The SAML provider's issuer URL. - """ - issuerUrl: URI - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The SAML provider's signature algorithm URL. - """ - signatureMethodUrl: URI - - """ - The SAML provider's single sign-on URL. - """ - singleSignOnUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a org.disable_two_factor_requirement event. -""" -type OrgDisableTwoFactorRequirementAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a org.enable_oauth_app_restrictions event. -""" -type OrgEnableOauthAppRestrictionsAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a org.enable_saml event. -""" -type OrgEnableSamlAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - - """ - The SAML provider's digest algorithm URL. - """ - digestMethodUrl: URI - id: ID! - - """ - The SAML provider's issuer URL. - """ - issuerUrl: URI - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The SAML provider's signature algorithm URL. - """ - signatureMethodUrl: URI - - """ - The SAML provider's single sign-on URL. - """ - singleSignOnUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a org.enable_two_factor_requirement event. -""" -type OrgEnableTwoFactorRequirementAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a org.invite_member event. -""" -type OrgInviteMemberAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - - """ - The email address of the organization invitation. - """ - email: String - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The organization invitation. - """ - organizationInvitation: OrganizationInvitation - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a org.invite_to_business event. -""" -type OrgInviteToBusinessAuditEntry implements AuditEntry & EnterpriseAuditEntryData & Node & OrganizationAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - - """ - The HTTP path for this enterprise. - """ - enterpriseResourcePath: URI - - """ - The slug of the enterprise. - """ - enterpriseSlug: String - - """ - The HTTP URL for this enterprise. - """ - enterpriseUrl: URI - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a org.oauth_app_access_approved event. -""" -type OrgOauthAppAccessApprovedAuditEntry implements AuditEntry & Node & OauthApplicationAuditEntryData & OrganizationAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The name of the OAuth Application. - """ - oauthApplicationName: String - - """ - The HTTP path for the OAuth Application - """ - oauthApplicationResourcePath: URI - - """ - The HTTP URL for the OAuth Application - """ - oauthApplicationUrl: URI - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a org.oauth_app_access_denied event. -""" -type OrgOauthAppAccessDeniedAuditEntry implements AuditEntry & Node & OauthApplicationAuditEntryData & OrganizationAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The name of the OAuth Application. - """ - oauthApplicationName: String - - """ - The HTTP path for the OAuth Application - """ - oauthApplicationResourcePath: URI - - """ - The HTTP URL for the OAuth Application - """ - oauthApplicationUrl: URI - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a org.oauth_app_access_requested event. -""" -type OrgOauthAppAccessRequestedAuditEntry implements AuditEntry & Node & OauthApplicationAuditEntryData & OrganizationAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The name of the OAuth Application. - """ - oauthApplicationName: String - - """ - The HTTP path for the OAuth Application - """ - oauthApplicationResourcePath: URI - - """ - The HTTP URL for the OAuth Application - """ - oauthApplicationUrl: URI - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a org.remove_billing_manager event. -""" -type OrgRemoveBillingManagerAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The reason for the billing manager being removed. - """ - reason: OrgRemoveBillingManagerAuditEntryReason - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -The reason a billing manager was removed from an Organization. -""" -enum OrgRemoveBillingManagerAuditEntryReason { - """ - SAML external identity missing - """ - SAML_EXTERNAL_IDENTITY_MISSING - - """ - SAML SSO enforcement requires an external identity - """ - SAML_SSO_ENFORCEMENT_REQUIRES_EXTERNAL_IDENTITY - - """ - The organization required 2FA of its billing managers and this user did not have 2FA enabled. - """ - TWO_FACTOR_REQUIREMENT_NON_COMPLIANCE -} - -""" -Audit log entry for a org.remove_member event. -""" -type OrgRemoveMemberAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The types of membership the member has with the organization. - """ - membershipTypes: [OrgRemoveMemberAuditEntryMembershipType!] - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The reason for the member being removed. - """ - reason: OrgRemoveMemberAuditEntryReason - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -The type of membership a user has with an Organization. -""" -enum OrgRemoveMemberAuditEntryMembershipType { - """ - Organization administrators have full access and can change several settings, - including the names of repositories that belong to the Organization and Owners - team membership. In addition, organization admins can delete the organization - and all of its repositories. - """ - ADMIN - - """ - A billing manager is a user who manages the billing settings for the Organization, such as updating payment information. - """ - BILLING_MANAGER - - """ - A direct member is a user that is a member of the Organization. - """ - DIRECT_MEMBER - - """ - An outside collaborator is a person who isn't explicitly a member of the - Organization, but who has Read, Write, or Admin permissions to one or more - repositories in the organization. - """ - OUTSIDE_COLLABORATOR - - """ - An unaffiliated collaborator is a person who is not a member of the - Organization and does not have access to any repositories in the Organization. - """ - UNAFFILIATED -} - -""" -The reason a member was removed from an Organization. -""" -enum OrgRemoveMemberAuditEntryReason { - """ - SAML external identity missing - """ - SAML_EXTERNAL_IDENTITY_MISSING - - """ - SAML SSO enforcement requires an external identity - """ - SAML_SSO_ENFORCEMENT_REQUIRES_EXTERNAL_IDENTITY - - """ - User was removed from organization during account recovery - """ - TWO_FACTOR_ACCOUNT_RECOVERY - - """ - The organization required 2FA of its billing managers and this user did not have 2FA enabled. - """ - TWO_FACTOR_REQUIREMENT_NON_COMPLIANCE - - """ - User account has been deleted - """ - USER_ACCOUNT_DELETED -} - -""" -Audit log entry for a org.remove_outside_collaborator event. -""" -type OrgRemoveOutsideCollaboratorAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The types of membership the outside collaborator has with the organization. - """ - membershipTypes: [OrgRemoveOutsideCollaboratorAuditEntryMembershipType!] - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The reason for the outside collaborator being removed from the Organization. - """ - reason: OrgRemoveOutsideCollaboratorAuditEntryReason - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -The type of membership a user has with an Organization. -""" -enum OrgRemoveOutsideCollaboratorAuditEntryMembershipType { - """ - A billing manager is a user who manages the billing settings for the Organization, such as updating payment information. - """ - BILLING_MANAGER - - """ - An outside collaborator is a person who isn't explicitly a member of the - Organization, but who has Read, Write, or Admin permissions to one or more - repositories in the organization. - """ - OUTSIDE_COLLABORATOR - - """ - An unaffiliated collaborator is a person who is not a member of the - Organization and does not have access to any repositories in the organization. - """ - UNAFFILIATED -} - -""" -The reason an outside collaborator was removed from an Organization. -""" -enum OrgRemoveOutsideCollaboratorAuditEntryReason { - """ - SAML external identity missing - """ - SAML_EXTERNAL_IDENTITY_MISSING - - """ - The organization required 2FA of its billing managers and this user did not have 2FA enabled. - """ - TWO_FACTOR_REQUIREMENT_NON_COMPLIANCE -} - -""" -Audit log entry for a org.restore_member event. -""" -type OrgRestoreMemberAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The number of custom email routings for the restored member. - """ - restoredCustomEmailRoutingsCount: Int - - """ - The number of issue assignments for the restored member. - """ - restoredIssueAssignmentsCount: Int - - """ - Restored organization membership objects. - """ - restoredMemberships: [OrgRestoreMemberAuditEntryMembership!] - - """ - The number of restored memberships. - """ - restoredMembershipsCount: Int - - """ - The number of repositories of the restored member. - """ - restoredRepositoriesCount: Int - - """ - The number of starred repositories for the restored member. - """ - restoredRepositoryStarsCount: Int - - """ - The number of watched repositories for the restored member. - """ - restoredRepositoryWatchesCount: Int - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Types of memberships that can be restored for an Organization member. -""" -union OrgRestoreMemberAuditEntryMembership = OrgRestoreMemberMembershipOrganizationAuditEntryData | OrgRestoreMemberMembershipRepositoryAuditEntryData | OrgRestoreMemberMembershipTeamAuditEntryData - -""" -Metadata for an organization membership for org.restore_member actions -""" -type OrgRestoreMemberMembershipOrganizationAuditEntryData implements OrganizationAuditEntryData { - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI -} - -""" -Metadata for a repository membership for org.restore_member actions -""" -type OrgRestoreMemberMembershipRepositoryAuditEntryData implements RepositoryAuditEntryData { - """ - The repository associated with the action - """ - repository: Repository - - """ - The name of the repository - """ - repositoryName: String - - """ - The HTTP path for the repository - """ - repositoryResourcePath: URI - - """ - The HTTP URL for the repository - """ - repositoryUrl: URI -} - -""" -Metadata for a team membership for org.restore_member actions -""" -type OrgRestoreMemberMembershipTeamAuditEntryData implements TeamAuditEntryData { - """ - The team associated with the action - """ - team: Team - - """ - The name of the team - """ - teamName: String - - """ - The HTTP path for this team - """ - teamResourcePath: URI - - """ - The HTTP URL for this team - """ - teamUrl: URI -} - -""" -Audit log entry for a org.unblock_user -""" -type OrgUnblockUserAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The user being unblocked by the organization. - """ - blockedUser: User - - """ - The username of the blocked user. - """ - blockedUserName: String - - """ - The HTTP path for the blocked user. - """ - blockedUserResourcePath: URI - - """ - The HTTP URL for the blocked user. - """ - blockedUserUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a org.update_default_repository_permission -""" -type OrgUpdateDefaultRepositoryPermissionAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The new default repository permission level for the organization. - """ - permission: OrgUpdateDefaultRepositoryPermissionAuditEntryPermission - - """ - The former default repository permission level for the organization. - """ - permissionWas: OrgUpdateDefaultRepositoryPermissionAuditEntryPermission - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -The default permission a repository can have in an Organization. -""" -enum OrgUpdateDefaultRepositoryPermissionAuditEntryPermission { - """ - Can read, clone, push, and add collaborators to repositories. - """ - ADMIN - - """ - No default permission value. - """ - NONE - - """ - Can read and clone repositories. - """ - READ - - """ - Can read, clone and push to repositories. - """ - WRITE -} - -""" -Audit log entry for a org.update_member event. -""" -type OrgUpdateMemberAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The new member permission level for the organization. - """ - permission: OrgUpdateMemberAuditEntryPermission - - """ - The former member permission level for the organization. - """ - permissionWas: OrgUpdateMemberAuditEntryPermission - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -The permissions available to members on an Organization. -""" -enum OrgUpdateMemberAuditEntryPermission { - """ - Can read, clone, push, and add collaborators to repositories. - """ - ADMIN - - """ - Can read and clone repositories. - """ - READ -} - -""" -Audit log entry for a org.update_member_repository_creation_permission event. -""" -type OrgUpdateMemberRepositoryCreationPermissionAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - Can members create repositories in the organization. - """ - canCreateRepositories: Boolean - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI - - """ - The permission for visibility level of repositories for this organization. - """ - visibility: OrgUpdateMemberRepositoryCreationPermissionAuditEntryVisibility -} - -""" -The permissions available for repository creation on an Organization. -""" -enum OrgUpdateMemberRepositoryCreationPermissionAuditEntryVisibility { - """ - All organization members are restricted from creating any repositories. - """ - ALL - - """ - All organization members are restricted from creating internal repositories. - """ - INTERNAL - - """ - All organization members are allowed to create any repositories. - """ - NONE - - """ - All organization members are restricted from creating private repositories. - """ - PRIVATE - - """ - All organization members are restricted from creating private or internal repositories. - """ - PRIVATE_INTERNAL - - """ - All organization members are restricted from creating public repositories. - """ - PUBLIC - - """ - All organization members are restricted from creating public or internal repositories. - """ - PUBLIC_INTERNAL - - """ - All organization members are restricted from creating public or private repositories. - """ - PUBLIC_PRIVATE -} - -""" -Audit log entry for a org.update_member_repository_invitation_permission event. -""" -type OrgUpdateMemberRepositoryInvitationPermissionAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - Can outside collaborators be invited to repositories in the organization. - """ - canInviteOutsideCollaboratorsToRepositories: Boolean - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -An account on GitHub, with one or more owners, that has repositories, members and teams. -""" -type Organization implements Actor & MemberStatusable & Node & PackageOwner & ProfileOwner & ProjectOwner & RepositoryOwner & Sponsorable & UniformResourceLocatable { - """ - Determine if this repository owner has any items that can be pinned to their profile. - """ - anyPinnableItems( - """ - Filter to only a particular kind of pinnable item. - """ - type: PinnableItemType - ): Boolean! - - """ - Audit log entries of the organization - """ - auditLog( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for the returned audit log entries. - """ - orderBy: AuditLogOrder = {field: CREATED_AT, direction: DESC} - - """ - The query string to filter audit entries - """ - query: String - ): OrganizationAuditEntryConnection! - - """ - A URL pointing to the organization's public avatar. - """ - avatarUrl( - """ - The size of the resulting square image. - """ - size: Int - ): URI! - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - - """ - The organization's public profile description. - """ - description: String - - """ - The organization's public profile description rendered to HTML. - """ - descriptionHTML: String - - """ - A list of domains owned by the organization. - """ - domains( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Filter by if the domain is verified. - """ - isVerified: Boolean = null - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for verifiable domains returned. - """ - orderBy: VerifiableDomainOrder = {field: DOMAIN, direction: ASC} - ): VerifiableDomainConnection - - """ - The organization's public email. - """ - email: String - - """ - True if this user/organization has a GitHub Sponsors listing. - """ - hasSponsorsListing: Boolean! - id: ID! - - """ - The interaction ability settings for this organization. - """ - interactionAbility: RepositoryInteractionAbility - - """ - The setting value for whether the organization has an IP allow list enabled. - """ - ipAllowListEnabledSetting: IpAllowListEnabledSettingValue! - - """ - The IP addresses that are allowed to access resources owned by the organization. - """ - ipAllowListEntries( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for IP allow list entries returned. - """ - orderBy: IpAllowListEntryOrder = {field: ALLOW_LIST_VALUE, direction: ASC} - ): IpAllowListEntryConnection! - - """ - Check if the given account is sponsoring this user/organization. - """ - isSponsoredBy( - """ - The target account's login. - """ - accountLogin: String! - ): Boolean! - - """ - True if the viewer is sponsored by this user/organization. - """ - isSponsoringViewer: Boolean! - - """ - Whether the organization has verified its profile email and website. - """ - isVerified: Boolean! - - """ - Showcases a selection of repositories and gists that the profile owner has - either curated or that have been selected automatically based on popularity. - """ - itemShowcase: ProfileItemShowcase! - - """ - The organization's public profile location. - """ - location: String - - """ - The organization's login name. - """ - login: String! - - """ - Get the status messages members of this entity have set that are either public or visible only to the organization. - """ - memberStatuses( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for user statuses returned from the connection. - """ - orderBy: UserStatusOrder = {field: UPDATED_AT, direction: DESC} - ): UserStatusConnection! - - """ - A list of users who are members of this organization. - """ - membersWithRole( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): OrganizationMemberConnection! - - """ - The organization's public profile name. - """ - name: String - - """ - The HTTP path creating a new team - """ - newTeamResourcePath: URI! - - """ - The HTTP URL creating a new team - """ - newTeamUrl: URI! - - """ - Indicates if email notification delivery for this organization is restricted to verified domains. - """ - notificationDeliveryRestrictionEnabledSetting: NotificationRestrictionSettingValue! - - """ - The billing email for the organization. - """ - organizationBillingEmail: String - - """ - A list of packages under the owner. - """ - packages( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Find packages by their names. - """ - names: [String] - - """ - Ordering of the returned packages. - """ - orderBy: PackageOrder = {field: CREATED_AT, direction: DESC} - - """ - Filter registry package by type. - """ - packageType: PackageType - - """ - Find packages in a repository by ID. - """ - repositoryId: ID - ): PackageConnection! - - """ - A list of users who have been invited to join this organization. - """ - pendingMembers( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): UserConnection! - - """ - A list of repositories and gists this profile owner can pin to their profile. - """ - pinnableItems( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Filter the types of pinnable items that are returned. - """ - types: [PinnableItemType!] - ): PinnableItemConnection! - - """ - A list of repositories and gists this profile owner has pinned to their profile - """ - pinnedItems( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Filter the types of pinned items that are returned. - """ - types: [PinnableItemType!] - ): PinnableItemConnection! - - """ - Returns how many more items this profile owner can pin to their profile. - """ - pinnedItemsRemaining: Int! - - """ - Find project by number. - """ - project( - """ - The project number to find. - """ - number: Int! - ): Project - - """ - A list of projects under the owner. - """ - projects( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for projects returned from the connection - """ - orderBy: ProjectOrder - - """ - Query to search projects by, currently only searching by name. - """ - search: String - - """ - A list of states to filter the projects by. - """ - states: [ProjectState!] - ): ProjectConnection! - - """ - The HTTP path listing organization's projects - """ - projectsResourcePath: URI! - - """ - The HTTP URL listing organization's projects - """ - projectsUrl: URI! - - """ - A list of repositories that the user owns. - """ - repositories( - """ - Array of viewer's affiliation options for repositories returned from the - connection. For example, OWNER will include only repositories that the - current viewer owns. - """ - affiliations: [RepositoryAffiliation] - - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - If non-null, filters repositories according to whether they are forks of another repository - """ - isFork: Boolean - - """ - If non-null, filters repositories according to whether they have been locked - """ - isLocked: Boolean - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for repositories returned from the connection - """ - orderBy: RepositoryOrder - - """ - Array of owner's affiliation options for repositories returned from the - connection. For example, OWNER will include only repositories that the - organization or user being viewed owns. - """ - ownerAffiliations: [RepositoryAffiliation] = [OWNER, COLLABORATOR] - - """ - If non-null, filters repositories according to privacy - """ - privacy: RepositoryPrivacy - ): RepositoryConnection! - - """ - Find Repository. - """ - repository( - """ - Name of Repository to find. - """ - name: String! - ): Repository - - """ - When true the organization requires all members, billing managers, and outside - collaborators to enable two-factor authentication. - """ - requiresTwoFactorAuthentication: Boolean - - """ - The HTTP path for this organization. - """ - resourcePath: URI! - - """ - The Organization's SAML identity providers - """ - samlIdentityProvider: OrganizationIdentityProvider - - """ - The GitHub Sponsors listing for this user or organization. - """ - sponsorsListing: SponsorsListing - - """ - The viewer's sponsorship of this entity. - """ - sponsorshipForViewerAsSponsor: Sponsorship - - """ - This object's sponsorships as the maintainer. - """ - sponsorshipsAsMaintainer( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Whether or not to include private sponsorships in the result set - """ - includePrivate: Boolean = false - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for sponsorships returned from this connection. If left - blank, the sponsorships will be ordered based on relevancy to the viewer. - """ - orderBy: SponsorshipOrder - ): SponsorshipConnection! - - """ - This object's sponsorships as the sponsor. - """ - sponsorshipsAsSponsor( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for sponsorships returned from this connection. If left - blank, the sponsorships will be ordered based on relevancy to the viewer. - """ - orderBy: SponsorshipOrder - ): SponsorshipConnection! - - """ - Find an organization's team by its slug. - """ - team( - """ - The name or slug of the team to find. - """ - slug: String! - ): Team - - """ - A list of teams in this organization. - """ - teams( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - If true, filters teams that are mapped to an LDAP Group (Enterprise only) - """ - ldapMapped: Boolean - - """ - Ordering options for teams returned from the connection - """ - orderBy: TeamOrder - - """ - If non-null, filters teams according to privacy - """ - privacy: TeamPrivacy - - """ - If non-null, filters teams with query on team name and team slug - """ - query: String - - """ - If non-null, filters teams according to whether the viewer is an admin or member on team - """ - role: TeamRole - - """ - If true, restrict to only root teams - """ - rootTeamsOnly: Boolean = false - - """ - User logins to filter by - """ - userLogins: [String!] - ): TeamConnection! - - """ - The HTTP path listing organization's teams - """ - teamsResourcePath: URI! - - """ - The HTTP URL listing organization's teams - """ - teamsUrl: URI! - - """ - The organization's Twitter username. - """ - twitterUsername: String - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! - - """ - The HTTP URL for this organization. - """ - url: URI! - - """ - Organization is adminable by the viewer. - """ - viewerCanAdminister: Boolean! - - """ - Can the viewer pin repositories and gists to the profile? - """ - viewerCanChangePinnedItems: Boolean! - - """ - Can the current viewer create new projects on this owner. - """ - viewerCanCreateProjects: Boolean! - - """ - Viewer can create repositories on this organization - """ - viewerCanCreateRepositories: Boolean! - - """ - Viewer can create teams on this organization. - """ - viewerCanCreateTeams: Boolean! - - """ - Whether or not the viewer is able to sponsor this user/organization. - """ - viewerCanSponsor: Boolean! - - """ - Viewer is an active member of this organization. - """ - viewerIsAMember: Boolean! - - """ - True if the viewer is sponsoring this user/organization. - """ - viewerIsSponsoring: Boolean! - - """ - The organization's public profile URL. - """ - websiteUrl: URI -} - -""" -An audit entry in an organization audit log. -""" -union OrganizationAuditEntry = MembersCanDeleteReposClearAuditEntry | MembersCanDeleteReposDisableAuditEntry | MembersCanDeleteReposEnableAuditEntry | OauthApplicationCreateAuditEntry | OrgAddBillingManagerAuditEntry | OrgAddMemberAuditEntry | OrgBlockUserAuditEntry | OrgConfigDisableCollaboratorsOnlyAuditEntry | OrgConfigEnableCollaboratorsOnlyAuditEntry | OrgCreateAuditEntry | OrgDisableOauthAppRestrictionsAuditEntry | OrgDisableSamlAuditEntry | OrgDisableTwoFactorRequirementAuditEntry | OrgEnableOauthAppRestrictionsAuditEntry | OrgEnableSamlAuditEntry | OrgEnableTwoFactorRequirementAuditEntry | OrgInviteMemberAuditEntry | OrgInviteToBusinessAuditEntry | OrgOauthAppAccessApprovedAuditEntry | OrgOauthAppAccessDeniedAuditEntry | OrgOauthAppAccessRequestedAuditEntry | OrgRemoveBillingManagerAuditEntry | OrgRemoveMemberAuditEntry | OrgRemoveOutsideCollaboratorAuditEntry | OrgRestoreMemberAuditEntry | OrgUnblockUserAuditEntry | OrgUpdateDefaultRepositoryPermissionAuditEntry | OrgUpdateMemberAuditEntry | OrgUpdateMemberRepositoryCreationPermissionAuditEntry | OrgUpdateMemberRepositoryInvitationPermissionAuditEntry | PrivateRepositoryForkingDisableAuditEntry | PrivateRepositoryForkingEnableAuditEntry | RepoAccessAuditEntry | RepoAddMemberAuditEntry | RepoAddTopicAuditEntry | RepoArchivedAuditEntry | RepoChangeMergeSettingAuditEntry | RepoConfigDisableAnonymousGitAccessAuditEntry | RepoConfigDisableCollaboratorsOnlyAuditEntry | RepoConfigDisableContributorsOnlyAuditEntry | RepoConfigDisableSockpuppetDisallowedAuditEntry | RepoConfigEnableAnonymousGitAccessAuditEntry | RepoConfigEnableCollaboratorsOnlyAuditEntry | RepoConfigEnableContributorsOnlyAuditEntry | RepoConfigEnableSockpuppetDisallowedAuditEntry | RepoConfigLockAnonymousGitAccessAuditEntry | RepoConfigUnlockAnonymousGitAccessAuditEntry | RepoCreateAuditEntry | RepoDestroyAuditEntry | RepoRemoveMemberAuditEntry | RepoRemoveTopicAuditEntry | RepositoryVisibilityChangeDisableAuditEntry | RepositoryVisibilityChangeEnableAuditEntry | TeamAddMemberAuditEntry | TeamAddRepositoryAuditEntry | TeamChangeParentTeamAuditEntry | TeamRemoveMemberAuditEntry | TeamRemoveRepositoryAuditEntry - -""" -The connection type for OrganizationAuditEntry. -""" -type OrganizationAuditEntryConnection { - """ - A list of edges. - """ - edges: [OrganizationAuditEntryEdge] - - """ - A list of nodes. - """ - nodes: [OrganizationAuditEntry] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -Metadata for an audit entry with action org.* -""" -interface OrganizationAuditEntryData { - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI -} - -""" -An edge in a connection. -""" -type OrganizationAuditEntryEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: OrganizationAuditEntry -} - -""" -The connection type for Organization. -""" -type OrganizationConnection { - """ - A list of edges. - """ - edges: [OrganizationEdge] - - """ - A list of nodes. - """ - nodes: [Organization] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type OrganizationEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: Organization -} - -""" -An Identity Provider configured to provision SAML and SCIM identities for Organizations -""" -type OrganizationIdentityProvider implements Node { - """ - The digest algorithm used to sign SAML requests for the Identity Provider. - """ - digestMethod: URI - - """ - External Identities provisioned by this Identity Provider - """ - externalIdentities( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): ExternalIdentityConnection! - id: ID! - - """ - The x509 certificate used by the Identity Provider to sign assertions and responses. - """ - idpCertificate: X509Certificate - - """ - The Issuer Entity ID for the SAML Identity Provider - """ - issuer: String - - """ - Organization this Identity Provider belongs to - """ - organization: Organization - - """ - The signature algorithm used to sign SAML requests for the Identity Provider. - """ - signatureMethod: URI - - """ - The URL endpoint for the Identity Provider's SAML SSO. - """ - ssoUrl: URI -} - -""" -An Invitation for a user to an organization. -""" -type OrganizationInvitation implements Node { - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - The email address of the user invited to the organization. - """ - email: String - id: ID! - - """ - The type of invitation that was sent (e.g. email, user). - """ - invitationType: OrganizationInvitationType! - - """ - The user who was invited to the organization. - """ - invitee: User - - """ - The user who created the invitation. - """ - inviter: User! - - """ - The organization the invite is for - """ - organization: Organization! - - """ - The user's pending role in the organization (e.g. member, owner). - """ - role: OrganizationInvitationRole! -} - -""" -The connection type for OrganizationInvitation. -""" -type OrganizationInvitationConnection { - """ - A list of edges. - """ - edges: [OrganizationInvitationEdge] - - """ - A list of nodes. - """ - nodes: [OrganizationInvitation] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type OrganizationInvitationEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: OrganizationInvitation -} - -""" -The possible organization invitation roles. -""" -enum OrganizationInvitationRole { - """ - The user is invited to be an admin of the organization. - """ - ADMIN - - """ - The user is invited to be a billing manager of the organization. - """ - BILLING_MANAGER - - """ - The user is invited to be a direct member of the organization. - """ - DIRECT_MEMBER - - """ - The user's previous role will be reinstated. - """ - REINSTATE -} - -""" -The possible organization invitation types. -""" -enum OrganizationInvitationType { - """ - The invitation was to an email address. - """ - EMAIL - - """ - The invitation was to an existing user. - """ - USER -} - -""" -The connection type for User. -""" -type OrganizationMemberConnection { - """ - A list of edges. - """ - edges: [OrganizationMemberEdge] - - """ - A list of nodes. - """ - nodes: [User] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -Represents a user within an organization. -""" -type OrganizationMemberEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - Whether the organization member has two factor enabled or not. Returns null if information is not available to viewer. - """ - hasTwoFactorEnabled: Boolean - - """ - The item at the end of the edge. - """ - node: User - - """ - The role this user has in the organization. - """ - role: OrganizationMemberRole -} - -""" -The possible roles within an organization for its members. -""" -enum OrganizationMemberRole { - """ - The user is an administrator of the organization. - """ - ADMIN - - """ - The user is a member of the organization. - """ - MEMBER -} - -""" -The possible values for the members can create repositories setting on an organization. -""" -enum OrganizationMembersCanCreateRepositoriesSettingValue { - """ - Members will be able to create public and private repositories. - """ - ALL - - """ - Members will not be able to create public or private repositories. - """ - DISABLED - - """ - Members will be able to create only private repositories. - """ - PRIVATE -} - -""" -Ordering options for organization connections. -""" -input OrganizationOrder { - """ - The ordering direction. - """ - direction: OrderDirection! - - """ - The field to order organizations by. - """ - field: OrganizationOrderField! -} - -""" -Properties by which organization connections can be ordered. -""" -enum OrganizationOrderField { - """ - Order organizations by creation time - """ - CREATED_AT - - """ - Order organizations by login - """ - LOGIN -} - -""" -An organization teams hovercard context -""" -type OrganizationTeamsHovercardContext implements HovercardContext { - """ - A string describing this context - """ - message: String! - - """ - An octicon to accompany this context - """ - octicon: String! - - """ - Teams in this organization the user is a member of that are relevant - """ - relevantTeams( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): TeamConnection! - - """ - The path for the full team list for this user - """ - teamsResourcePath: URI! - - """ - The URL for the full team list for this user - """ - teamsUrl: URI! - - """ - The total number of teams the user is on in the organization - """ - totalTeamCount: Int! -} - -""" -An organization list hovercard context -""" -type OrganizationsHovercardContext implements HovercardContext { - """ - A string describing this context - """ - message: String! - - """ - An octicon to accompany this context - """ - octicon: String! - - """ - Organizations this user is a member of that are relevant - """ - relevantOrganizations( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): OrganizationConnection! - - """ - The total number of organizations this user is in - """ - totalOrganizationCount: Int! -} - -""" -Information for an uploaded package. -""" -type Package implements Node { - id: ID! - - """ - Find the latest version for the package. - """ - latestVersion: PackageVersion - - """ - Identifies the name of the package. - """ - name: String! - - """ - Identifies the type of the package. - """ - packageType: PackageType! - - """ - The repository this package belongs to. - """ - repository: Repository - - """ - Statistics about package activity. - """ - statistics: PackageStatistics - - """ - Find package version by version string. - """ - version( - """ - The package version. - """ - version: String! - ): PackageVersion - - """ - list of versions for this package - """ - versions( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering of the returned packages. - """ - orderBy: PackageVersionOrder = {field: CREATED_AT, direction: DESC} - ): PackageVersionConnection! -} - -""" -The connection type for Package. -""" -type PackageConnection { - """ - A list of edges. - """ - edges: [PackageEdge] - - """ - A list of nodes. - """ - nodes: [Package] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type PackageEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: Package -} - -""" -A file in a package version. -""" -type PackageFile implements Node { - id: ID! - - """ - MD5 hash of the file. - """ - md5: String - - """ - Name of the file. - """ - name: String! - - """ - The package version this file belongs to. - """ - packageVersion: PackageVersion - - """ - SHA1 hash of the file. - """ - sha1: String - - """ - SHA256 hash of the file. - """ - sha256: String - - """ - Size of the file in bytes. - """ - size: Int - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! - - """ - URL to download the asset. - """ - url: URI -} - -""" -The connection type for PackageFile. -""" -type PackageFileConnection { - """ - A list of edges. - """ - edges: [PackageFileEdge] - - """ - A list of nodes. - """ - nodes: [PackageFile] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type PackageFileEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: PackageFile -} - -""" -Ways in which lists of package files can be ordered upon return. -""" -input PackageFileOrder { - """ - The direction in which to order package files by the specified field. - """ - direction: OrderDirection - - """ - The field in which to order package files by. - """ - field: PackageFileOrderField -} - -""" -Properties by which package file connections can be ordered. -""" -enum PackageFileOrderField { - """ - Order package files by creation time - """ - CREATED_AT -} - -""" -Ways in which lists of packages can be ordered upon return. -""" -input PackageOrder { - """ - The direction in which to order packages by the specified field. - """ - direction: OrderDirection - - """ - The field in which to order packages by. - """ - field: PackageOrderField -} - -""" -Properties by which package connections can be ordered. -""" -enum PackageOrderField { - """ - Order packages by creation time - """ - CREATED_AT -} - -""" -Represents an owner of a package. -""" -interface PackageOwner { - id: ID! - - """ - A list of packages under the owner. - """ - packages( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Find packages by their names. - """ - names: [String] - - """ - Ordering of the returned packages. - """ - orderBy: PackageOrder = {field: CREATED_AT, direction: DESC} - - """ - Filter registry package by type. - """ - packageType: PackageType - - """ - Find packages in a repository by ID. - """ - repositoryId: ID - ): PackageConnection! -} - -""" -Represents a object that contains package activity statistics such as downloads. -""" -type PackageStatistics { - """ - Number of times the package was downloaded since it was created. - """ - downloadsTotalCount: Int! -} - -""" -A version tag contains the mapping between a tag name and a version. -""" -type PackageTag implements Node { - id: ID! - - """ - Identifies the tag name of the version. - """ - name: String! - - """ - Version that the tag is associated with. - """ - version: PackageVersion -} - -""" -The possible types of a package. -""" -enum PackageType { - """ - A debian package. - """ - DEBIAN - - """ - A docker image. - """ - DOCKER - - """ - A maven package. - """ - MAVEN - - """ - An npm package. - """ - NPM - - """ - A nuget package. - """ - NUGET - - """ - A python package. - """ - PYPI - - """ - A rubygems package. - """ - RUBYGEMS -} - -""" -Information about a specific package version. -""" -type PackageVersion implements Node { - """ - List of files associated with this package version - """ - files( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering of the returned package files. - """ - orderBy: PackageFileOrder = {field: CREATED_AT, direction: ASC} - ): PackageFileConnection! - id: ID! - - """ - The package associated with this version. - """ - package: Package - - """ - The platform this version was built for. - """ - platform: String - - """ - Whether or not this version is a pre-release. - """ - preRelease: Boolean! - - """ - The README of this package version. - """ - readme: String - - """ - The release associated with this package version. - """ - release: Release - - """ - Statistics about package activity. - """ - statistics: PackageVersionStatistics - - """ - The package version summary. - """ - summary: String - - """ - The version string. - """ - version: String! -} - -""" -The connection type for PackageVersion. -""" -type PackageVersionConnection { - """ - A list of edges. - """ - edges: [PackageVersionEdge] - - """ - A list of nodes. - """ - nodes: [PackageVersion] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type PackageVersionEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: PackageVersion -} - -""" -Ways in which lists of package versions can be ordered upon return. -""" -input PackageVersionOrder { - """ - The direction in which to order package versions by the specified field. - """ - direction: OrderDirection - - """ - The field in which to order package versions by. - """ - field: PackageVersionOrderField -} - -""" -Properties by which package version connections can be ordered. -""" -enum PackageVersionOrderField { - """ - Order package versions by creation time - """ - CREATED_AT -} - -""" -Represents a object that contains package version activity statistics such as downloads. -""" -type PackageVersionStatistics { - """ - Number of times the package was downloaded since it was created. - """ - downloadsTotalCount: Int! -} - -""" -Information about pagination in a connection. -""" -type PageInfo { - """ - When paginating forwards, the cursor to continue. - """ - endCursor: String - - """ - When paginating forwards, are there more items? - """ - hasNextPage: Boolean! - - """ - When paginating backwards, are there more items? - """ - hasPreviousPage: Boolean! - - """ - When paginating backwards, the cursor to continue. - """ - startCursor: String -} - -""" -Types that can grant permissions on a repository to a user -""" -union PermissionGranter = Organization | Repository | Team - -""" -A level of permission and source for a user's access to a repository. -""" -type PermissionSource { - """ - The organization the repository belongs to. - """ - organization: Organization! - - """ - The level of access this source has granted to the user. - """ - permission: DefaultRepositoryPermissionField! - - """ - The source of this permission. - """ - source: PermissionGranter! -} - -""" -Autogenerated input type of PinIssue -""" -input PinIssueInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the issue to be pinned - """ - issueId: ID! @possibleTypes(concreteTypes: ["Issue"]) -} - -""" -Autogenerated return type of PinIssue -""" -type PinIssuePayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The issue that was pinned - """ - issue: Issue -} - -""" -Types that can be pinned to a profile page. -""" -union PinnableItem = Gist | Repository - -""" -The connection type for PinnableItem. -""" -type PinnableItemConnection { - """ - A list of edges. - """ - edges: [PinnableItemEdge] - - """ - A list of nodes. - """ - nodes: [PinnableItem] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type PinnableItemEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: PinnableItem -} - -""" -Represents items that can be pinned to a profile page or dashboard. -""" -enum PinnableItemType { - """ - A gist. - """ - GIST - - """ - An issue. - """ - ISSUE - - """ - An organization. - """ - ORGANIZATION - - """ - A project. - """ - PROJECT - - """ - A pull request. - """ - PULL_REQUEST - - """ - A repository. - """ - REPOSITORY - - """ - A team. - """ - TEAM - - """ - A user. - """ - USER -} - -""" -Represents a 'pinned' event on a given issue or pull request. -""" -type PinnedEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! - - """ - Identifies the issue associated with the event. - """ - issue: Issue! -} - -""" -A Pinned Issue is a issue pinned to a repository's index page. -""" -type PinnedIssue implements Node { - """ - Identifies the primary key from the database. - """ - databaseId: Int - id: ID! - - """ - The issue that was pinned. - """ - issue: Issue! - - """ - The actor that pinned this issue. - """ - pinnedBy: Actor! - - """ - The repository that this issue was pinned to. - """ - repository: Repository! -} - -""" -The connection type for PinnedIssue. -""" -type PinnedIssueConnection { - """ - A list of edges. - """ - edges: [PinnedIssueEdge] - - """ - A list of nodes. - """ - nodes: [PinnedIssue] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type PinnedIssueEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: PinnedIssue -} - -""" -An ISO-8601 encoded UTC date string with millisecond precision. -""" -scalar PreciseDateTime - -""" -Audit log entry for a private_repository_forking.disable event. -""" -type PrivateRepositoryForkingDisableAuditEntry implements AuditEntry & EnterpriseAuditEntryData & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - - """ - The HTTP path for this enterprise. - """ - enterpriseResourcePath: URI - - """ - The slug of the enterprise. - """ - enterpriseSlug: String - - """ - The HTTP URL for this enterprise. - """ - enterpriseUrl: URI - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The repository associated with the action - """ - repository: Repository - - """ - The name of the repository - """ - repositoryName: String - - """ - The HTTP path for the repository - """ - repositoryResourcePath: URI - - """ - The HTTP URL for the repository - """ - repositoryUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a private_repository_forking.enable event. -""" -type PrivateRepositoryForkingEnableAuditEntry implements AuditEntry & EnterpriseAuditEntryData & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - - """ - The HTTP path for this enterprise. - """ - enterpriseResourcePath: URI - - """ - The slug of the enterprise. - """ - enterpriseSlug: String - - """ - The HTTP URL for this enterprise. - """ - enterpriseUrl: URI - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The repository associated with the action - """ - repository: Repository - - """ - The name of the repository - """ - repositoryName: String - - """ - The HTTP path for the repository - """ - repositoryResourcePath: URI - - """ - The HTTP URL for the repository - """ - repositoryUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -A curatable list of repositories relating to a repository owner, which defaults -to showing the most popular repositories they own. -""" -type ProfileItemShowcase { - """ - Whether or not the owner has pinned any repositories or gists. - """ - hasPinnedItems: Boolean! - - """ - The repositories and gists in the showcase. If the profile owner has any - pinned items, those will be returned. Otherwise, the profile owner's popular - repositories will be returned. - """ - items( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): PinnableItemConnection! -} - -""" -Represents any entity on GitHub that has a profile page. -""" -interface ProfileOwner { - """ - Determine if this repository owner has any items that can be pinned to their profile. - """ - anyPinnableItems( - """ - Filter to only a particular kind of pinnable item. - """ - type: PinnableItemType - ): Boolean! - - """ - The public profile email. - """ - email: String - id: ID! - - """ - Showcases a selection of repositories and gists that the profile owner has - either curated or that have been selected automatically based on popularity. - """ - itemShowcase: ProfileItemShowcase! - - """ - The public profile location. - """ - location: String - - """ - The username used to login. - """ - login: String! - - """ - The public profile name. - """ - name: String - - """ - A list of repositories and gists this profile owner can pin to their profile. - """ - pinnableItems( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Filter the types of pinnable items that are returned. - """ - types: [PinnableItemType!] - ): PinnableItemConnection! - - """ - A list of repositories and gists this profile owner has pinned to their profile - """ - pinnedItems( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Filter the types of pinned items that are returned. - """ - types: [PinnableItemType!] - ): PinnableItemConnection! - - """ - Returns how many more items this profile owner can pin to their profile. - """ - pinnedItemsRemaining: Int! - - """ - Can the viewer pin repositories and gists to the profile? - """ - viewerCanChangePinnedItems: Boolean! - - """ - The public profile website URL. - """ - websiteUrl: URI -} - -""" -Projects manage issues, pull requests and notes within a project owner. -""" -type Project implements Closable & Node & Updatable { - """ - The project's description body. - """ - body: String - - """ - The projects description body rendered to HTML. - """ - bodyHTML: HTML! - - """ - `true` if the object is closed (definition of closed may depend on type) - """ - closed: Boolean! - - """ - Identifies the date and time when the object was closed. - """ - closedAt: DateTime - - """ - List of columns in the project - """ - columns( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): ProjectColumnConnection! - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - The actor who originally created the project. - """ - creator: Actor - - """ - Identifies the primary key from the database. - """ - databaseId: Int - id: ID! - - """ - The project's name. - """ - name: String! - - """ - The project's number. - """ - number: Int! - - """ - The project's owner. Currently limited to repositories, organizations, and users. - """ - owner: ProjectOwner! - - """ - List of pending cards in this project - """ - pendingCards( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - A list of archived states to filter the cards by - """ - archivedStates: [ProjectCardArchivedState] = [ARCHIVED, NOT_ARCHIVED] - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): ProjectCardConnection! - - """ - Project progress details. - """ - progress: ProjectProgress! - - """ - The HTTP path for this project - """ - resourcePath: URI! - - """ - Whether the project is open or closed. - """ - state: ProjectState! - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! - - """ - The HTTP URL for this project - """ - url: URI! - - """ - Check if the current viewer can update this object. - """ - viewerCanUpdate: Boolean! -} - -""" -A card in a project. -""" -type ProjectCard implements Node { - """ - The project column this card is associated under. A card may only belong to one - project column at a time. The column field will be null if the card is created - in a pending state and has yet to be associated with a column. Once cards are - associated with a column, they will not become pending in the future. - """ - column: ProjectColumn - - """ - The card content item - """ - content: ProjectCardItem - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - The actor who created this card - """ - creator: Actor - - """ - Identifies the primary key from the database. - """ - databaseId: Int - id: ID! - - """ - Whether the card is archived - """ - isArchived: Boolean! - - """ - The card note - """ - note: String - - """ - The project that contains this card. - """ - project: Project! - - """ - The HTTP path for this card - """ - resourcePath: URI! - - """ - The state of ProjectCard - """ - state: ProjectCardState - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! - - """ - The HTTP URL for this card - """ - url: URI! -} - -""" -The possible archived states of a project card. -""" -enum ProjectCardArchivedState { - """ - A project card that is archived - """ - ARCHIVED - - """ - A project card that is not archived - """ - NOT_ARCHIVED -} - -""" -The connection type for ProjectCard. -""" -type ProjectCardConnection { - """ - A list of edges. - """ - edges: [ProjectCardEdge] - - """ - A list of nodes. - """ - nodes: [ProjectCard] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type ProjectCardEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: ProjectCard -} - -""" -An issue or PR and its owning repository to be used in a project card. -""" -input ProjectCardImport { - """ - The issue or pull request number. - """ - number: Int! - - """ - Repository name with owner (owner/repository). - """ - repository: String! -} - -""" -Types that can be inside Project Cards. -""" -union ProjectCardItem = Issue | PullRequest - -""" -Various content states of a ProjectCard -""" -enum ProjectCardState { - """ - The card has content only. - """ - CONTENT_ONLY - - """ - The card has a note only. - """ - NOTE_ONLY - - """ - The card is redacted. - """ - REDACTED -} - -""" -A column inside a project. -""" -type ProjectColumn implements Node { - """ - List of cards in the column - """ - cards( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - A list of archived states to filter the cards by - """ - archivedStates: [ProjectCardArchivedState] = [ARCHIVED, NOT_ARCHIVED] - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): ProjectCardConnection! - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - id: ID! - - """ - The project column's name. - """ - name: String! - - """ - The project that contains this column. - """ - project: Project! - - """ - The semantic purpose of the column - """ - purpose: ProjectColumnPurpose - - """ - The HTTP path for this project column - """ - resourcePath: URI! - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! - - """ - The HTTP URL for this project column - """ - url: URI! -} - -""" -The connection type for ProjectColumn. -""" -type ProjectColumnConnection { - """ - A list of edges. - """ - edges: [ProjectColumnEdge] - - """ - A list of nodes. - """ - nodes: [ProjectColumn] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type ProjectColumnEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: ProjectColumn -} - -""" -A project column and a list of its issues and PRs. -""" -input ProjectColumnImport { - """ - The name of the column. - """ - columnName: String! - - """ - A list of issues and pull requests in the column. - """ - issues: [ProjectCardImport!] - - """ - The position of the column, starting from 0. - """ - position: Int! -} - -""" -The semantic purpose of the column - todo, in progress, or done. -""" -enum ProjectColumnPurpose { - """ - The column contains cards which are complete - """ - DONE - - """ - The column contains cards which are currently being worked on - """ - IN_PROGRESS - - """ - The column contains cards still to be worked on - """ - TODO -} - -""" -A list of projects associated with the owner. -""" -type ProjectConnection { - """ - A list of edges. - """ - edges: [ProjectEdge] - - """ - A list of nodes. - """ - nodes: [Project] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type ProjectEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: Project -} - -""" -Ways in which lists of projects can be ordered upon return. -""" -input ProjectOrder { - """ - The direction in which to order projects by the specified field. - """ - direction: OrderDirection! - - """ - The field in which to order projects by. - """ - field: ProjectOrderField! -} - -""" -Properties by which project connections can be ordered. -""" -enum ProjectOrderField { - """ - Order projects by creation time - """ - CREATED_AT - - """ - Order projects by name - """ - NAME - - """ - Order projects by update time - """ - UPDATED_AT -} - -""" -Represents an owner of a Project. -""" -interface ProjectOwner { - id: ID! - - """ - Find project by number. - """ - project( - """ - The project number to find. - """ - number: Int! - ): Project - - """ - A list of projects under the owner. - """ - projects( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for projects returned from the connection - """ - orderBy: ProjectOrder - - """ - Query to search projects by, currently only searching by name. - """ - search: String - - """ - A list of states to filter the projects by. - """ - states: [ProjectState!] - ): ProjectConnection! - - """ - The HTTP path listing owners projects - """ - projectsResourcePath: URI! - - """ - The HTTP URL listing owners projects - """ - projectsUrl: URI! - - """ - Can the current viewer create new projects on this owner. - """ - viewerCanCreateProjects: Boolean! -} - -""" -Project progress stats. -""" -type ProjectProgress { - """ - The number of done cards. - """ - doneCount: Int! - - """ - The percentage of done cards. - """ - donePercentage: Float! - - """ - Whether progress tracking is enabled and cards with purpose exist for this project - """ - enabled: Boolean! - - """ - The number of in-progress cards. - """ - inProgressCount: Int! - - """ - The percentage of in-progress cards. - """ - inProgressPercentage: Float! - - """ - The number of to do cards. - """ - todoCount: Int! - - """ - The percentage of to do cards. - """ - todoPercentage: Float! -} - -""" -State of the project; either 'open' or 'closed' -""" -enum ProjectState { - """ - The project is closed. - """ - CLOSED - - """ - The project is open. - """ - OPEN -} - -""" -GitHub-provided templates for Projects -""" -enum ProjectTemplate { - """ - Create a board with v2 triggers to automatically move cards across To do, In progress and Done columns. - """ - AUTOMATED_KANBAN_V2 - - """ - Create a board with triggers to automatically move cards across columns with review automation. - """ - AUTOMATED_REVIEWS_KANBAN - - """ - Create a board with columns for To do, In progress and Done. - """ - BASIC_KANBAN - - """ - Create a board to triage and prioritize bugs with To do, priority, and Done columns. - """ - BUG_TRIAGE -} - -""" -A user's public key. -""" -type PublicKey implements Node { - """ - The last time this authorization was used to perform an action. Values will be null for keys not owned by the user. - """ - accessedAt: DateTime - - """ - Identifies the date and time when the key was created. Keys created before - March 5th, 2014 have inaccurate values. Values will be null for keys not owned by the user. - """ - createdAt: DateTime - - """ - The fingerprint for this PublicKey. - """ - fingerprint: String! - id: ID! - - """ - Whether this PublicKey is read-only or not. Values will be null for keys not owned by the user. - """ - isReadOnly: Boolean - - """ - The public key string. - """ - key: String! - - """ - Identifies the date and time when the key was updated. Keys created before - March 5th, 2014 may have inaccurate values. Values will be null for keys not - owned by the user. - """ - updatedAt: DateTime -} - -""" -The connection type for PublicKey. -""" -type PublicKeyConnection { - """ - A list of edges. - """ - edges: [PublicKeyEdge] - - """ - A list of nodes. - """ - nodes: [PublicKey] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type PublicKeyEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: PublicKey -} - -""" -A repository pull request. -""" -type PullRequest implements Assignable & Closable & Comment & Labelable & Lockable & Node & Reactable & RepositoryNode & Subscribable & UniformResourceLocatable & Updatable & UpdatableComment { - """ - Reason that the conversation was locked. - """ - activeLockReason: LockReason - - """ - The number of additions in this pull request. - """ - additions: Int! - - """ - A list of Users assigned to this object. - """ - assignees( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): UserConnection! - - """ - The actor who authored the comment. - """ - author: Actor - - """ - Author's association with the subject of the comment. - """ - authorAssociation: CommentAuthorAssociation! - - """ - Returns the auto-merge request object if one exists for this pull request. - """ - autoMergeRequest: AutoMergeRequest - - """ - Identifies the base Ref associated with the pull request. - """ - baseRef: Ref - - """ - Identifies the name of the base Ref associated with the pull request, even if the ref has been deleted. - """ - baseRefName: String! - - """ - Identifies the oid of the base ref associated with the pull request, even if the ref has been deleted. - """ - baseRefOid: GitObjectID! - - """ - The repository associated with this pull request's base Ref. - """ - baseRepository: Repository - - """ - The body as Markdown. - """ - body: String! - - """ - The body rendered to HTML. - """ - bodyHTML: HTML! - - """ - The body rendered to text. - """ - bodyText: String! - - """ - Whether or not the pull request is rebaseable. - """ - canBeRebased: Boolean! @preview(toggledBy: "merge-info-preview") - - """ - The number of changed files in this pull request. - """ - changedFiles: Int! - - """ - The HTTP path for the checks of this pull request. - """ - checksResourcePath: URI! - - """ - The HTTP URL for the checks of this pull request. - """ - checksUrl: URI! - - """ - `true` if the pull request is closed - """ - closed: Boolean! - - """ - Identifies the date and time when the object was closed. - """ - closedAt: DateTime - - """ - A list of comments associated with the pull request. - """ - comments( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for issue comments returned from the connection. - """ - orderBy: IssueCommentOrder - ): IssueCommentConnection! - - """ - A list of commits present in this pull request's head branch not present in the base branch. - """ - commits( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): PullRequestCommitConnection! - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Check if this comment was created via an email reply. - """ - createdViaEmail: Boolean! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - - """ - The number of deletions in this pull request. - """ - deletions: Int! - - """ - The actor who edited this pull request's body. - """ - editor: Actor - - """ - Lists the files changed within this pull request. - """ - files( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): PullRequestChangedFileConnection - - """ - Identifies the head Ref associated with the pull request. - """ - headRef: Ref - - """ - Identifies the name of the head Ref associated with the pull request, even if the ref has been deleted. - """ - headRefName: String! - - """ - Identifies the oid of the head ref associated with the pull request, even if the ref has been deleted. - """ - headRefOid: GitObjectID! - - """ - The repository associated with this pull request's head Ref. - """ - headRepository: Repository - - """ - The owner of the repository associated with this pull request's head Ref. - """ - headRepositoryOwner: RepositoryOwner - - """ - The hovercard information for this issue - """ - hovercard( - """ - Whether or not to include notification contexts - """ - includeNotificationContexts: Boolean = true - ): Hovercard! - id: ID! - - """ - Check if this comment was edited and includes an edit with the creation data - """ - includesCreatedEdit: Boolean! - - """ - The head and base repositories are different. - """ - isCrossRepository: Boolean! - - """ - Identifies if the pull request is a draft. - """ - isDraft: Boolean! - - """ - Is this pull request read by the viewer - """ - isReadByViewer: Boolean - - """ - A list of labels associated with the object. - """ - labels( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for labels returned from the connection. - """ - orderBy: LabelOrder = {field: CREATED_AT, direction: ASC} - ): LabelConnection - - """ - The moment the editor made the last edit - """ - lastEditedAt: DateTime - - """ - A list of latest reviews per user associated with the pull request. - """ - latestOpinionatedReviews( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Only return reviews from user who have write access to the repository - """ - writersOnly: Boolean = false - ): PullRequestReviewConnection - - """ - A list of latest reviews per user associated with the pull request that are not also pending review. - """ - latestReviews( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): PullRequestReviewConnection - - """ - `true` if the pull request is locked - """ - locked: Boolean! - - """ - Indicates whether maintainers can modify the pull request. - """ - maintainerCanModify: Boolean! - - """ - The commit that was created when this pull request was merged. - """ - mergeCommit: Commit - - """ - Detailed information about the current pull request merge state status. - """ - mergeStateStatus: MergeStateStatus! @preview(toggledBy: "merge-info-preview") - - """ - Whether or not the pull request can be merged based on the existence of merge conflicts. - """ - mergeable: MergeableState! - - """ - Whether or not the pull request was merged. - """ - merged: Boolean! - - """ - The date and time that the pull request was merged. - """ - mergedAt: DateTime - - """ - The actor who merged the pull request. - """ - mergedBy: Actor - - """ - Identifies the milestone associated with the pull request. - """ - milestone: Milestone - - """ - Identifies the pull request number. - """ - number: Int! - - """ - A list of Users that are participating in the Pull Request conversation. - """ - participants( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): UserConnection! - - """ - The permalink to the pull request. - """ - permalink: URI! - - """ - The commit that GitHub automatically generated to test if this pull request - could be merged. This field will not return a value if the pull request is - merged, or if the test merge commit is still being generated. See the - `mergeable` field for more details on the mergeability of the pull request. - """ - potentialMergeCommit: Commit - - """ - List of project cards associated with this pull request. - """ - projectCards( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - A list of archived states to filter the cards by - """ - archivedStates: [ProjectCardArchivedState] = [ARCHIVED, NOT_ARCHIVED] - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): ProjectCardConnection! - - """ - Identifies when the comment was published at. - """ - publishedAt: DateTime - - """ - A list of reactions grouped by content left on the subject. - """ - reactionGroups: [ReactionGroup!] - - """ - A list of Reactions left on the Issue. - """ - reactions( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Allows filtering Reactions by emoji. - """ - content: ReactionContent - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Allows specifying the order in which reactions are returned. - """ - orderBy: ReactionOrder - ): ReactionConnection! - - """ - The repository associated with this node. - """ - repository: Repository! - - """ - The HTTP path for this pull request. - """ - resourcePath: URI! - - """ - The HTTP path for reverting this pull request. - """ - revertResourcePath: URI! - - """ - The HTTP URL for reverting this pull request. - """ - revertUrl: URI! - - """ - The current status of this pull request with respect to code review. - """ - reviewDecision: PullRequestReviewDecision - - """ - A list of review requests associated with the pull request. - """ - reviewRequests( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): ReviewRequestConnection - - """ - The list of all review threads for this pull request. - """ - reviewThreads( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): PullRequestReviewThreadConnection! - - """ - A list of reviews associated with the pull request. - """ - reviews( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Filter by author of the review. - """ - author: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - A list of states to filter the reviews. - """ - states: [PullRequestReviewState!] - ): PullRequestReviewConnection - - """ - Identifies the state of the pull request. - """ - state: PullRequestState! - - """ - A list of reviewer suggestions based on commit history and past review comments. - """ - suggestedReviewers: [SuggestedReviewer]! - - """ - A list of events, comments, commits, etc. associated with the pull request. - """ - timeline( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Allows filtering timeline events by a `since` timestamp. - """ - since: DateTime - ): PullRequestTimelineConnection! @deprecated(reason: "`timeline` will be removed Use PullRequest.timelineItems instead. Removal on 2020-10-01 UTC.") - - """ - A list of events, comments, commits, etc. associated with the pull request. - """ - timelineItems( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Filter timeline items by type. - """ - itemTypes: [PullRequestTimelineItemsItemType!] - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Filter timeline items by a `since` timestamp. - """ - since: DateTime - - """ - Skips the first _n_ elements in the list. - """ - skip: Int - ): PullRequestTimelineItemsConnection! - - """ - Identifies the pull request title. - """ - title: String! - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! - - """ - The HTTP URL for this pull request. - """ - url: URI! - - """ - A list of edits to this content. - """ - userContentEdits( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): UserContentEditConnection - - """ - Whether or not the viewer can apply suggestion. - """ - viewerCanApplySuggestion: Boolean! - - """ - Check if the viewer can restore the deleted head ref. - """ - viewerCanDeleteHeadRef: Boolean! - - """ - Whether or not the viewer can disable auto-merge - """ - viewerCanDisableAutoMerge: Boolean! - - """ - Whether or not the viewer can enable auto-merge - """ - viewerCanEnableAutoMerge: Boolean! - - """ - Can user react to this subject - """ - viewerCanReact: Boolean! - - """ - Check if the viewer is able to change their subscription status for the repository. - """ - viewerCanSubscribe: Boolean! - - """ - Check if the current viewer can update this object. - """ - viewerCanUpdate: Boolean! - - """ - Reasons why the current viewer can not update this comment. - """ - viewerCannotUpdateReasons: [CommentCannotUpdateReason!]! - - """ - Did the viewer author this comment. - """ - viewerDidAuthor: Boolean! - - """ - The latest review given from the viewer. - """ - viewerLatestReview: PullRequestReview - - """ - The person who has requested the viewer for review on this pull request. - """ - viewerLatestReviewRequest: ReviewRequest - - """ - The merge body text for the viewer and method. - """ - viewerMergeBodyText( - """ - The merge method for the message. - """ - mergeType: PullRequestMergeMethod - ): String! - - """ - The merge headline text for the viewer and method. - """ - viewerMergeHeadlineText( - """ - The merge method for the message. - """ - mergeType: PullRequestMergeMethod - ): String! - - """ - Identifies if the viewer is watching, not watching, or ignoring the subscribable entity. - """ - viewerSubscription: SubscriptionState -} - -""" -A file changed in a pull request. -""" -type PullRequestChangedFile { - """ - The number of additions to the file. - """ - additions: Int! - - """ - The number of deletions to the file. - """ - deletions: Int! - - """ - The path of the file. - """ - path: String! - - """ - The state of the file for the viewer. - """ - viewerViewedState: FileViewedState! -} - -""" -The connection type for PullRequestChangedFile. -""" -type PullRequestChangedFileConnection { - """ - A list of edges. - """ - edges: [PullRequestChangedFileEdge] - - """ - A list of nodes. - """ - nodes: [PullRequestChangedFile] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type PullRequestChangedFileEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: PullRequestChangedFile -} - -""" -Represents a Git commit part of a pull request. -""" -type PullRequestCommit implements Node & UniformResourceLocatable { - """ - The Git commit object - """ - commit: Commit! - id: ID! - - """ - The pull request this commit belongs to - """ - pullRequest: PullRequest! - - """ - The HTTP path for this pull request commit - """ - resourcePath: URI! - - """ - The HTTP URL for this pull request commit - """ - url: URI! -} - -""" -Represents a commit comment thread part of a pull request. -""" -type PullRequestCommitCommentThread implements Node & RepositoryNode { - """ - The comments that exist in this thread. - """ - comments( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): CommitCommentConnection! - - """ - The commit the comments were made on. - """ - commit: Commit! - id: ID! - - """ - The file the comments were made on. - """ - path: String - - """ - The position in the diff for the commit that the comment was made on. - """ - position: Int - - """ - The pull request this commit comment thread belongs to - """ - pullRequest: PullRequest! - - """ - The repository associated with this node. - """ - repository: Repository! -} - -""" -The connection type for PullRequestCommit. -""" -type PullRequestCommitConnection { - """ - A list of edges. - """ - edges: [PullRequestCommitEdge] - - """ - A list of nodes. - """ - nodes: [PullRequestCommit] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type PullRequestCommitEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: PullRequestCommit -} - -""" -The connection type for PullRequest. -""" -type PullRequestConnection { - """ - A list of edges. - """ - edges: [PullRequestEdge] - - """ - A list of nodes. - """ - nodes: [PullRequest] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -This aggregates pull requests opened by a user within one repository. -""" -type PullRequestContributionsByRepository { - """ - The pull request contributions. - """ - contributions( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for contributions returned from the connection. - """ - orderBy: ContributionOrder = {direction: DESC} - ): CreatedPullRequestContributionConnection! - - """ - The repository in which the pull requests were opened. - """ - repository: Repository! -} - -""" -An edge in a connection. -""" -type PullRequestEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: PullRequest -} - -""" -Represents available types of methods to use when merging a pull request. -""" -enum PullRequestMergeMethod { - """ - Add all commits from the head branch to the base branch with a merge commit. - """ - MERGE - - """ - Add all commits from the head branch onto the base branch individually. - """ - REBASE - - """ - Combine all commits from the head branch into a single commit in the base branch. - """ - SQUASH -} - -""" -Ways in which lists of issues can be ordered upon return. -""" -input PullRequestOrder { - """ - The direction in which to order pull requests by the specified field. - """ - direction: OrderDirection! - - """ - The field in which to order pull requests by. - """ - field: PullRequestOrderField! -} - -""" -Properties by which pull_requests connections can be ordered. -""" -enum PullRequestOrderField { - """ - Order pull_requests by creation time - """ - CREATED_AT - - """ - Order pull_requests by update time - """ - UPDATED_AT -} - -""" -A review object for a given pull request. -""" -type PullRequestReview implements Comment & Deletable & Node & Reactable & RepositoryNode & Updatable & UpdatableComment { - """ - The actor who authored the comment. - """ - author: Actor - - """ - Author's association with the subject of the comment. - """ - authorAssociation: CommentAuthorAssociation! - - """ - Indicates whether the author of this review has push access to the repository. - """ - authorCanPushToRepository: Boolean! - - """ - Identifies the pull request review body. - """ - body: String! - - """ - The body rendered to HTML. - """ - bodyHTML: HTML! - - """ - The body of this review rendered as plain text. - """ - bodyText: String! - - """ - A list of review comments for the current pull request review. - """ - comments( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): PullRequestReviewCommentConnection! - - """ - Identifies the commit associated with this pull request review. - """ - commit: Commit - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Check if this comment was created via an email reply. - """ - createdViaEmail: Boolean! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - - """ - The actor who edited the comment. - """ - editor: Actor - id: ID! - - """ - Check if this comment was edited and includes an edit with the creation data - """ - includesCreatedEdit: Boolean! - - """ - The moment the editor made the last edit - """ - lastEditedAt: DateTime - - """ - A list of teams that this review was made on behalf of. - """ - onBehalfOf( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): TeamConnection! - - """ - Identifies when the comment was published at. - """ - publishedAt: DateTime - - """ - Identifies the pull request associated with this pull request review. - """ - pullRequest: PullRequest! - - """ - A list of reactions grouped by content left on the subject. - """ - reactionGroups: [ReactionGroup!] - - """ - A list of Reactions left on the Issue. - """ - reactions( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Allows filtering Reactions by emoji. - """ - content: ReactionContent - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Allows specifying the order in which reactions are returned. - """ - orderBy: ReactionOrder - ): ReactionConnection! - - """ - The repository associated with this node. - """ - repository: Repository! - - """ - The HTTP path permalink for this PullRequestReview. - """ - resourcePath: URI! - - """ - Identifies the current state of the pull request review. - """ - state: PullRequestReviewState! - - """ - Identifies when the Pull Request Review was submitted - """ - submittedAt: DateTime - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! - - """ - The HTTP URL permalink for this PullRequestReview. - """ - url: URI! - - """ - A list of edits to this content. - """ - userContentEdits( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): UserContentEditConnection - - """ - Check if the current viewer can delete this object. - """ - viewerCanDelete: Boolean! - - """ - Can user react to this subject - """ - viewerCanReact: Boolean! - - """ - Check if the current viewer can update this object. - """ - viewerCanUpdate: Boolean! - - """ - Reasons why the current viewer can not update this comment. - """ - viewerCannotUpdateReasons: [CommentCannotUpdateReason!]! - - """ - Did the viewer author this comment. - """ - viewerDidAuthor: Boolean! -} - -""" -A review comment associated with a given repository pull request. -""" -type PullRequestReviewComment implements Comment & Deletable & Minimizable & Node & Reactable & RepositoryNode & Updatable & UpdatableComment { - """ - The actor who authored the comment. - """ - author: Actor - - """ - Author's association with the subject of the comment. - """ - authorAssociation: CommentAuthorAssociation! - - """ - The comment body of this review comment. - """ - body: String! - - """ - The body rendered to HTML. - """ - bodyHTML: HTML! - - """ - The comment body of this review comment rendered as plain text. - """ - bodyText: String! - - """ - Identifies the commit associated with the comment. - """ - commit: Commit - - """ - Identifies when the comment was created. - """ - createdAt: DateTime! - - """ - Check if this comment was created via an email reply. - """ - createdViaEmail: Boolean! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - - """ - The diff hunk to which the comment applies. - """ - diffHunk: String! - - """ - Identifies when the comment was created in a draft state. - """ - draftedAt: DateTime! - - """ - The actor who edited the comment. - """ - editor: Actor - id: ID! - - """ - Check if this comment was edited and includes an edit with the creation data - """ - includesCreatedEdit: Boolean! - - """ - Returns whether or not a comment has been minimized. - """ - isMinimized: Boolean! - - """ - The moment the editor made the last edit - """ - lastEditedAt: DateTime - - """ - Returns why the comment was minimized. - """ - minimizedReason: String - - """ - Identifies the original commit associated with the comment. - """ - originalCommit: Commit - - """ - The original line index in the diff to which the comment applies. - """ - originalPosition: Int! - - """ - Identifies when the comment body is outdated - """ - outdated: Boolean! - - """ - The path to which the comment applies. - """ - path: String! - - """ - The line index in the diff to which the comment applies. - """ - position: Int - - """ - Identifies when the comment was published at. - """ - publishedAt: DateTime - - """ - The pull request associated with this review comment. - """ - pullRequest: PullRequest! - - """ - The pull request review associated with this review comment. - """ - pullRequestReview: PullRequestReview - - """ - A list of reactions grouped by content left on the subject. - """ - reactionGroups: [ReactionGroup!] - - """ - A list of Reactions left on the Issue. - """ - reactions( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Allows filtering Reactions by emoji. - """ - content: ReactionContent - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Allows specifying the order in which reactions are returned. - """ - orderBy: ReactionOrder - ): ReactionConnection! - - """ - The comment this is a reply to. - """ - replyTo: PullRequestReviewComment - - """ - The repository associated with this node. - """ - repository: Repository! - - """ - The HTTP path permalink for this review comment. - """ - resourcePath: URI! - - """ - Identifies the state of the comment. - """ - state: PullRequestReviewCommentState! - - """ - Identifies when the comment was last updated. - """ - updatedAt: DateTime! - - """ - The HTTP URL permalink for this review comment. - """ - url: URI! - - """ - A list of edits to this content. - """ - userContentEdits( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): UserContentEditConnection - - """ - Check if the current viewer can delete this object. - """ - viewerCanDelete: Boolean! - - """ - Check if the current viewer can minimize this object. - """ - viewerCanMinimize: Boolean! - - """ - Can user react to this subject - """ - viewerCanReact: Boolean! - - """ - Check if the current viewer can update this object. - """ - viewerCanUpdate: Boolean! - - """ - Reasons why the current viewer can not update this comment. - """ - viewerCannotUpdateReasons: [CommentCannotUpdateReason!]! - - """ - Did the viewer author this comment. - """ - viewerDidAuthor: Boolean! -} - -""" -The connection type for PullRequestReviewComment. -""" -type PullRequestReviewCommentConnection { - """ - A list of edges. - """ - edges: [PullRequestReviewCommentEdge] - - """ - A list of nodes. - """ - nodes: [PullRequestReviewComment] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type PullRequestReviewCommentEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: PullRequestReviewComment -} - -""" -The possible states of a pull request review comment. -""" -enum PullRequestReviewCommentState { - """ - A comment that is part of a pending review - """ - PENDING - - """ - A comment that is part of a submitted review - """ - SUBMITTED -} - -""" -The connection type for PullRequestReview. -""" -type PullRequestReviewConnection { - """ - A list of edges. - """ - edges: [PullRequestReviewEdge] - - """ - A list of nodes. - """ - nodes: [PullRequestReview] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -This aggregates pull request reviews made by a user within one repository. -""" -type PullRequestReviewContributionsByRepository { - """ - The pull request review contributions. - """ - contributions( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for contributions returned from the connection. - """ - orderBy: ContributionOrder = {direction: DESC} - ): CreatedPullRequestReviewContributionConnection! - - """ - The repository in which the pull request reviews were made. - """ - repository: Repository! -} - -""" -The review status of a pull request. -""" -enum PullRequestReviewDecision { - """ - The pull request has received an approving review. - """ - APPROVED - - """ - Changes have been requested on the pull request. - """ - CHANGES_REQUESTED - - """ - A review is required before the pull request can be merged. - """ - REVIEW_REQUIRED -} - -""" -An edge in a connection. -""" -type PullRequestReviewEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: PullRequestReview -} - -""" -The possible events to perform on a pull request review. -""" -enum PullRequestReviewEvent { - """ - Submit feedback and approve merging these changes. - """ - APPROVE - - """ - Submit general feedback without explicit approval. - """ - COMMENT - - """ - Dismiss review so it now longer effects merging. - """ - DISMISS - - """ - Submit feedback that must be addressed before merging. - """ - REQUEST_CHANGES -} - -""" -The possible states of a pull request review. -""" -enum PullRequestReviewState { - """ - A review allowing the pull request to merge. - """ - APPROVED - - """ - A review blocking the pull request from merging. - """ - CHANGES_REQUESTED - - """ - An informational review. - """ - COMMENTED - - """ - A review that has been dismissed. - """ - DISMISSED - - """ - A review that has not yet been submitted. - """ - PENDING -} - -""" -A threaded list of comments for a given pull request. -""" -type PullRequestReviewThread implements Node { - """ - A list of pull request comments associated with the thread. - """ - comments( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Skips the first _n_ elements in the list. - """ - skip: Int - ): PullRequestReviewCommentConnection! - - """ - The side of the diff on which this thread was placed. - """ - diffSide: DiffSide! - id: ID! - - """ - Whether or not the thread has been collapsed (outdated or resolved) - """ - isCollapsed: Boolean! - - """ - Indicates whether this thread was outdated by newer changes. - """ - isOutdated: Boolean! - - """ - Whether this thread has been resolved - """ - isResolved: Boolean! - - """ - The line in the file to which this thread refers - """ - line: Int - - """ - The original line in the file to which this thread refers. - """ - originalLine: Int - - """ - The original start line in the file to which this thread refers (multi-line only). - """ - originalStartLine: Int - - """ - Identifies the file path of this thread. - """ - path: String! - - """ - Identifies the pull request associated with this thread. - """ - pullRequest: PullRequest! - - """ - Identifies the repository associated with this thread. - """ - repository: Repository! - - """ - The user who resolved this thread - """ - resolvedBy: User - - """ - The side of the diff that the first line of the thread starts on (multi-line only) - """ - startDiffSide: DiffSide - - """ - The start line in the file to which this thread refers (multi-line only) - """ - startLine: Int - - """ - Indicates whether the current viewer can reply to this thread. - """ - viewerCanReply: Boolean! - - """ - Whether or not the viewer can resolve this thread - """ - viewerCanResolve: Boolean! - - """ - Whether or not the viewer can unresolve this thread - """ - viewerCanUnresolve: Boolean! -} - -""" -Review comment threads for a pull request review. -""" -type PullRequestReviewThreadConnection { - """ - A list of edges. - """ - edges: [PullRequestReviewThreadEdge] - - """ - A list of nodes. - """ - nodes: [PullRequestReviewThread] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type PullRequestReviewThreadEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: PullRequestReviewThread -} - -""" -Represents the latest point in the pull request timeline for which the viewer has seen the pull request's commits. -""" -type PullRequestRevisionMarker { - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - The last commit the viewer has seen. - """ - lastSeenCommit: Commit! - - """ - The pull request to which the marker belongs. - """ - pullRequest: PullRequest! -} - -""" -The possible states of a pull request. -""" -enum PullRequestState { - """ - A pull request that has been closed without being merged. - """ - CLOSED - - """ - A pull request that has been closed by being merged. - """ - MERGED - - """ - A pull request that is still open. - """ - OPEN -} - -""" -The connection type for PullRequestTimelineItem. -""" -type PullRequestTimelineConnection { - """ - A list of edges. - """ - edges: [PullRequestTimelineItemEdge] - - """ - A list of nodes. - """ - nodes: [PullRequestTimelineItem] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An item in a pull request timeline -""" -union PullRequestTimelineItem = AssignedEvent | BaseRefDeletedEvent | BaseRefForcePushedEvent | ClosedEvent | Commit | CommitCommentThread | CrossReferencedEvent | DemilestonedEvent | DeployedEvent | DeploymentEnvironmentChangedEvent | HeadRefDeletedEvent | HeadRefForcePushedEvent | HeadRefRestoredEvent | IssueComment | LabeledEvent | LockedEvent | MergedEvent | MilestonedEvent | PullRequestReview | PullRequestReviewComment | PullRequestReviewThread | ReferencedEvent | RenamedTitleEvent | ReopenedEvent | ReviewDismissedEvent | ReviewRequestRemovedEvent | ReviewRequestedEvent | SubscribedEvent | UnassignedEvent | UnlabeledEvent | UnlockedEvent | UnsubscribedEvent | UserBlockedEvent - -""" -An edge in a connection. -""" -type PullRequestTimelineItemEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: PullRequestTimelineItem -} - -""" -An item in a pull request timeline -""" -union PullRequestTimelineItems = AddedToProjectEvent | AssignedEvent | AutoMergeDisabledEvent | AutoMergeEnabledEvent | AutoRebaseEnabledEvent | AutoSquashEnabledEvent | AutomaticBaseChangeFailedEvent | AutomaticBaseChangeSucceededEvent | BaseRefChangedEvent | BaseRefDeletedEvent | BaseRefForcePushedEvent | ClosedEvent | CommentDeletedEvent | ConnectedEvent | ConvertToDraftEvent | ConvertedNoteToIssueEvent | CrossReferencedEvent | DemilestonedEvent | DeployedEvent | DeploymentEnvironmentChangedEvent | DisconnectedEvent | HeadRefDeletedEvent | HeadRefForcePushedEvent | HeadRefRestoredEvent | IssueComment | LabeledEvent | LockedEvent | MarkedAsDuplicateEvent | MentionedEvent | MergedEvent | MilestonedEvent | MovedColumnsInProjectEvent | PinnedEvent | PullRequestCommit | PullRequestCommitCommentThread | PullRequestReview | PullRequestReviewThread | PullRequestRevisionMarker | ReadyForReviewEvent | ReferencedEvent | RemovedFromProjectEvent | RenamedTitleEvent | ReopenedEvent | ReviewDismissedEvent | ReviewRequestRemovedEvent | ReviewRequestedEvent | SubscribedEvent | TransferredEvent | UnassignedEvent | UnlabeledEvent | UnlockedEvent | UnmarkedAsDuplicateEvent | UnpinnedEvent | UnsubscribedEvent | UserBlockedEvent - -""" -The connection type for PullRequestTimelineItems. -""" -type PullRequestTimelineItemsConnection { - """ - A list of edges. - """ - edges: [PullRequestTimelineItemsEdge] - - """ - Identifies the count of items after applying `before` and `after` filters. - """ - filteredCount: Int! - - """ - A list of nodes. - """ - nodes: [PullRequestTimelineItems] - - """ - Identifies the count of items after applying `before`/`after` filters and `first`/`last`/`skip` slicing. - """ - pageCount: Int! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! - - """ - Identifies the date and time when the timeline was last updated. - """ - updatedAt: DateTime! -} - -""" -An edge in a connection. -""" -type PullRequestTimelineItemsEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: PullRequestTimelineItems -} - -""" -The possible item types found in a timeline. -""" -enum PullRequestTimelineItemsItemType { - """ - Represents a 'added_to_project' event on a given issue or pull request. - """ - ADDED_TO_PROJECT_EVENT - - """ - Represents an 'assigned' event on any assignable object. - """ - ASSIGNED_EVENT - - """ - Represents a 'automatic_base_change_failed' event on a given pull request. - """ - AUTOMATIC_BASE_CHANGE_FAILED_EVENT - - """ - Represents a 'automatic_base_change_succeeded' event on a given pull request. - """ - AUTOMATIC_BASE_CHANGE_SUCCEEDED_EVENT - - """ - Represents a 'auto_merge_disabled' event on a given pull request. - """ - AUTO_MERGE_DISABLED_EVENT - - """ - Represents a 'auto_merge_enabled' event on a given pull request. - """ - AUTO_MERGE_ENABLED_EVENT - - """ - Represents a 'auto_rebase_enabled' event on a given pull request. - """ - AUTO_REBASE_ENABLED_EVENT - - """ - Represents a 'auto_squash_enabled' event on a given pull request. - """ - AUTO_SQUASH_ENABLED_EVENT - - """ - Represents a 'base_ref_changed' event on a given issue or pull request. - """ - BASE_REF_CHANGED_EVENT - - """ - Represents a 'base_ref_deleted' event on a given pull request. - """ - BASE_REF_DELETED_EVENT - - """ - Represents a 'base_ref_force_pushed' event on a given pull request. - """ - BASE_REF_FORCE_PUSHED_EVENT - - """ - Represents a 'closed' event on any `Closable`. - """ - CLOSED_EVENT - - """ - Represents a 'comment_deleted' event on a given issue or pull request. - """ - COMMENT_DELETED_EVENT - - """ - Represents a 'connected' event on a given issue or pull request. - """ - CONNECTED_EVENT - - """ - Represents a 'converted_note_to_issue' event on a given issue or pull request. - """ - CONVERTED_NOTE_TO_ISSUE_EVENT - - """ - Represents a 'convert_to_draft' event on a given pull request. - """ - CONVERT_TO_DRAFT_EVENT - - """ - Represents a mention made by one issue or pull request to another. - """ - CROSS_REFERENCED_EVENT - - """ - Represents a 'demilestoned' event on a given issue or pull request. - """ - DEMILESTONED_EVENT - - """ - Represents a 'deployed' event on a given pull request. - """ - DEPLOYED_EVENT - - """ - Represents a 'deployment_environment_changed' event on a given pull request. - """ - DEPLOYMENT_ENVIRONMENT_CHANGED_EVENT - - """ - Represents a 'disconnected' event on a given issue or pull request. - """ - DISCONNECTED_EVENT - - """ - Represents a 'head_ref_deleted' event on a given pull request. - """ - HEAD_REF_DELETED_EVENT - - """ - Represents a 'head_ref_force_pushed' event on a given pull request. - """ - HEAD_REF_FORCE_PUSHED_EVENT - - """ - Represents a 'head_ref_restored' event on a given pull request. - """ - HEAD_REF_RESTORED_EVENT - - """ - Represents a comment on an Issue. - """ - ISSUE_COMMENT - - """ - Represents a 'labeled' event on a given issue or pull request. - """ - LABELED_EVENT - - """ - Represents a 'locked' event on a given issue or pull request. - """ - LOCKED_EVENT - - """ - Represents a 'marked_as_duplicate' event on a given issue or pull request. - """ - MARKED_AS_DUPLICATE_EVENT - - """ - Represents a 'mentioned' event on a given issue or pull request. - """ - MENTIONED_EVENT - - """ - Represents a 'merged' event on a given pull request. - """ - MERGED_EVENT - - """ - Represents a 'milestoned' event on a given issue or pull request. - """ - MILESTONED_EVENT - - """ - Represents a 'moved_columns_in_project' event on a given issue or pull request. - """ - MOVED_COLUMNS_IN_PROJECT_EVENT - - """ - Represents a 'pinned' event on a given issue or pull request. - """ - PINNED_EVENT - - """ - Represents a Git commit part of a pull request. - """ - PULL_REQUEST_COMMIT - - """ - Represents a commit comment thread part of a pull request. - """ - PULL_REQUEST_COMMIT_COMMENT_THREAD - - """ - A review object for a given pull request. - """ - PULL_REQUEST_REVIEW - - """ - A threaded list of comments for a given pull request. - """ - PULL_REQUEST_REVIEW_THREAD - - """ - Represents the latest point in the pull request timeline for which the viewer has seen the pull request's commits. - """ - PULL_REQUEST_REVISION_MARKER - - """ - Represents a 'ready_for_review' event on a given pull request. - """ - READY_FOR_REVIEW_EVENT - - """ - Represents a 'referenced' event on a given `ReferencedSubject`. - """ - REFERENCED_EVENT - - """ - Represents a 'removed_from_project' event on a given issue or pull request. - """ - REMOVED_FROM_PROJECT_EVENT - - """ - Represents a 'renamed' event on a given issue or pull request - """ - RENAMED_TITLE_EVENT - - """ - Represents a 'reopened' event on any `Closable`. - """ - REOPENED_EVENT - - """ - Represents a 'review_dismissed' event on a given issue or pull request. - """ - REVIEW_DISMISSED_EVENT - - """ - Represents an 'review_requested' event on a given pull request. - """ - REVIEW_REQUESTED_EVENT - - """ - Represents an 'review_request_removed' event on a given pull request. - """ - REVIEW_REQUEST_REMOVED_EVENT - - """ - Represents a 'subscribed' event on a given `Subscribable`. - """ - SUBSCRIBED_EVENT - - """ - Represents a 'transferred' event on a given issue or pull request. - """ - TRANSFERRED_EVENT - - """ - Represents an 'unassigned' event on any assignable object. - """ - UNASSIGNED_EVENT - - """ - Represents an 'unlabeled' event on a given issue or pull request. - """ - UNLABELED_EVENT - - """ - Represents an 'unlocked' event on a given issue or pull request. - """ - UNLOCKED_EVENT - - """ - Represents an 'unmarked_as_duplicate' event on a given issue or pull request. - """ - UNMARKED_AS_DUPLICATE_EVENT - - """ - Represents an 'unpinned' event on a given issue or pull request. - """ - UNPINNED_EVENT - - """ - Represents an 'unsubscribed' event on a given `Subscribable`. - """ - UNSUBSCRIBED_EVENT - - """ - Represents a 'user_blocked' event on a given user. - """ - USER_BLOCKED_EVENT -} - -""" -The possible target states when updating a pull request. -""" -enum PullRequestUpdateState { - """ - A pull request that has been closed without being merged. - """ - CLOSED - - """ - A pull request that is still open. - """ - OPEN -} - -""" -A Git push. -""" -type Push implements Node { - id: ID! - - """ - The SHA after the push - """ - nextSha: GitObjectID - - """ - The permalink for this push. - """ - permalink: URI! - - """ - The SHA before the push - """ - previousSha: GitObjectID - - """ - The user who pushed - """ - pusher: User! - - """ - The repository that was pushed to - """ - repository: Repository! -} - -""" -A team, user or app who has the ability to push to a protected branch. -""" -type PushAllowance implements Node { - """ - The actor that can push. - """ - actor: PushAllowanceActor - - """ - Identifies the branch protection rule associated with the allowed user or team. - """ - branchProtectionRule: BranchProtectionRule - id: ID! -} - -""" -Types that can be an actor. -""" -union PushAllowanceActor = App | Team | User - -""" -The connection type for PushAllowance. -""" -type PushAllowanceConnection { - """ - A list of edges. - """ - edges: [PushAllowanceEdge] - - """ - A list of nodes. - """ - nodes: [PushAllowance] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type PushAllowanceEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: PushAllowance -} - -""" -The query root of GitHub's GraphQL interface. -""" -type Query { - getApiVersion: String! - - """ - Look up a code of conduct by its key - """ - codeOfConduct( - """ - The code of conduct's key - """ - key: String! - ): CodeOfConduct - - """ - Look up a code of conduct by its key - """ - codesOfConduct: [CodeOfConduct] - - """ - Look up an enterprise by URL slug. - """ - enterprise( - """ - The enterprise invitation token. - """ - invitationToken: String - - """ - The enterprise URL slug. - """ - slug: String! - ): Enterprise - - """ - Look up a pending enterprise administrator invitation by invitee, enterprise and role. - """ - enterpriseAdministratorInvitation( - """ - The slug of the enterprise the user was invited to join. - """ - enterpriseSlug: String! - - """ - The role for the business member invitation. - """ - role: EnterpriseAdministratorRole! - - """ - The login of the user invited to join the business. - """ - userLogin: String! - ): EnterpriseAdministratorInvitation - - """ - Look up a pending enterprise administrator invitation by invitation token. - """ - enterpriseAdministratorInvitationByToken( - """ - The invitation token sent with the invitation email. - """ - invitationToken: String! - ): EnterpriseAdministratorInvitation - - """ - Look up an open source license by its key - """ - license( - """ - The license's downcased SPDX ID - """ - key: String! - ): License - - """ - Return a list of known open source licenses - """ - licenses: [License]! - - """ - Get alphabetically sorted list of Marketplace categories - """ - marketplaceCategories( - """ - Exclude categories with no listings. - """ - excludeEmpty: Boolean - - """ - Returns top level categories only, excluding any subcategories. - """ - excludeSubcategories: Boolean - - """ - Return only the specified categories. - """ - includeCategories: [String!] - ): [MarketplaceCategory!]! - - """ - Look up a Marketplace category by its slug. - """ - marketplaceCategory( - """ - The URL slug of the category. - """ - slug: String! - - """ - Also check topic aliases for the category slug - """ - useTopicAliases: Boolean - ): MarketplaceCategory - - """ - Look up a single Marketplace listing - """ - marketplaceListing( - """ - Select the listing that matches this slug. It's the short name of the listing used in its URL. - """ - slug: String! - ): MarketplaceListing - - """ - Look up Marketplace listings - """ - marketplaceListings( - """ - Select listings that can be administered by the specified user. - """ - adminId: ID - - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Select listings visible to the viewer even if they are not approved. If omitted or - false, only approved listings will be returned. - """ - allStates: Boolean - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Select only listings with the given category. - """ - categorySlug: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Select listings for products owned by the specified organization. - """ - organizationId: ID - - """ - Select only listings where the primary category matches the given category slug. - """ - primaryCategoryOnly: Boolean = false - - """ - Select the listings with these slugs, if they are visible to the viewer. - """ - slugs: [String] - - """ - Also check topic aliases for the category slug - """ - useTopicAliases: Boolean - - """ - Select listings to which user has admin access. If omitted, listings visible to the - viewer are returned. - """ - viewerCanAdmin: Boolean - - """ - Select only listings that offer a free trial. - """ - withFreeTrialsOnly: Boolean = false - ): MarketplaceListingConnection! - - """ - Return information about the GitHub instance - """ - meta: GitHubMetadata! - - """ - Fetches an object given its ID. - """ - node( - """ - ID of the object. - """ - id: ID! - ): Node - - """ - Lookup nodes by a list of IDs. - """ - nodes( - """ - The list of node IDs. - """ - ids: [ID!]! - ): [Node]! - - """ - Lookup a organization by login. - """ - organization( - """ - The organization's login. - """ - login: String! - ): Organization - - """ - The client's rate limit information. - """ - rateLimit( - """ - If true, calculate the cost for the query without evaluating it - """ - dryRun: Boolean = false - ): RateLimit - - """ - Hack to workaround https://github.com/facebook/relay/issues/112 re-exposing the root query object - """ - relay: Query! - - """ - Lookup a given repository by the owner and repository name. - """ - repository( - """ - The name of the repository - """ - name: String! - - """ - The login field of a user or organization - """ - owner: String! - ): Repository - - """ - Lookup a repository owner (ie. either a User or an Organization) by login. - """ - repositoryOwner( - """ - The username to lookup the owner by. - """ - login: String! - ): RepositoryOwner - - """ - Lookup resource by a URL. - """ - resource( - """ - The URL. - """ - url: URI! - ): UniformResourceLocatable - - """ - Perform a search across resources. - """ - search( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - The search string to look for. - """ - query: String! - - """ - The types of search items to search within. - """ - type: SearchType! - ): SearchResultItemConnection! - - """ - GitHub Security Advisories - """ - securityAdvisories( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Filter advisories by identifier, e.g. GHSA or CVE. - """ - identifier: SecurityAdvisoryIdentifierFilter - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for the returned topics. - """ - orderBy: SecurityAdvisoryOrder = {field: UPDATED_AT, direction: DESC} - - """ - Filter advisories to those published since a time in the past. - """ - publishedSince: DateTime - - """ - Filter advisories to those updated since a time in the past. - """ - updatedSince: DateTime - ): SecurityAdvisoryConnection! - - """ - Fetch a Security Advisory by its GHSA ID - """ - securityAdvisory( - """ - GitHub Security Advisory ID. - """ - ghsaId: String! - ): SecurityAdvisory - - """ - Software Vulnerabilities documented by GitHub Security Advisories - """ - securityVulnerabilities( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - An ecosystem to filter vulnerabilities by. - """ - ecosystem: SecurityAdvisoryEcosystem - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for the returned topics. - """ - orderBy: SecurityVulnerabilityOrder = {field: UPDATED_AT, direction: DESC} - - """ - A package name to filter vulnerabilities by. - """ - package: String - - """ - A list of severities to filter vulnerabilities by. - """ - severities: [SecurityAdvisorySeverity!] - ): SecurityVulnerabilityConnection! - - """ - Users and organizations who can be sponsored via GitHub Sponsors. - """ - sponsorables( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Optional filter for which dependencies should be checked for sponsorable - owners. Only sponsorable owners of dependencies in this ecosystem will be - included. Used when onlyDependencies = true. - """ - dependencyEcosystem: SecurityAdvisoryEcosystem - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Whether only sponsorables who own the viewer's dependencies will be - returned. Must be authenticated to use. Can check an organization instead - for their dependencies owned by sponsorables by passing - orgLoginForDependencies. - """ - onlyDependencies: Boolean = false - - """ - Ordering options for users and organizations returned from the connection. - """ - orderBy: SponsorableOrder = {field: LOGIN, direction: ASC} - - """ - Optional organization username for whose dependencies should be checked. - Used when onlyDependencies = true. Omit to check your own dependencies. If - you are not an administrator of the organization, only dependencies from its - public repositories will be considered. - """ - orgLoginForDependencies: String - ): SponsorableItemConnection! - - """ - Look up a single Sponsors Listing - """ - sponsorsListing( - """ - Select the Sponsors listing which matches this slug - """ - slug: String! - ): SponsorsListing @deprecated(reason: "`Query.sponsorsListing` will be removed. Use `Sponsorable.sponsorsListing` instead. Removal on 2020-04-01 UTC.") - - """ - Look up a topic by name. - """ - topic( - """ - The topic's name. - """ - name: String! - ): Topic - - """ - Lookup a user by login. - """ - user( - """ - The user's login. - """ - login: String! - ): User - - """ - The currently authenticated user. - """ - viewer: User! -} - -""" -Represents the client's rate limit. -""" -type RateLimit { - """ - The point cost for the current query counting against the rate limit. - """ - cost: Int! - - """ - The maximum number of points the client is permitted to consume in a 60 minute window. - """ - limit: Int! - - """ - The maximum number of nodes this query may return - """ - nodeCount: Int! - - """ - The number of points remaining in the current rate limit window. - """ - remaining: Int! - - """ - The time at which the current rate limit window resets in UTC epoch seconds. - """ - resetAt: DateTime! - - """ - The number of points used in the current rate limit window. - """ - used: Int! -} - -""" -Represents a subject that can be reacted on. -""" -interface Reactable { - """ - Identifies the primary key from the database. - """ - databaseId: Int - id: ID! - - """ - A list of reactions grouped by content left on the subject. - """ - reactionGroups: [ReactionGroup!] - - """ - A list of Reactions left on the Issue. - """ - reactions( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Allows filtering Reactions by emoji. - """ - content: ReactionContent - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Allows specifying the order in which reactions are returned. - """ - orderBy: ReactionOrder - ): ReactionConnection! - - """ - Can user react to this subject - """ - viewerCanReact: Boolean! -} - -""" -The connection type for User. -""" -type ReactingUserConnection { - """ - A list of edges. - """ - edges: [ReactingUserEdge] - - """ - A list of nodes. - """ - nodes: [User] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -Represents a user that's made a reaction. -""" -type ReactingUserEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - node: User! - - """ - The moment when the user made the reaction. - """ - reactedAt: DateTime! -} - -""" -An emoji reaction to a particular piece of content. -""" -type Reaction implements Node { - """ - Identifies the emoji reaction. - """ - content: ReactionContent! - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - id: ID! - - """ - The reactable piece of content - """ - reactable: Reactable! - - """ - Identifies the user who created this reaction. - """ - user: User -} - -""" -A list of reactions that have been left on the subject. -""" -type ReactionConnection { - """ - A list of edges. - """ - edges: [ReactionEdge] - - """ - A list of nodes. - """ - nodes: [Reaction] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! - - """ - Whether or not the authenticated user has left a reaction on the subject. - """ - viewerHasReacted: Boolean! -} - -""" -Emojis that can be attached to Issues, Pull Requests and Comments. -""" -enum ReactionContent { - """ - Represents the `:confused:` emoji. - """ - CONFUSED - - """ - Represents the `:eyes:` emoji. - """ - EYES - - """ - Represents the `:heart:` emoji. - """ - HEART - - """ - Represents the `:hooray:` emoji. - """ - HOORAY - - """ - Represents the `:laugh:` emoji. - """ - LAUGH - - """ - Represents the `:rocket:` emoji. - """ - ROCKET - - """ - Represents the `:-1:` emoji. - """ - THUMBS_DOWN - - """ - Represents the `:+1:` emoji. - """ - THUMBS_UP -} - -""" -An edge in a connection. -""" -type ReactionEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: Reaction -} - -""" -A group of emoji reactions to a particular piece of content. -""" -type ReactionGroup { - """ - Identifies the emoji reaction. - """ - content: ReactionContent! - - """ - Identifies when the reaction was created. - """ - createdAt: DateTime - - """ - The subject that was reacted to. - """ - subject: Reactable! - - """ - Users who have reacted to the reaction subject with the emotion represented by this reaction group - """ - users( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): ReactingUserConnection! - - """ - Whether or not the authenticated user has left a reaction on the subject. - """ - viewerHasReacted: Boolean! -} - -""" -Ways in which lists of reactions can be ordered upon return. -""" -input ReactionOrder { - """ - The direction in which to order reactions by the specified field. - """ - direction: OrderDirection! - - """ - The field in which to order reactions by. - """ - field: ReactionOrderField! -} - -""" -A list of fields that reactions can be ordered by. -""" -enum ReactionOrderField { - """ - Allows ordering a list of reactions by when they were created. - """ - CREATED_AT -} - -""" -Represents a 'ready_for_review' event on a given pull request. -""" -type ReadyForReviewEvent implements Node & UniformResourceLocatable { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! - - """ - PullRequest referenced by event. - """ - pullRequest: PullRequest! - - """ - The HTTP path for this ready for review event. - """ - resourcePath: URI! - - """ - The HTTP URL for this ready for review event. - """ - url: URI! -} - -""" -Represents a Git reference. -""" -type Ref implements Node { - """ - A list of pull requests with this ref as the head ref. - """ - associatedPullRequests( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - The base ref name to filter the pull requests by. - """ - baseRefName: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - The head ref name to filter the pull requests by. - """ - headRefName: String - - """ - A list of label names to filter the pull requests by. - """ - labels: [String!] - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for pull requests returned from the connection. - """ - orderBy: IssueOrder - - """ - A list of states to filter the pull requests by. - """ - states: [PullRequestState!] - ): PullRequestConnection! - - """ - Branch protection rules for this ref - """ - branchProtectionRule: BranchProtectionRule - id: ID! - - """ - The ref name. - """ - name: String! - - """ - The ref's prefix, such as `refs/heads/` or `refs/tags/`. - """ - prefix: String! - - """ - Branch protection rules that are viewable by non-admins - """ - refUpdateRule: RefUpdateRule - - """ - The repository the ref belongs to. - """ - repository: Repository! - - """ - The object the ref points to. Returns null when object does not exist. - """ - target: GitObject -} - -""" -The connection type for Ref. -""" -type RefConnection { - """ - A list of edges. - """ - edges: [RefEdge] - - """ - A list of nodes. - """ - nodes: [Ref] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type RefEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: Ref -} - -""" -Ways in which lists of git refs can be ordered upon return. -""" -input RefOrder { - """ - The direction in which to order refs by the specified field. - """ - direction: OrderDirection! - - """ - The field in which to order refs by. - """ - field: RefOrderField! -} - -""" -Properties by which ref connections can be ordered. -""" -enum RefOrderField { - """ - Order refs by their alphanumeric name - """ - ALPHABETICAL - - """ - Order refs by underlying commit date if the ref prefix is refs/tags/ - """ - TAG_COMMIT_DATE -} - -""" -A ref update -""" -input RefUpdate @preview(toggledBy: "update-refs-preview") { - """ - The value this ref should be updated to. - """ - afterOid: GitObjectID! - - """ - The value this ref needs to point to before the update. - """ - beforeOid: GitObjectID - - """ - Force a non fast-forward update. - """ - force: Boolean = false - - """ - The fully qualified name of the ref to be update. For example `refs/heads/branch-name` - """ - name: GitRefname! -} - -""" -A ref update rules for a viewer. -""" -type RefUpdateRule { - """ - Can this branch be deleted. - """ - allowsDeletions: Boolean! - - """ - Are force pushes allowed on this branch. - """ - allowsForcePushes: Boolean! - - """ - Identifies the protection rule pattern. - """ - pattern: String! - - """ - Number of approving reviews required to update matching branches. - """ - requiredApprovingReviewCount: Int - - """ - List of required status check contexts that must pass for commits to be accepted to matching branches. - """ - requiredStatusCheckContexts: [String] - - """ - Are reviews from code owners required to update matching branches. - """ - requiresCodeOwnerReviews: Boolean! - - """ - Are merge commits prohibited from being pushed to this branch. - """ - requiresLinearHistory: Boolean! - - """ - Are commits required to be signed. - """ - requiresSignatures: Boolean! - - """ - Is the viewer allowed to dismiss reviews. - """ - viewerAllowedToDismissReviews: Boolean! - - """ - Can the viewer push to the branch - """ - viewerCanPush: Boolean! -} - -""" -Represents a 'referenced' event on a given `ReferencedSubject`. -""" -type ReferencedEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the commit associated with the 'referenced' event. - """ - commit: Commit - - """ - Identifies the repository associated with the 'referenced' event. - """ - commitRepository: Repository! - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! - - """ - Reference originated in a different repository. - """ - isCrossRepository: Boolean! - - """ - Checks if the commit message itself references the subject. Can be false in the case of a commit comment reference. - """ - isDirectReference: Boolean! - - """ - Object referenced by event. - """ - subject: ReferencedSubject! -} - -""" -Any referencable object -""" -union ReferencedSubject = Issue | PullRequest - -""" -Autogenerated input type of RegenerateEnterpriseIdentityProviderRecoveryCodes -""" -input RegenerateEnterpriseIdentityProviderRecoveryCodesInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the enterprise on which to set an identity provider. - """ - enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) -} - -""" -Autogenerated return type of RegenerateEnterpriseIdentityProviderRecoveryCodes -""" -type RegenerateEnterpriseIdentityProviderRecoveryCodesPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The identity provider for the enterprise. - """ - identityProvider: EnterpriseIdentityProvider -} - -""" -Autogenerated input type of RegenerateVerifiableDomainToken -""" -input RegenerateVerifiableDomainTokenInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the verifiable domain to regenerate the verification token of. - """ - id: ID! @possibleTypes(concreteTypes: ["VerifiableDomain"]) -} - -""" -Autogenerated return type of RegenerateVerifiableDomainToken -""" -type RegenerateVerifiableDomainTokenPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The verification token that was generated. - """ - verificationToken: String -} - -""" -A release contains the content for a release. -""" -type Release implements Node & UniformResourceLocatable { - """ - The author of the release - """ - author: User - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - The description of the release. - """ - description: String - - """ - The description of this release rendered to HTML. - """ - descriptionHTML: HTML - id: ID! - - """ - Whether or not the release is a draft - """ - isDraft: Boolean! - - """ - Whether or not the release is the latest releast - """ - isLatest: Boolean! - - """ - Whether or not the release is a prerelease - """ - isPrerelease: Boolean! - - """ - The title of the release. - """ - name: String - - """ - Identifies the date and time when the release was created. - """ - publishedAt: DateTime - - """ - List of releases assets which are dependent on this release. - """ - releaseAssets( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - A list of names to filter the assets by. - """ - name: String - ): ReleaseAssetConnection! - - """ - The repository that the release belongs to. - """ - repository: Repository! - - """ - The HTTP path for this issue - """ - resourcePath: URI! - - """ - A description of the release, rendered to HTML without any links in it. - """ - shortDescriptionHTML( - """ - How many characters to return. - """ - limit: Int = 200 - ): HTML - - """ - The Git tag the release points to - """ - tag: Ref - - """ - The tag commit for this release. - """ - tagCommit: Commit - - """ - The name of the release's Git tag - """ - tagName: String! - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! - - """ - The HTTP URL for this issue - """ - url: URI! -} - -""" -A release asset contains the content for a release asset. -""" -type ReleaseAsset implements Node { - """ - The asset's content-type - """ - contentType: String! - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - The number of times this asset was downloaded - """ - downloadCount: Int! - - """ - Identifies the URL where you can download the release asset via the browser. - """ - downloadUrl: URI! - id: ID! - - """ - Identifies the title of the release asset. - """ - name: String! - - """ - Release that the asset is associated with - """ - release: Release - - """ - The size (in bytes) of the asset - """ - size: Int! - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! - - """ - The user that performed the upload - """ - uploadedBy: User! - - """ - Identifies the URL of the release asset. - """ - url: URI! -} - -""" -The connection type for ReleaseAsset. -""" -type ReleaseAssetConnection { - """ - A list of edges. - """ - edges: [ReleaseAssetEdge] - - """ - A list of nodes. - """ - nodes: [ReleaseAsset] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type ReleaseAssetEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: ReleaseAsset -} - -""" -The connection type for Release. -""" -type ReleaseConnection { - """ - A list of edges. - """ - edges: [ReleaseEdge] - - """ - A list of nodes. - """ - nodes: [Release] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type ReleaseEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: Release -} - -""" -Ways in which lists of releases can be ordered upon return. -""" -input ReleaseOrder { - """ - The direction in which to order releases by the specified field. - """ - direction: OrderDirection! - - """ - The field in which to order releases by. - """ - field: ReleaseOrderField! -} - -""" -Properties by which release connections can be ordered. -""" -enum ReleaseOrderField { - """ - Order releases by creation time - """ - CREATED_AT - - """ - Order releases alphabetically by name - """ - NAME -} - -""" -Autogenerated input type of RemoveAssigneesFromAssignable -""" -input RemoveAssigneesFromAssignableInput { - """ - The id of the assignable object to remove assignees from. - """ - assignableId: ID! @possibleTypes(concreteTypes: ["Issue", "PullRequest"], abstractType: "Assignable") - - """ - The id of users to remove as assignees. - """ - assigneeIds: [ID!]! @possibleTypes(concreteTypes: ["User"]) - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String -} - -""" -Autogenerated return type of RemoveAssigneesFromAssignable -""" -type RemoveAssigneesFromAssignablePayload { - """ - The item that was unassigned. - """ - assignable: Assignable - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String -} - -""" -Autogenerated input type of RemoveEnterpriseAdmin -""" -input RemoveEnterpriseAdminInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The Enterprise ID from which to remove the administrator. - """ - enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) - - """ - The login of the user to remove as an administrator. - """ - login: String! -} - -""" -Autogenerated return type of RemoveEnterpriseAdmin -""" -type RemoveEnterpriseAdminPayload { - """ - The user who was removed as an administrator. - """ - admin: User - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The updated enterprise. - """ - enterprise: Enterprise - - """ - A message confirming the result of removing an administrator. - """ - message: String - - """ - The viewer performing the mutation. - """ - viewer: User -} - -""" -Autogenerated input type of RemoveEnterpriseIdentityProvider -""" -input RemoveEnterpriseIdentityProviderInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the enterprise from which to remove the identity provider. - """ - enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) -} - -""" -Autogenerated return type of RemoveEnterpriseIdentityProvider -""" -type RemoveEnterpriseIdentityProviderPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The identity provider that was removed from the enterprise. - """ - identityProvider: EnterpriseIdentityProvider -} - -""" -Autogenerated input type of RemoveEnterpriseOrganization -""" -input RemoveEnterpriseOrganizationInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the enterprise from which the organization should be removed. - """ - enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) - - """ - The ID of the organization to remove from the enterprise. - """ - organizationId: ID! @possibleTypes(concreteTypes: ["Organization"]) -} - -""" -Autogenerated return type of RemoveEnterpriseOrganization -""" -type RemoveEnterpriseOrganizationPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The updated enterprise. - """ - enterprise: Enterprise - - """ - The organization that was removed from the enterprise. - """ - organization: Organization - - """ - The viewer performing the mutation. - """ - viewer: User -} - -""" -Autogenerated input type of RemoveEnterpriseSupportEntitlement -""" -input RemoveEnterpriseSupportEntitlementInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the Enterprise which the admin belongs to. - """ - enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) - - """ - The login of a member who will lose the support entitlement. - """ - login: String! -} - -""" -Autogenerated return type of RemoveEnterpriseSupportEntitlement -""" -type RemoveEnterpriseSupportEntitlementPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - A message confirming the result of removing the support entitlement. - """ - message: String -} - -""" -Autogenerated input type of RemoveLabelsFromLabelable -""" -input RemoveLabelsFromLabelableInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ids of labels to remove. - """ - labelIds: [ID!]! @possibleTypes(concreteTypes: ["Label"]) - - """ - The id of the Labelable to remove labels from. - """ - labelableId: ID! @possibleTypes(concreteTypes: ["Issue", "PullRequest"], abstractType: "Labelable") -} - -""" -Autogenerated return type of RemoveLabelsFromLabelable -""" -type RemoveLabelsFromLabelablePayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The Labelable the labels were removed from. - """ - labelable: Labelable -} - -""" -Autogenerated input type of RemoveOutsideCollaborator -""" -input RemoveOutsideCollaboratorInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the organization to remove the outside collaborator from. - """ - organizationId: ID! @possibleTypes(concreteTypes: ["Organization"]) - - """ - The ID of the outside collaborator to remove. - """ - userId: ID! @possibleTypes(concreteTypes: ["User"]) -} - -""" -Autogenerated return type of RemoveOutsideCollaborator -""" -type RemoveOutsideCollaboratorPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The user that was removed as an outside collaborator. - """ - removedUser: User -} - -""" -Autogenerated input type of RemoveReaction -""" -input RemoveReactionInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The name of the emoji reaction to remove. - """ - content: ReactionContent! - - """ - The Node ID of the subject to modify. - """ - subjectId: ID! @possibleTypes(concreteTypes: ["CommitComment", "Issue", "IssueComment", "PullRequest", "PullRequestReview", "PullRequestReviewComment", "TeamDiscussion", "TeamDiscussionComment"], abstractType: "Reactable") -} - -""" -Autogenerated return type of RemoveReaction -""" -type RemoveReactionPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The reaction object. - """ - reaction: Reaction - - """ - The reactable subject. - """ - subject: Reactable -} - -""" -Autogenerated input type of RemoveStar -""" -input RemoveStarInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The Starrable ID to unstar. - """ - starrableId: ID! @possibleTypes(concreteTypes: ["Gist", "Repository", "Topic"], abstractType: "Starrable") -} - -""" -Autogenerated return type of RemoveStar -""" -type RemoveStarPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The starrable. - """ - starrable: Starrable -} - -""" -Represents a 'removed_from_project' event on a given issue or pull request. -""" -type RemovedFromProjectEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - id: ID! - - """ - Project referenced by event. - """ - project: Project @preview(toggledBy: "starfox-preview") - - """ - Column name referenced by this project event. - """ - projectColumnName: String! @preview(toggledBy: "starfox-preview") -} - -""" -Represents a 'renamed' event on a given issue or pull request -""" -type RenamedTitleEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Identifies the current title of the issue or pull request. - """ - currentTitle: String! - id: ID! - - """ - Identifies the previous title of the issue or pull request. - """ - previousTitle: String! - - """ - Subject that was renamed. - """ - subject: RenamedTitleSubject! -} - -""" -An object which has a renamable title -""" -union RenamedTitleSubject = Issue | PullRequest - -""" -Autogenerated input type of ReopenIssue -""" -input ReopenIssueInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - ID of the issue to be opened. - """ - issueId: ID! @possibleTypes(concreteTypes: ["Issue"]) -} - -""" -Autogenerated return type of ReopenIssue -""" -type ReopenIssuePayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The issue that was opened. - """ - issue: Issue -} - -""" -Autogenerated input type of ReopenPullRequest -""" -input ReopenPullRequestInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - ID of the pull request to be reopened. - """ - pullRequestId: ID! @possibleTypes(concreteTypes: ["PullRequest"]) -} - -""" -Autogenerated return type of ReopenPullRequest -""" -type ReopenPullRequestPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The pull request that was reopened. - """ - pullRequest: PullRequest -} - -""" -Represents a 'reopened' event on any `Closable`. -""" -type ReopenedEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Object that was reopened. - """ - closable: Closable! - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! -} - -""" -Audit log entry for a repo.access event. -""" -type RepoAccessAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The repository associated with the action - """ - repository: Repository - - """ - The name of the repository - """ - repositoryName: String - - """ - The HTTP path for the repository - """ - repositoryResourcePath: URI - - """ - The HTTP URL for the repository - """ - repositoryUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI - - """ - The visibility of the repository - """ - visibility: RepoAccessAuditEntryVisibility -} - -""" -The privacy of a repository -""" -enum RepoAccessAuditEntryVisibility { - """ - The repository is visible only to users in the same business. - """ - INTERNAL - - """ - The repository is visible only to those with explicit access. - """ - PRIVATE - - """ - The repository is visible to everyone. - """ - PUBLIC -} - -""" -Audit log entry for a repo.add_member event. -""" -type RepoAddMemberAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The repository associated with the action - """ - repository: Repository - - """ - The name of the repository - """ - repositoryName: String - - """ - The HTTP path for the repository - """ - repositoryResourcePath: URI - - """ - The HTTP URL for the repository - """ - repositoryUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI - - """ - The visibility of the repository - """ - visibility: RepoAddMemberAuditEntryVisibility -} - -""" -The privacy of a repository -""" -enum RepoAddMemberAuditEntryVisibility { - """ - The repository is visible only to users in the same business. - """ - INTERNAL - - """ - The repository is visible only to those with explicit access. - """ - PRIVATE - - """ - The repository is visible to everyone. - """ - PUBLIC -} - -""" -Audit log entry for a repo.add_topic event. -""" -type RepoAddTopicAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData & TopicAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The repository associated with the action - """ - repository: Repository - - """ - The name of the repository - """ - repositoryName: String - - """ - The HTTP path for the repository - """ - repositoryResourcePath: URI - - """ - The HTTP URL for the repository - """ - repositoryUrl: URI - - """ - The name of the topic added to the repository - """ - topic: Topic - - """ - The name of the topic added to the repository - """ - topicName: String - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a repo.archived event. -""" -type RepoArchivedAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The repository associated with the action - """ - repository: Repository - - """ - The name of the repository - """ - repositoryName: String - - """ - The HTTP path for the repository - """ - repositoryResourcePath: URI - - """ - The HTTP URL for the repository - """ - repositoryUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI - - """ - The visibility of the repository - """ - visibility: RepoArchivedAuditEntryVisibility -} - -""" -The privacy of a repository -""" -enum RepoArchivedAuditEntryVisibility { - """ - The repository is visible only to users in the same business. - """ - INTERNAL - - """ - The repository is visible only to those with explicit access. - """ - PRIVATE - - """ - The repository is visible to everyone. - """ - PUBLIC -} - -""" -Audit log entry for a repo.change_merge_setting event. -""" -type RepoChangeMergeSettingAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - Whether the change was to enable (true) or disable (false) the merge type - """ - isEnabled: Boolean - - """ - The merge method affected by the change - """ - mergeType: RepoChangeMergeSettingAuditEntryMergeType - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The repository associated with the action - """ - repository: Repository - - """ - The name of the repository - """ - repositoryName: String - - """ - The HTTP path for the repository - """ - repositoryResourcePath: URI - - """ - The HTTP URL for the repository - """ - repositoryUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -The merge options available for pull requests to this repository. -""" -enum RepoChangeMergeSettingAuditEntryMergeType { - """ - The pull request is added to the base branch in a merge commit. - """ - MERGE - - """ - Commits from the pull request are added onto the base branch individually without a merge commit. - """ - REBASE - - """ - The pull request's commits are squashed into a single commit before they are merged to the base branch. - """ - SQUASH -} - -""" -Audit log entry for a repo.config.disable_anonymous_git_access event. -""" -type RepoConfigDisableAnonymousGitAccessAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The repository associated with the action - """ - repository: Repository - - """ - The name of the repository - """ - repositoryName: String - - """ - The HTTP path for the repository - """ - repositoryResourcePath: URI - - """ - The HTTP URL for the repository - """ - repositoryUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a repo.config.disable_collaborators_only event. -""" -type RepoConfigDisableCollaboratorsOnlyAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The repository associated with the action - """ - repository: Repository - - """ - The name of the repository - """ - repositoryName: String - - """ - The HTTP path for the repository - """ - repositoryResourcePath: URI - - """ - The HTTP URL for the repository - """ - repositoryUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a repo.config.disable_contributors_only event. -""" -type RepoConfigDisableContributorsOnlyAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The repository associated with the action - """ - repository: Repository - - """ - The name of the repository - """ - repositoryName: String - - """ - The HTTP path for the repository - """ - repositoryResourcePath: URI - - """ - The HTTP URL for the repository - """ - repositoryUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a repo.config.disable_sockpuppet_disallowed event. -""" -type RepoConfigDisableSockpuppetDisallowedAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The repository associated with the action - """ - repository: Repository - - """ - The name of the repository - """ - repositoryName: String - - """ - The HTTP path for the repository - """ - repositoryResourcePath: URI - - """ - The HTTP URL for the repository - """ - repositoryUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a repo.config.enable_anonymous_git_access event. -""" -type RepoConfigEnableAnonymousGitAccessAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The repository associated with the action - """ - repository: Repository - - """ - The name of the repository - """ - repositoryName: String - - """ - The HTTP path for the repository - """ - repositoryResourcePath: URI - - """ - The HTTP URL for the repository - """ - repositoryUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a repo.config.enable_collaborators_only event. -""" -type RepoConfigEnableCollaboratorsOnlyAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The repository associated with the action - """ - repository: Repository - - """ - The name of the repository - """ - repositoryName: String - - """ - The HTTP path for the repository - """ - repositoryResourcePath: URI - - """ - The HTTP URL for the repository - """ - repositoryUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a repo.config.enable_contributors_only event. -""" -type RepoConfigEnableContributorsOnlyAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The repository associated with the action - """ - repository: Repository - - """ - The name of the repository - """ - repositoryName: String - - """ - The HTTP path for the repository - """ - repositoryResourcePath: URI - - """ - The HTTP URL for the repository - """ - repositoryUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a repo.config.enable_sockpuppet_disallowed event. -""" -type RepoConfigEnableSockpuppetDisallowedAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The repository associated with the action - """ - repository: Repository - - """ - The name of the repository - """ - repositoryName: String - - """ - The HTTP path for the repository - """ - repositoryResourcePath: URI - - """ - The HTTP URL for the repository - """ - repositoryUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a repo.config.lock_anonymous_git_access event. -""" -type RepoConfigLockAnonymousGitAccessAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The repository associated with the action - """ - repository: Repository - - """ - The name of the repository - """ - repositoryName: String - - """ - The HTTP path for the repository - """ - repositoryResourcePath: URI - - """ - The HTTP URL for the repository - """ - repositoryUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a repo.config.unlock_anonymous_git_access event. -""" -type RepoConfigUnlockAnonymousGitAccessAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The repository associated with the action - """ - repository: Repository - - """ - The name of the repository - """ - repositoryName: String - - """ - The HTTP path for the repository - """ - repositoryResourcePath: URI - - """ - The HTTP URL for the repository - """ - repositoryUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a repo.create event. -""" -type RepoCreateAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - - """ - The name of the parent repository for this forked repository. - """ - forkParentName: String - - """ - The name of the root repository for this network. - """ - forkSourceName: String - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The repository associated with the action - """ - repository: Repository - - """ - The name of the repository - """ - repositoryName: String - - """ - The HTTP path for the repository - """ - repositoryResourcePath: URI - - """ - The HTTP URL for the repository - """ - repositoryUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI - - """ - The visibility of the repository - """ - visibility: RepoCreateAuditEntryVisibility -} - -""" -The privacy of a repository -""" -enum RepoCreateAuditEntryVisibility { - """ - The repository is visible only to users in the same business. - """ - INTERNAL - - """ - The repository is visible only to those with explicit access. - """ - PRIVATE - - """ - The repository is visible to everyone. - """ - PUBLIC -} - -""" -Audit log entry for a repo.destroy event. -""" -type RepoDestroyAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The repository associated with the action - """ - repository: Repository - - """ - The name of the repository - """ - repositoryName: String - - """ - The HTTP path for the repository - """ - repositoryResourcePath: URI - - """ - The HTTP URL for the repository - """ - repositoryUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI - - """ - The visibility of the repository - """ - visibility: RepoDestroyAuditEntryVisibility -} - -""" -The privacy of a repository -""" -enum RepoDestroyAuditEntryVisibility { - """ - The repository is visible only to users in the same business. - """ - INTERNAL - - """ - The repository is visible only to those with explicit access. - """ - PRIVATE - - """ - The repository is visible to everyone. - """ - PUBLIC -} - -""" -Audit log entry for a repo.remove_member event. -""" -type RepoRemoveMemberAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The repository associated with the action - """ - repository: Repository - - """ - The name of the repository - """ - repositoryName: String - - """ - The HTTP path for the repository - """ - repositoryResourcePath: URI - - """ - The HTTP URL for the repository - """ - repositoryUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI - - """ - The visibility of the repository - """ - visibility: RepoRemoveMemberAuditEntryVisibility -} - -""" -The privacy of a repository -""" -enum RepoRemoveMemberAuditEntryVisibility { - """ - The repository is visible only to users in the same business. - """ - INTERNAL - - """ - The repository is visible only to those with explicit access. - """ - PRIVATE - - """ - The repository is visible to everyone. - """ - PUBLIC -} - -""" -Audit log entry for a repo.remove_topic event. -""" -type RepoRemoveTopicAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData & TopicAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The repository associated with the action - """ - repository: Repository - - """ - The name of the repository - """ - repositoryName: String - - """ - The HTTP path for the repository - """ - repositoryResourcePath: URI - - """ - The HTTP URL for the repository - """ - repositoryUrl: URI - - """ - The name of the topic added to the repository - """ - topic: Topic - - """ - The name of the topic added to the repository - """ - topicName: String - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -The reasons a piece of content can be reported or minimized. -""" -enum ReportedContentClassifiers { - """ - An abusive or harassing piece of content - """ - ABUSE - - """ - A duplicated piece of content - """ - DUPLICATE - - """ - An irrelevant piece of content - """ - OFF_TOPIC - - """ - An outdated piece of content - """ - OUTDATED - - """ - The content has been resolved - """ - RESOLVED - - """ - A spammy piece of content - """ - SPAM -} - -""" -A repository contains the content for a project. -""" -type Repository implements Node & PackageOwner & ProjectOwner & RepositoryInfo & Starrable & Subscribable & UniformResourceLocatable { - """ - A list of users that can be assigned to issues in this repository. - """ - assignableUsers( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Filters users with query on user name and login - """ - query: String - ): UserConnection! - - """ - A list of branch protection rules for this repository. - """ - branchProtectionRules( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): BranchProtectionRuleConnection! - - """ - Returns the code of conduct for this repository - """ - codeOfConduct: CodeOfConduct - - """ - A list of collaborators associated with the repository. - """ - collaborators( - """ - Collaborators affiliation level with a repository. - """ - affiliation: CollaboratorAffiliation - - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Filters users with query on user name and login - """ - query: String - ): RepositoryCollaboratorConnection - - """ - A list of commit comments associated with the repository. - """ - commitComments( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): CommitCommentConnection! - - """ - Returns a list of contact links associated to the repository - """ - contactLinks: [RepositoryContactLink!] - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - - """ - The Ref associated with the repository's default branch. - """ - defaultBranchRef: Ref - - """ - Whether or not branches are automatically deleted when merged in this repository. - """ - deleteBranchOnMerge: Boolean! - - """ - A list of dependency manifests contained in the repository - """ - dependencyGraphManifests( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Cursor to paginate dependencies - """ - dependenciesAfter: String - - """ - Number of dependencies to fetch - """ - dependenciesFirst: Int - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Flag to scope to only manifests with dependencies - """ - withDependencies: Boolean - ): DependencyGraphManifestConnection @preview(toggledBy: "hawkgirl-preview") - - """ - A list of deploy keys that are on this repository. - """ - deployKeys( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): DeployKeyConnection! - - """ - Deployments associated with the repository - """ - deployments( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Environments to list deployments for - """ - environments: [String!] - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for deployments returned from the connection. - """ - orderBy: DeploymentOrder = {field: CREATED_AT, direction: ASC} - ): DeploymentConnection! - - """ - The description of the repository. - """ - description: String - - """ - The description of the repository rendered to HTML. - """ - descriptionHTML: HTML! - - """ - The number of kilobytes this repository occupies on disk. - """ - diskUsage: Int - - """ - Returns how many forks there are of this repository in the whole network. - """ - forkCount: Int! - - """ - A list of direct forked repositories. - """ - forks( - """ - Array of viewer's affiliation options for repositories returned from the - connection. For example, OWNER will include only repositories that the - current viewer owns. - """ - affiliations: [RepositoryAffiliation] - - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - If non-null, filters repositories according to whether they have been locked - """ - isLocked: Boolean - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for repositories returned from the connection - """ - orderBy: RepositoryOrder - - """ - Array of owner's affiliation options for repositories returned from the - connection. For example, OWNER will include only repositories that the - organization or user being viewed owns. - """ - ownerAffiliations: [RepositoryAffiliation] = [OWNER, COLLABORATOR] - - """ - If non-null, filters repositories according to privacy - """ - privacy: RepositoryPrivacy - ): RepositoryConnection! - - """ - The funding links for this repository - """ - fundingLinks: [FundingLink!]! - - """ - Indicates if the repository has issues feature enabled. - """ - hasIssuesEnabled: Boolean! - - """ - Indicates if the repository has the Projects feature enabled. - """ - hasProjectsEnabled: Boolean! - - """ - Indicates if the repository has wiki feature enabled. - """ - hasWikiEnabled: Boolean! - - """ - The repository's URL. - """ - homepageUrl: URI - id: ID! - - """ - The interaction ability settings for this repository. - """ - interactionAbility: RepositoryInteractionAbility - - """ - Indicates if the repository is unmaintained. - """ - isArchived: Boolean! - - """ - Returns true if blank issue creation is allowed - """ - isBlankIssuesEnabled: Boolean! - - """ - Returns whether or not this repository disabled. - """ - isDisabled: Boolean! - - """ - Returns whether or not this repository is empty. - """ - isEmpty: Boolean! - - """ - Identifies if the repository is a fork. - """ - isFork: Boolean! - - """ - Indicates if a repository is either owned by an organization, or is a private fork of an organization repository. - """ - isInOrganization: Boolean! - - """ - Indicates if the repository has been locked or not. - """ - isLocked: Boolean! - - """ - Identifies if the repository is a mirror. - """ - isMirror: Boolean! - - """ - Identifies if the repository is private or internal. - """ - isPrivate: Boolean! - - """ - Returns true if this repository has a security policy - """ - isSecurityPolicyEnabled: Boolean - - """ - Identifies if the repository is a template that can be used to generate new repositories. - """ - isTemplate: Boolean! - - """ - Is this repository a user configuration repository? - """ - isUserConfigurationRepository: Boolean! - - """ - Returns a single issue from the current repository by number. - """ - issue( - """ - The number for the issue to be returned. - """ - number: Int! - ): Issue - - """ - Returns a single issue-like object from the current repository by number. - """ - issueOrPullRequest( - """ - The number for the issue to be returned. - """ - number: Int! - ): IssueOrPullRequest - - """ - Returns a list of issue templates associated to the repository - """ - issueTemplates: [IssueTemplate!] - - """ - A list of issues that have been opened in the repository. - """ - issues( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Filtering options for issues returned from the connection. - """ - filterBy: IssueFilters - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - A list of label names to filter the pull requests by. - """ - labels: [String!] - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for issues returned from the connection. - """ - orderBy: IssueOrder - - """ - A list of states to filter the issues by. - """ - states: [IssueState!] - ): IssueConnection! - - """ - Returns a single label by name - """ - label( - """ - Label name - """ - name: String! - ): Label - - """ - A list of labels associated with the repository. - """ - labels( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for labels returned from the connection. - """ - orderBy: LabelOrder = {field: CREATED_AT, direction: ASC} - - """ - If provided, searches labels by name and description. - """ - query: String - ): LabelConnection - - """ - A list containing a breakdown of the language composition of the repository. - """ - languages( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Order for connection - """ - orderBy: LanguageOrder - ): LanguageConnection - - """ - Get the latest release for the repository if one exists. - """ - latestRelease: Release - - """ - The license associated with the repository - """ - licenseInfo: License - - """ - The reason the repository has been locked. - """ - lockReason: RepositoryLockReason - - """ - A list of Users that can be mentioned in the context of the repository. - """ - mentionableUsers( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Filters users with query on user name and login - """ - query: String - ): UserConnection! - - """ - Whether or not PRs are merged with a merge commit on this repository. - """ - mergeCommitAllowed: Boolean! - - """ - Returns a single milestone from the current repository by number. - """ - milestone( - """ - The number for the milestone to be returned. - """ - number: Int! - ): Milestone - - """ - A list of milestones associated with the repository. - """ - milestones( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for milestones. - """ - orderBy: MilestoneOrder - - """ - Filters milestones with a query on the title - """ - query: String - - """ - Filter by the state of the milestones. - """ - states: [MilestoneState!] - ): MilestoneConnection - - """ - The repository's original mirror URL. - """ - mirrorUrl: URI - - """ - The name of the repository. - """ - name: String! - - """ - The repository's name with owner. - """ - nameWithOwner: String! - - """ - A Git object in the repository - """ - object( - """ - A Git revision expression suitable for rev-parse - """ - expression: String - - """ - The Git object ID - """ - oid: GitObjectID - ): GitObject - - """ - The image used to represent this repository in Open Graph data. - """ - openGraphImageUrl: URI! - - """ - The User owner of the repository. - """ - owner: RepositoryOwner! - - """ - A list of packages under the owner. - """ - packages( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Find packages by their names. - """ - names: [String] - - """ - Ordering of the returned packages. - """ - orderBy: PackageOrder = {field: CREATED_AT, direction: DESC} - - """ - Filter registry package by type. - """ - packageType: PackageType - - """ - Find packages in a repository by ID. - """ - repositoryId: ID - ): PackageConnection! - - """ - The repository parent, if this is a fork. - """ - parent: Repository - - """ - A list of pinned issues for this repository. - """ - pinnedIssues( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): PinnedIssueConnection - - """ - The primary language of the repository's code. - """ - primaryLanguage: Language - - """ - Find project by number. - """ - project( - """ - The project number to find. - """ - number: Int! - ): Project - - """ - A list of projects under the owner. - """ - projects( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for projects returned from the connection - """ - orderBy: ProjectOrder - - """ - Query to search projects by, currently only searching by name. - """ - search: String - - """ - A list of states to filter the projects by. - """ - states: [ProjectState!] - ): ProjectConnection! - - """ - The HTTP path listing the repository's projects - """ - projectsResourcePath: URI! - - """ - The HTTP URL listing the repository's projects - """ - projectsUrl: URI! - - """ - Returns a single pull request from the current repository by number. - """ - pullRequest( - """ - The number for the pull request to be returned. - """ - number: Int! - ): PullRequest - - """ - A list of pull requests that have been opened in the repository. - """ - pullRequests( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - The base ref name to filter the pull requests by. - """ - baseRefName: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - The head ref name to filter the pull requests by. - """ - headRefName: String - - """ - A list of label names to filter the pull requests by. - """ - labels: [String!] - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for pull requests returned from the connection. - """ - orderBy: IssueOrder - - """ - A list of states to filter the pull requests by. - """ - states: [PullRequestState!] - ): PullRequestConnection! - - """ - Identifies when the repository was last pushed to. - """ - pushedAt: DateTime - - """ - Whether or not rebase-merging is enabled on this repository. - """ - rebaseMergeAllowed: Boolean! - - """ - Fetch a given ref from the repository - """ - ref( - """ - The ref to retrieve. Fully qualified matches are checked in order - (`refs/heads/master`) before falling back onto checks for short name matches (`master`). - """ - qualifiedName: String! - ): Ref - - """ - Fetch a list of refs from the repository - """ - refs( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - DEPRECATED: use orderBy. The ordering direction. - """ - direction: OrderDirection - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for refs returned from the connection. - """ - orderBy: RefOrder - - """ - Filters refs with query on name - """ - query: String - - """ - A ref name prefix like `refs/heads/`, `refs/tags/`, etc. - """ - refPrefix: String! - ): RefConnection - - """ - Lookup a single release given various criteria. - """ - release( - """ - The name of the Tag the Release was created from - """ - tagName: String! - ): Release - - """ - List of releases which are dependent on this repository. - """ - releases( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Order for connection - """ - orderBy: ReleaseOrder - ): ReleaseConnection! - - """ - A list of applied repository-topic associations for this repository. - """ - repositoryTopics( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): RepositoryTopicConnection! - - """ - The HTTP path for this repository - """ - resourcePath: URI! - - """ - The security policy URL. - """ - securityPolicyUrl: URI - - """ - A description of the repository, rendered to HTML without any links in it. - """ - shortDescriptionHTML( - """ - How many characters to return. - """ - limit: Int = 200 - ): HTML! - - """ - Whether or not squash-merging is enabled on this repository. - """ - squashMergeAllowed: Boolean! - - """ - The SSH URL to clone this repository - """ - sshUrl: GitSSHRemote! - - """ - Returns a count of how many stargazers there are on this object - """ - stargazerCount: Int! - - """ - A list of users who have starred this starrable. - """ - stargazers( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Order for connection - """ - orderBy: StarOrder - ): StargazerConnection! - - """ - Returns a list of all submodules in this repository parsed from the - .gitmodules file as of the default branch's HEAD commit. - """ - submodules( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): SubmoduleConnection! - - """ - Temporary authentication token for cloning this repository. - """ - tempCloneToken: String - - """ - The repository from which this repository was generated, if any. - """ - templateRepository: Repository - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! - - """ - The HTTP URL for this repository - """ - url: URI! - - """ - Whether this repository has a custom image to use with Open Graph as opposed to being represented by the owner's avatar. - """ - usesCustomOpenGraphImage: Boolean! - - """ - Indicates whether the viewer has admin permissions on this repository. - """ - viewerCanAdminister: Boolean! - - """ - Can the current viewer create new projects on this owner. - """ - viewerCanCreateProjects: Boolean! - - """ - Check if the viewer is able to change their subscription status for the repository. - """ - viewerCanSubscribe: Boolean! - - """ - Indicates whether the viewer can update the topics of this repository. - """ - viewerCanUpdateTopics: Boolean! - - """ - The last commit email for the viewer. - """ - viewerDefaultCommitEmail: String - - """ - The last used merge method by the viewer or the default for the repository. - """ - viewerDefaultMergeMethod: PullRequestMergeMethod! - - """ - Returns a boolean indicating whether the viewing user has starred this starrable. - """ - viewerHasStarred: Boolean! - - """ - The users permission level on the repository. Will return null if authenticated as an GitHub App. - """ - viewerPermission: RepositoryPermission - - """ - A list of emails this viewer can commit with. - """ - viewerPossibleCommitEmails: [String!] - - """ - Identifies if the viewer is watching, not watching, or ignoring the subscribable entity. - """ - viewerSubscription: SubscriptionState - - """ - A list of vulnerability alerts that are on this repository. - """ - vulnerabilityAlerts( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): RepositoryVulnerabilityAlertConnection - - """ - A list of users watching the repository. - """ - watchers( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): UserConnection! -} - -""" -The affiliation of a user to a repository -""" -enum RepositoryAffiliation { - """ - Repositories that the user has been added to as a collaborator. - """ - COLLABORATOR - - """ - Repositories that the user has access to through being a member of an - organization. This includes every repository on every team that the user is on. - """ - ORGANIZATION_MEMBER - - """ - Repositories that are owned by the authenticated user. - """ - OWNER -} - -""" -Metadata for an audit entry with action repo.* -""" -interface RepositoryAuditEntryData { - """ - The repository associated with the action - """ - repository: Repository - - """ - The name of the repository - """ - repositoryName: String - - """ - The HTTP path for the repository - """ - repositoryResourcePath: URI - - """ - The HTTP URL for the repository - """ - repositoryUrl: URI -} - -""" -The connection type for User. -""" -type RepositoryCollaboratorConnection { - """ - A list of edges. - """ - edges: [RepositoryCollaboratorEdge] - - """ - A list of nodes. - """ - nodes: [User] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -Represents a user who is a collaborator of a repository. -""" -type RepositoryCollaboratorEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - node: User! - - """ - The permission the user has on the repository. - """ - permission: RepositoryPermission! - - """ - A list of sources for the user's access to the repository. - """ - permissionSources: [PermissionSource!] -} - -""" -A list of repositories owned by the subject. -""" -type RepositoryConnection { - """ - A list of edges. - """ - edges: [RepositoryEdge] - - """ - A list of nodes. - """ - nodes: [Repository] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! - - """ - The total size in kilobytes of all repositories in the connection. - """ - totalDiskUsage: Int! -} - -""" -A repository contact link. -""" -type RepositoryContactLink { - """ - The contact link purpose. - """ - about: String! - - """ - The contact link name. - """ - name: String! - - """ - The contact link URL. - """ - url: URI! -} - -""" -The reason a repository is listed as 'contributed'. -""" -enum RepositoryContributionType { - """ - Created a commit - """ - COMMIT - - """ - Created an issue - """ - ISSUE - - """ - Created a pull request - """ - PULL_REQUEST - - """ - Reviewed a pull request - """ - PULL_REQUEST_REVIEW - - """ - Created the repository - """ - REPOSITORY -} - -""" -An edge in a connection. -""" -type RepositoryEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: Repository -} - -""" -A subset of repository info. -""" -interface RepositoryInfo { - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - The description of the repository. - """ - description: String - - """ - The description of the repository rendered to HTML. - """ - descriptionHTML: HTML! - - """ - Returns how many forks there are of this repository in the whole network. - """ - forkCount: Int! - - """ - Indicates if the repository has issues feature enabled. - """ - hasIssuesEnabled: Boolean! - - """ - Indicates if the repository has the Projects feature enabled. - """ - hasProjectsEnabled: Boolean! - - """ - Indicates if the repository has wiki feature enabled. - """ - hasWikiEnabled: Boolean! - - """ - The repository's URL. - """ - homepageUrl: URI - - """ - Indicates if the repository is unmaintained. - """ - isArchived: Boolean! - - """ - Identifies if the repository is a fork. - """ - isFork: Boolean! - - """ - Indicates if a repository is either owned by an organization, or is a private fork of an organization repository. - """ - isInOrganization: Boolean! - - """ - Indicates if the repository has been locked or not. - """ - isLocked: Boolean! - - """ - Identifies if the repository is a mirror. - """ - isMirror: Boolean! - - """ - Identifies if the repository is private or internal. - """ - isPrivate: Boolean! - - """ - Identifies if the repository is a template that can be used to generate new repositories. - """ - isTemplate: Boolean! - - """ - The license associated with the repository - """ - licenseInfo: License - - """ - The reason the repository has been locked. - """ - lockReason: RepositoryLockReason - - """ - The repository's original mirror URL. - """ - mirrorUrl: URI - - """ - The name of the repository. - """ - name: String! - - """ - The repository's name with owner. - """ - nameWithOwner: String! - - """ - The image used to represent this repository in Open Graph data. - """ - openGraphImageUrl: URI! - - """ - The User owner of the repository. - """ - owner: RepositoryOwner! - - """ - Identifies when the repository was last pushed to. - """ - pushedAt: DateTime - - """ - The HTTP path for this repository - """ - resourcePath: URI! - - """ - A description of the repository, rendered to HTML without any links in it. - """ - shortDescriptionHTML( - """ - How many characters to return. - """ - limit: Int = 200 - ): HTML! - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! - - """ - The HTTP URL for this repository - """ - url: URI! - - """ - Whether this repository has a custom image to use with Open Graph as opposed to being represented by the owner's avatar. - """ - usesCustomOpenGraphImage: Boolean! -} - -""" -Repository interaction limit that applies to this object. -""" -type RepositoryInteractionAbility { - """ - The time the currently active limit expires. - """ - expiresAt: DateTime - - """ - The current limit that is enabled on this object. - """ - limit: RepositoryInteractionLimit! - - """ - The origin of the currently active interaction limit. - """ - origin: RepositoryInteractionLimitOrigin! -} - -""" -A repository interaction limit. -""" -enum RepositoryInteractionLimit { - """ - Users that are not collaborators will not be able to interact with the repository. - """ - COLLABORATORS_ONLY - - """ - Users that have not previously committed to a repository’s default branch will be unable to interact with the repository. - """ - CONTRIBUTORS_ONLY - - """ - Users that have recently created their account will be unable to interact with the repository. - """ - EXISTING_USERS - - """ - No interaction limits are enabled. - """ - NO_LIMIT -} - -""" -The length for a repository interaction limit to be enabled for. -""" -enum RepositoryInteractionLimitExpiry { - """ - The interaction limit will expire after 1 day. - """ - ONE_DAY - - """ - The interaction limit will expire after 1 month. - """ - ONE_MONTH - - """ - The interaction limit will expire after 1 week. - """ - ONE_WEEK - - """ - The interaction limit will expire after 6 months. - """ - SIX_MONTHS - - """ - The interaction limit will expire after 3 days. - """ - THREE_DAYS -} - -""" -Indicates where an interaction limit is configured. -""" -enum RepositoryInteractionLimitOrigin { - """ - A limit that is configured at the organization level. - """ - ORGANIZATION - - """ - A limit that is configured at the repository level. - """ - REPOSITORY - - """ - A limit that is configured at the user-wide level. - """ - USER -} - -""" -An invitation for a user to be added to a repository. -""" -type RepositoryInvitation implements Node { - """ - The email address that received the invitation. - """ - email: String - id: ID! - - """ - The user who received the invitation. - """ - invitee: User - - """ - The user who created the invitation. - """ - inviter: User! - - """ - The permalink for this repository invitation. - """ - permalink: URI! - - """ - The permission granted on this repository by this invitation. - """ - permission: RepositoryPermission! - - """ - The Repository the user is invited to. - """ - repository: RepositoryInfo -} - -""" -The connection type for RepositoryInvitation. -""" -type RepositoryInvitationConnection { - """ - A list of edges. - """ - edges: [RepositoryInvitationEdge] - - """ - A list of nodes. - """ - nodes: [RepositoryInvitation] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type RepositoryInvitationEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: RepositoryInvitation -} - -""" -Ordering options for repository invitation connections. -""" -input RepositoryInvitationOrder { - """ - The ordering direction. - """ - direction: OrderDirection! - - """ - The field to order repository invitations by. - """ - field: RepositoryInvitationOrderField! -} - -""" -Properties by which repository invitation connections can be ordered. -""" -enum RepositoryInvitationOrderField { - """ - Order repository invitations by creation time - """ - CREATED_AT - - """ - Order repository invitations by invitee login - """ - INVITEE_LOGIN @deprecated(reason: "`INVITEE_LOGIN` is no longer a valid field value. Repository invitations can now be associated with an email, not only an invitee. Removal on 2020-10-01 UTC.") -} - -""" -The possible reasons a given repository could be in a locked state. -""" -enum RepositoryLockReason { - """ - The repository is locked due to a billing related reason. - """ - BILLING - - """ - The repository is locked due to a migration. - """ - MIGRATING - - """ - The repository is locked due to a move. - """ - MOVING - - """ - The repository is locked due to a rename. - """ - RENAME -} - -""" -Represents a object that belongs to a repository. -""" -interface RepositoryNode { - """ - The repository associated with this node. - """ - repository: Repository! -} - -""" -Ordering options for repository connections -""" -input RepositoryOrder { - """ - The ordering direction. - """ - direction: OrderDirection! - - """ - The field to order repositories by. - """ - field: RepositoryOrderField! -} - -""" -Properties by which repository connections can be ordered. -""" -enum RepositoryOrderField { - """ - Order repositories by creation time - """ - CREATED_AT - - """ - Order repositories by name - """ - NAME - - """ - Order repositories by push time - """ - PUSHED_AT - - """ - Order repositories by number of stargazers - """ - STARGAZERS - - """ - Order repositories by update time - """ - UPDATED_AT -} - -""" -Represents an owner of a Repository. -""" -interface RepositoryOwner { - """ - A URL pointing to the owner's public avatar. - """ - avatarUrl( - """ - The size of the resulting square image. - """ - size: Int - ): URI! - id: ID! - - """ - The username used to login. - """ - login: String! - - """ - A list of repositories that the user owns. - """ - repositories( - """ - Array of viewer's affiliation options for repositories returned from the - connection. For example, OWNER will include only repositories that the - current viewer owns. - """ - affiliations: [RepositoryAffiliation] - - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - If non-null, filters repositories according to whether they are forks of another repository - """ - isFork: Boolean - - """ - If non-null, filters repositories according to whether they have been locked - """ - isLocked: Boolean - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for repositories returned from the connection - """ - orderBy: RepositoryOrder - - """ - Array of owner's affiliation options for repositories returned from the - connection. For example, OWNER will include only repositories that the - organization or user being viewed owns. - """ - ownerAffiliations: [RepositoryAffiliation] = [OWNER, COLLABORATOR] - - """ - If non-null, filters repositories according to privacy - """ - privacy: RepositoryPrivacy - ): RepositoryConnection! - - """ - Find Repository. - """ - repository( - """ - Name of Repository to find. - """ - name: String! - ): Repository - - """ - The HTTP URL for the owner. - """ - resourcePath: URI! - - """ - The HTTP URL for the owner. - """ - url: URI! -} - -""" -The access level to a repository -""" -enum RepositoryPermission { - """ - Can read, clone, and push to this repository. Can also manage issues, pull - requests, and repository settings, including adding collaborators - """ - ADMIN - - """ - Can read, clone, and push to this repository. They can also manage issues, pull requests, and some repository settings - """ - MAINTAIN - - """ - Can read and clone this repository. Can also open and comment on issues and pull requests - """ - READ - - """ - Can read and clone this repository. Can also manage issues and pull requests - """ - TRIAGE - - """ - Can read, clone, and push to this repository. Can also manage issues and pull requests - """ - WRITE -} - -""" -The privacy of a repository -""" -enum RepositoryPrivacy { - """ - Private - """ - PRIVATE - - """ - Public - """ - PUBLIC -} - -""" -A repository-topic connects a repository to a topic. -""" -type RepositoryTopic implements Node & UniformResourceLocatable { - id: ID! - - """ - The HTTP path for this repository-topic. - """ - resourcePath: URI! - - """ - The topic. - """ - topic: Topic! - - """ - The HTTP URL for this repository-topic. - """ - url: URI! -} - -""" -The connection type for RepositoryTopic. -""" -type RepositoryTopicConnection { - """ - A list of edges. - """ - edges: [RepositoryTopicEdge] - - """ - A list of nodes. - """ - nodes: [RepositoryTopic] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type RepositoryTopicEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: RepositoryTopic -} - -""" -The repository's visibility level. -""" -enum RepositoryVisibility { - """ - The repository is visible only to users in the same business. - """ - INTERNAL - - """ - The repository is visible only to those with explicit access. - """ - PRIVATE - - """ - The repository is visible to everyone. - """ - PUBLIC -} - -""" -Audit log entry for a repository_visibility_change.disable event. -""" -type RepositoryVisibilityChangeDisableAuditEntry implements AuditEntry & EnterpriseAuditEntryData & Node & OrganizationAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - - """ - The HTTP path for this enterprise. - """ - enterpriseResourcePath: URI - - """ - The slug of the enterprise. - """ - enterpriseSlug: String - - """ - The HTTP URL for this enterprise. - """ - enterpriseUrl: URI - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a repository_visibility_change.enable event. -""" -type RepositoryVisibilityChangeEnableAuditEntry implements AuditEntry & EnterpriseAuditEntryData & Node & OrganizationAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - - """ - The HTTP path for this enterprise. - """ - enterpriseResourcePath: URI - - """ - The slug of the enterprise. - """ - enterpriseSlug: String - - """ - The HTTP URL for this enterprise. - """ - enterpriseUrl: URI - id: ID! - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -A alert for a repository with an affected vulnerability. -""" -type RepositoryVulnerabilityAlert implements Node & RepositoryNode { - """ - When was the alert created? - """ - createdAt: DateTime! - - """ - The reason the alert was dismissed - """ - dismissReason: String - - """ - When was the alert dismissed? - """ - dismissedAt: DateTime - - """ - The user who dismissed the alert - """ - dismisser: User - id: ID! - - """ - The associated repository - """ - repository: Repository! - - """ - The associated security advisory - """ - securityAdvisory: SecurityAdvisory - - """ - The associated security vulnerability - """ - securityVulnerability: SecurityVulnerability - - """ - The vulnerable manifest filename - """ - vulnerableManifestFilename: String! - - """ - The vulnerable manifest path - """ - vulnerableManifestPath: String! - - """ - The vulnerable requirements - """ - vulnerableRequirements: String -} - -""" -The connection type for RepositoryVulnerabilityAlert. -""" -type RepositoryVulnerabilityAlertConnection { - """ - A list of edges. - """ - edges: [RepositoryVulnerabilityAlertEdge] - - """ - A list of nodes. - """ - nodes: [RepositoryVulnerabilityAlert] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type RepositoryVulnerabilityAlertEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: RepositoryVulnerabilityAlert -} - -""" -Autogenerated input type of RequestReviews -""" -input RequestReviewsInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The Node ID of the pull request to modify. - """ - pullRequestId: ID! @possibleTypes(concreteTypes: ["PullRequest"]) - - """ - The Node IDs of the team to request. - """ - teamIds: [ID!] @possibleTypes(concreteTypes: ["Team"]) - - """ - Add users to the set rather than replace. - """ - union: Boolean - - """ - The Node IDs of the user to request. - """ - userIds: [ID!] @possibleTypes(concreteTypes: ["User"]) -} - -""" -Autogenerated return type of RequestReviews -""" -type RequestReviewsPayload { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The pull request that is getting requests. - """ - pullRequest: PullRequest - - """ - The edge from the pull request to the requested reviewers. - """ - requestedReviewersEdge: UserEdge -} - -""" -The possible states that can be requested when creating a check run. -""" -enum RequestableCheckStatusState { - """ - The check suite or run has been completed. - """ - COMPLETED - - """ - The check suite or run is in progress. - """ - IN_PROGRESS - - """ - The check suite or run has been queued. - """ - QUEUED - - """ - The check suite or run is in waiting state. - """ - WAITING -} - -""" -Types that can be requested reviewers. -""" -union RequestedReviewer = Mannequin | Team | User - -""" -Represents a type that can be required by a pull request for merging. -""" -interface RequirableByPullRequest { - """ - Whether this is required to pass before merging for a specific pull request. - """ - isRequired( - """ - The id of the pull request this is required for - """ - pullRequestId: ID - - """ - The number of the pull request this is required for - """ - pullRequestNumber: Int - ): Boolean! -} - -""" -Autogenerated input type of RerequestCheckSuite -""" -input RerequestCheckSuiteInput { - """ - The Node ID of the check suite. - """ - checkSuiteId: ID! @possibleTypes(concreteTypes: ["CheckSuite"]) - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The Node ID of the repository. - """ - repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) -} - -""" -Autogenerated return type of RerequestCheckSuite -""" -type RerequestCheckSuitePayload { - """ - The requested check suite. - """ - checkSuite: CheckSuite - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String -} - -""" -Autogenerated input type of ResolveReviewThread -""" -input ResolveReviewThreadInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the thread to resolve - """ - threadId: ID! @possibleTypes(concreteTypes: ["PullRequestReviewThread"]) -} - -""" -Autogenerated return type of ResolveReviewThread -""" -type ResolveReviewThreadPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The thread to resolve. - """ - thread: PullRequestReviewThread -} - -""" -Represents a private contribution a user made on GitHub. -""" -type RestrictedContribution implements Contribution { - """ - Whether this contribution is associated with a record you do not have access to. For - example, your own 'first issue' contribution may have been made on a repository you can no - longer access. - """ - isRestricted: Boolean! - - """ - When this contribution was made. - """ - occurredAt: DateTime! - - """ - The HTTP path for this contribution. - """ - resourcePath: URI! - - """ - The HTTP URL for this contribution. - """ - url: URI! - - """ - The user who made this contribution. - """ - user: User! -} - -""" -A team or user who has the ability to dismiss a review on a protected branch. -""" -type ReviewDismissalAllowance implements Node { - """ - The actor that can dismiss. - """ - actor: ReviewDismissalAllowanceActor - - """ - Identifies the branch protection rule associated with the allowed user or team. - """ - branchProtectionRule: BranchProtectionRule - id: ID! -} - -""" -Types that can be an actor. -""" -union ReviewDismissalAllowanceActor = Team | User - -""" -The connection type for ReviewDismissalAllowance. -""" -type ReviewDismissalAllowanceConnection { - """ - A list of edges. - """ - edges: [ReviewDismissalAllowanceEdge] - - """ - A list of nodes. - """ - nodes: [ReviewDismissalAllowance] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type ReviewDismissalAllowanceEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: ReviewDismissalAllowance -} - -""" -Represents a 'review_dismissed' event on a given issue or pull request. -""" -type ReviewDismissedEvent implements Node & UniformResourceLocatable { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - - """ - Identifies the optional message associated with the 'review_dismissed' event. - """ - dismissalMessage: String - - """ - Identifies the optional message associated with the event, rendered to HTML. - """ - dismissalMessageHTML: String - id: ID! - - """ - Identifies the previous state of the review with the 'review_dismissed' event. - """ - previousReviewState: PullRequestReviewState! - - """ - PullRequest referenced by event. - """ - pullRequest: PullRequest! - - """ - Identifies the commit which caused the review to become stale. - """ - pullRequestCommit: PullRequestCommit - - """ - The HTTP path for this review dismissed event. - """ - resourcePath: URI! - - """ - Identifies the review associated with the 'review_dismissed' event. - """ - review: PullRequestReview - - """ - The HTTP URL for this review dismissed event. - """ - url: URI! -} - -""" -A request for a user to review a pull request. -""" -type ReviewRequest implements Node { - """ - Whether this request was created for a code owner - """ - asCodeOwner: Boolean! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - id: ID! - - """ - Identifies the pull request associated with this review request. - """ - pullRequest: PullRequest! - - """ - The reviewer that is requested. - """ - requestedReviewer: RequestedReviewer -} - -""" -The connection type for ReviewRequest. -""" -type ReviewRequestConnection { - """ - A list of edges. - """ - edges: [ReviewRequestEdge] - - """ - A list of nodes. - """ - nodes: [ReviewRequest] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type ReviewRequestEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: ReviewRequest -} - -""" -Represents an 'review_request_removed' event on a given pull request. -""" -type ReviewRequestRemovedEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! - - """ - PullRequest referenced by event. - """ - pullRequest: PullRequest! - - """ - Identifies the reviewer whose review request was removed. - """ - requestedReviewer: RequestedReviewer -} - -""" -Represents an 'review_requested' event on a given pull request. -""" -type ReviewRequestedEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! - - """ - PullRequest referenced by event. - """ - pullRequest: PullRequest! - - """ - Identifies the reviewer whose review was requested. - """ - requestedReviewer: RequestedReviewer -} - -""" -A hovercard context with a message describing the current code review state of the pull -request. -""" -type ReviewStatusHovercardContext implements HovercardContext { - """ - A string describing this context - """ - message: String! - - """ - An octicon to accompany this context - """ - octicon: String! - - """ - The current status of the pull request with respect to code review. - """ - reviewDecision: PullRequestReviewDecision -} - -""" -The possible digest algorithms used to sign SAML requests for an identity provider. -""" -enum SamlDigestAlgorithm { - """ - SHA1 - """ - SHA1 - - """ - SHA256 - """ - SHA256 - - """ - SHA384 - """ - SHA384 - - """ - SHA512 - """ - SHA512 -} - -""" -The possible signature algorithms used to sign SAML requests for a Identity Provider. -""" -enum SamlSignatureAlgorithm { - """ - RSA-SHA1 - """ - RSA_SHA1 - - """ - RSA-SHA256 - """ - RSA_SHA256 - - """ - RSA-SHA384 - """ - RSA_SHA384 - - """ - RSA-SHA512 - """ - RSA_SHA512 -} - -""" -A Saved Reply is text a user can use to reply quickly. -""" -type SavedReply implements Node { - """ - The body of the saved reply. - """ - body: String! - - """ - The saved reply body rendered to HTML. - """ - bodyHTML: HTML! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - id: ID! - - """ - The title of the saved reply. - """ - title: String! - - """ - The user that saved this reply. - """ - user: Actor -} - -""" -The connection type for SavedReply. -""" -type SavedReplyConnection { - """ - A list of edges. - """ - edges: [SavedReplyEdge] - - """ - A list of nodes. - """ - nodes: [SavedReply] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type SavedReplyEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: SavedReply -} - -""" -Ordering options for saved reply connections. -""" -input SavedReplyOrder { - """ - The ordering direction. - """ - direction: OrderDirection! - - """ - The field to order saved replies by. - """ - field: SavedReplyOrderField! -} - -""" -Properties by which saved reply connections can be ordered. -""" -enum SavedReplyOrderField { - """ - Order saved reply by when they were updated. - """ - UPDATED_AT -} - -""" -The results of a search. -""" -union SearchResultItem = App | Issue | MarketplaceListing | Organization | PullRequest | Repository | User - -""" -A list of results that matched against a search query. -""" -type SearchResultItemConnection { - """ - The number of pieces of code that matched the search query. - """ - codeCount: Int! - - """ - A list of edges. - """ - edges: [SearchResultItemEdge] - - """ - The number of issues that matched the search query. - """ - issueCount: Int! - - """ - A list of nodes. - """ - nodes: [SearchResultItem] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - The number of repositories that matched the search query. - """ - repositoryCount: Int! - - """ - The number of users that matched the search query. - """ - userCount: Int! - - """ - The number of wiki pages that matched the search query. - """ - wikiCount: Int! -} - -""" -An edge in a connection. -""" -type SearchResultItemEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: SearchResultItem - - """ - Text matches on the result found. - """ - textMatches: [TextMatch] -} - -""" -Represents the individual results of a search. -""" -enum SearchType { - """ - Returns results matching issues in repositories. - """ - ISSUE - - """ - Returns results matching repositories. - """ - REPOSITORY - - """ - Returns results matching users and organizations on GitHub. - """ - USER -} - -""" -A GitHub Security Advisory -""" -type SecurityAdvisory implements Node { - """ - The CVSS associated with this advisory - """ - cvss: CVSS! - - """ - CWEs associated with this Advisory - """ - cwes( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): CWEConnection! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - - """ - This is a long plaintext description of the advisory - """ - description: String! - - """ - The GitHub Security Advisory ID - """ - ghsaId: String! - id: ID! - - """ - A list of identifiers for this advisory - """ - identifiers: [SecurityAdvisoryIdentifier!]! - - """ - The permalink for the advisory's dependabot alerts page - """ - notificationsPermalink: URI - - """ - The organization that originated the advisory - """ - origin: String! - - """ - The permalink for the advisory - """ - permalink: URI - - """ - When the advisory was published - """ - publishedAt: DateTime! - - """ - A list of references for this advisory - """ - references: [SecurityAdvisoryReference!]! - - """ - The severity of the advisory - """ - severity: SecurityAdvisorySeverity! - - """ - A short plaintext summary of the advisory - """ - summary: String! - - """ - When the advisory was last updated - """ - updatedAt: DateTime! - - """ - Vulnerabilities associated with this Advisory - """ - vulnerabilities( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - An ecosystem to filter vulnerabilities by. - """ - ecosystem: SecurityAdvisoryEcosystem - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for the returned topics. - """ - orderBy: SecurityVulnerabilityOrder = {field: UPDATED_AT, direction: DESC} - - """ - A package name to filter vulnerabilities by. - """ - package: String - - """ - A list of severities to filter vulnerabilities by. - """ - severities: [SecurityAdvisorySeverity!] - ): SecurityVulnerabilityConnection! - - """ - When the advisory was withdrawn, if it has been withdrawn - """ - withdrawnAt: DateTime -} - -""" -The connection type for SecurityAdvisory. -""" -type SecurityAdvisoryConnection { - """ - A list of edges. - """ - edges: [SecurityAdvisoryEdge] - - """ - A list of nodes. - """ - nodes: [SecurityAdvisory] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -The possible ecosystems of a security vulnerability's package. -""" -enum SecurityAdvisoryEcosystem { - """ - PHP packages hosted at packagist.org - """ - COMPOSER - - """ - Java artifacts hosted at the Maven central repository - """ - MAVEN - - """ - JavaScript packages hosted at npmjs.com - """ - NPM - - """ - .NET packages hosted at the NuGet Gallery - """ - NUGET - - """ - Python packages hosted at PyPI.org - """ - PIP - - """ - Ruby gems hosted at RubyGems.org - """ - RUBYGEMS -} - -""" -An edge in a connection. -""" -type SecurityAdvisoryEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: SecurityAdvisory -} - -""" -A GitHub Security Advisory Identifier -""" -type SecurityAdvisoryIdentifier { - """ - The identifier type, e.g. GHSA, CVE - """ - type: String! - - """ - The identifier - """ - value: String! -} - -""" -An advisory identifier to filter results on. -""" -input SecurityAdvisoryIdentifierFilter { - """ - The identifier type. - """ - type: SecurityAdvisoryIdentifierType! - - """ - The identifier string. Supports exact or partial matching. - """ - value: String! -} - -""" -Identifier formats available for advisories. -""" -enum SecurityAdvisoryIdentifierType { - """ - Common Vulnerabilities and Exposures Identifier. - """ - CVE - - """ - GitHub Security Advisory ID. - """ - GHSA -} - -""" -Ordering options for security advisory connections -""" -input SecurityAdvisoryOrder { - """ - The ordering direction. - """ - direction: OrderDirection! - - """ - The field to order security advisories by. - """ - field: SecurityAdvisoryOrderField! -} - -""" -Properties by which security advisory connections can be ordered. -""" -enum SecurityAdvisoryOrderField { - """ - Order advisories by publication time - """ - PUBLISHED_AT - - """ - Order advisories by update time - """ - UPDATED_AT -} - -""" -An individual package -""" -type SecurityAdvisoryPackage { - """ - The ecosystem the package belongs to, e.g. RUBYGEMS, NPM - """ - ecosystem: SecurityAdvisoryEcosystem! - - """ - The package name - """ - name: String! -} - -""" -An individual package version -""" -type SecurityAdvisoryPackageVersion { - """ - The package name or version - """ - identifier: String! -} - -""" -A GitHub Security Advisory Reference -""" -type SecurityAdvisoryReference { - """ - A publicly accessible reference - """ - url: URI! -} - -""" -Severity of the vulnerability. -""" -enum SecurityAdvisorySeverity { - """ - Critical. - """ - CRITICAL - - """ - High. - """ - HIGH - - """ - Low. - """ - LOW - - """ - Moderate. - """ - MODERATE -} - -""" -An individual vulnerability within an Advisory -""" -type SecurityVulnerability { - """ - The Advisory associated with this Vulnerability - """ - advisory: SecurityAdvisory! - - """ - The first version containing a fix for the vulnerability - """ - firstPatchedVersion: SecurityAdvisoryPackageVersion - - """ - A description of the vulnerable package - """ - package: SecurityAdvisoryPackage! - - """ - The severity of the vulnerability within this package - """ - severity: SecurityAdvisorySeverity! - - """ - When the vulnerability was last updated - """ - updatedAt: DateTime! - - """ - A string that describes the vulnerable package versions. - This string follows a basic syntax with a few forms. - + `= 0.2.0` denotes a single vulnerable version. - + `<= 1.0.8` denotes a version range up to and including the specified version - + `< 0.1.11` denotes a version range up to, but excluding, the specified version - + `>= 4.3.0, < 4.3.5` denotes a version range with a known minimum and maximum version. - + `>= 0.0.1` denotes a version range with a known minimum, but no known maximum - """ - vulnerableVersionRange: String! -} - -""" -The connection type for SecurityVulnerability. -""" -type SecurityVulnerabilityConnection { - """ - A list of edges. - """ - edges: [SecurityVulnerabilityEdge] - - """ - A list of nodes. - """ - nodes: [SecurityVulnerability] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type SecurityVulnerabilityEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: SecurityVulnerability -} - -""" -Ordering options for security vulnerability connections -""" -input SecurityVulnerabilityOrder { - """ - The ordering direction. - """ - direction: OrderDirection! - - """ - The field to order security vulnerabilities by. - """ - field: SecurityVulnerabilityOrderField! -} - -""" -Properties by which security vulnerability connections can be ordered. -""" -enum SecurityVulnerabilityOrderField { - """ - Order vulnerability by update time - """ - UPDATED_AT -} - -""" -Autogenerated input type of SetEnterpriseIdentityProvider -""" -input SetEnterpriseIdentityProviderInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The digest algorithm used to sign SAML requests for the identity provider. - """ - digestMethod: SamlDigestAlgorithm! - - """ - The ID of the enterprise on which to set an identity provider. - """ - enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) - - """ - The x509 certificate used by the identity provider to sign assertions and responses. - """ - idpCertificate: String! - - """ - The Issuer Entity ID for the SAML identity provider - """ - issuer: String - - """ - The signature algorithm used to sign SAML requests for the identity provider. - """ - signatureMethod: SamlSignatureAlgorithm! - - """ - The URL endpoint for the identity provider's SAML SSO. - """ - ssoUrl: URI! -} - -""" -Autogenerated return type of SetEnterpriseIdentityProvider -""" -type SetEnterpriseIdentityProviderPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The identity provider for the enterprise. - """ - identityProvider: EnterpriseIdentityProvider -} - -""" -Autogenerated input type of SetOrganizationInteractionLimit -""" -input SetOrganizationInteractionLimitInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - When this limit should expire. - """ - expiry: RepositoryInteractionLimitExpiry - - """ - The limit to set. - """ - limit: RepositoryInteractionLimit! - - """ - The ID of the organization to set a limit for. - """ - organizationId: ID! @possibleTypes(concreteTypes: ["Organization"]) -} - -""" -Autogenerated return type of SetOrganizationInteractionLimit -""" -type SetOrganizationInteractionLimitPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The organization that the interaction limit was set for. - """ - organization: Organization -} - -""" -Autogenerated input type of SetRepositoryInteractionLimit -""" -input SetRepositoryInteractionLimitInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - When this limit should expire. - """ - expiry: RepositoryInteractionLimitExpiry - - """ - The limit to set. - """ - limit: RepositoryInteractionLimit! - - """ - The ID of the repository to set a limit for. - """ - repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) -} - -""" -Autogenerated return type of SetRepositoryInteractionLimit -""" -type SetRepositoryInteractionLimitPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The repository that the interaction limit was set for. - """ - repository: Repository -} - -""" -Autogenerated input type of SetUserInteractionLimit -""" -input SetUserInteractionLimitInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - When this limit should expire. - """ - expiry: RepositoryInteractionLimitExpiry - - """ - The limit to set. - """ - limit: RepositoryInteractionLimit! - - """ - The ID of the user to set a limit for. - """ - userId: ID! @possibleTypes(concreteTypes: ["User"]) -} - -""" -Autogenerated return type of SetUserInteractionLimit -""" -type SetUserInteractionLimitPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The user that the interaction limit was set for. - """ - user: User -} - -""" -Represents an S/MIME signature on a Commit or Tag. -""" -type SmimeSignature implements GitSignature { - """ - Email used to sign this object. - """ - email: String! - - """ - True if the signature is valid and verified by GitHub. - """ - isValid: Boolean! - - """ - Payload for GPG signing object. Raw ODB object without the signature header. - """ - payload: String! - - """ - ASCII-armored signature header from object. - """ - signature: String! - - """ - GitHub user corresponding to the email signing this commit. - """ - signer: User - - """ - The state of this signature. `VALID` if signature is valid and verified by - GitHub, otherwise represents reason why signature is considered invalid. - """ - state: GitSignatureState! - - """ - True if the signature was made with GitHub's signing key. - """ - wasSignedByGitHub: Boolean! -} - -""" -Entities that can sponsor others via GitHub Sponsors -""" -union Sponsor = Organization | User - -""" -Entities that can be sponsored through GitHub Sponsors -""" -interface Sponsorable { - """ - True if this user/organization has a GitHub Sponsors listing. - """ - hasSponsorsListing: Boolean! - - """ - Check if the given account is sponsoring this user/organization. - """ - isSponsoredBy( - """ - The target account's login. - """ - accountLogin: String! - ): Boolean! - - """ - True if the viewer is sponsored by this user/organization. - """ - isSponsoringViewer: Boolean! - - """ - The GitHub Sponsors listing for this user or organization. - """ - sponsorsListing: SponsorsListing - - """ - The viewer's sponsorship of this entity. - """ - sponsorshipForViewerAsSponsor: Sponsorship - - """ - This object's sponsorships as the maintainer. - """ - sponsorshipsAsMaintainer( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Whether or not to include private sponsorships in the result set - """ - includePrivate: Boolean = false - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for sponsorships returned from this connection. If left - blank, the sponsorships will be ordered based on relevancy to the viewer. - """ - orderBy: SponsorshipOrder - ): SponsorshipConnection! - - """ - This object's sponsorships as the sponsor. - """ - sponsorshipsAsSponsor( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for sponsorships returned from this connection. If left - blank, the sponsorships will be ordered based on relevancy to the viewer. - """ - orderBy: SponsorshipOrder - ): SponsorshipConnection! - - """ - Whether or not the viewer is able to sponsor this user/organization. - """ - viewerCanSponsor: Boolean! - - """ - True if the viewer is sponsoring this user/organization. - """ - viewerIsSponsoring: Boolean! -} - -""" -Entities that can be sponsored via GitHub Sponsors -""" -union SponsorableItem = Organization | User - -""" -The connection type for SponsorableItem. -""" -type SponsorableItemConnection { - """ - A list of edges. - """ - edges: [SponsorableItemEdge] - - """ - A list of nodes. - """ - nodes: [SponsorableItem] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type SponsorableItemEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: SponsorableItem -} - -""" -Ordering options for connections to get sponsorable entities for GitHub Sponsors. -""" -input SponsorableOrder { - """ - The ordering direction. - """ - direction: OrderDirection! - - """ - The field to order sponsorable entities by. - """ - field: SponsorableOrderField! -} - -""" -Properties by which sponsorable connections can be ordered. -""" -enum SponsorableOrderField { - """ - Order sponsorable entities by login (username). - """ - LOGIN -} - -""" -A goal associated with a GitHub Sponsors listing, representing a target the sponsored maintainer would like to attain. -""" -type SponsorsGoal { - """ - A description of the goal from the maintainer. - """ - description: String - - """ - What the objective of this goal is. - """ - kind: SponsorsGoalKind! - - """ - The percentage representing how complete this goal is, between 0-100. - """ - percentComplete: Int! - - """ - What the goal amount is. Represents a dollar amount for monthly sponsorship - amount goals. Represents a count of unique sponsors for total sponsors count goals. - """ - targetValue: Int! - - """ - A brief summary of the kind and target value of this goal. - """ - title: String! -} - -""" -The different kinds of goals a GitHub Sponsors member can have. -""" -enum SponsorsGoalKind { - """ - The goal is about getting a certain dollar amount from sponsorships each month. - """ - MONTHLY_SPONSORSHIP_AMOUNT - - """ - The goal is about reaching a certain number of sponsors. - """ - TOTAL_SPONSORS_COUNT -} - -""" -A GitHub Sponsors listing. -""" -type SponsorsListing implements Node { - """ - The current goal the maintainer is trying to reach with GitHub Sponsors, if any. - """ - activeGoal: SponsorsGoal - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - The full description of the listing. - """ - fullDescription: String! - - """ - The full description of the listing rendered to HTML. - """ - fullDescriptionHTML: HTML! - id: ID! - - """ - The listing's full name. - """ - name: String! - - """ - The short description of the listing. - """ - shortDescription: String! - - """ - The short name of the listing. - """ - slug: String! - - """ - The published tiers for this GitHub Sponsors listing. - """ - tiers( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for Sponsors tiers returned from the connection. - """ - orderBy: SponsorsTierOrder = {field: MONTHLY_PRICE_IN_CENTS, direction: ASC} - ): SponsorsTierConnection -} - -""" -A GitHub Sponsors tier associated with a GitHub Sponsors listing. -""" -type SponsorsTier implements Node { - """ - SponsorsTier information only visible to users that can administer the associated Sponsors listing. - """ - adminInfo: SponsorsTierAdminInfo - - """ - Get a different tier for this tier's maintainer that is at the same frequency - as this tier but with a lesser cost. Returns the published tier with the - monthly price closest to this tier's without going over. - """ - closestLesserValueTier: SponsorsTier - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - The description of the tier. - """ - description: String! - - """ - The tier description rendered to HTML - """ - descriptionHTML: HTML! - id: ID! - - """ - Whether this tier was chosen at checkout time by the sponsor rather than - defined ahead of time by the maintainer who manages the Sponsors listing. - """ - isCustomAmount: Boolean! - - """ - Whether this tier is only for use with one-time sponsorships. - """ - isOneTime: Boolean! - - """ - How much this tier costs per month in cents. - """ - monthlyPriceInCents: Int! - - """ - How much this tier costs per month in dollars. - """ - monthlyPriceInDollars: Int! - - """ - The name of the tier. - """ - name: String! - - """ - The sponsors listing that this tier belongs to. - """ - sponsorsListing: SponsorsListing! - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! -} - -""" -SponsorsTier information only visible to users that can administer the associated Sponsors listing. -""" -type SponsorsTierAdminInfo { - """ - The sponsorships associated with this tier. - """ - sponsorships( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Whether or not to include private sponsorships in the result set - """ - includePrivate: Boolean = false - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for sponsorships returned from this connection. If left - blank, the sponsorships will be ordered based on relevancy to the viewer. - """ - orderBy: SponsorshipOrder - ): SponsorshipConnection! -} - -""" -The connection type for SponsorsTier. -""" -type SponsorsTierConnection { - """ - A list of edges. - """ - edges: [SponsorsTierEdge] - - """ - A list of nodes. - """ - nodes: [SponsorsTier] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type SponsorsTierEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: SponsorsTier -} - -""" -Ordering options for Sponsors tiers connections. -""" -input SponsorsTierOrder { - """ - The ordering direction. - """ - direction: OrderDirection! - - """ - The field to order tiers by. - """ - field: SponsorsTierOrderField! -} - -""" -Properties by which Sponsors tiers connections can be ordered. -""" -enum SponsorsTierOrderField { - """ - Order tiers by creation time. - """ - CREATED_AT - - """ - Order tiers by their monthly price in cents - """ - MONTHLY_PRICE_IN_CENTS -} - -""" -A sponsorship relationship between a sponsor and a maintainer -""" -type Sponsorship implements Node { - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! - - """ - Whether this sponsorship represents a one-time payment versus a recurring sponsorship. - """ - isOneTimePayment: Boolean! - - """ - The entity that is being sponsored - """ - maintainer: User! @deprecated(reason: "`Sponsorship.maintainer` will be removed. Use `Sponsorship.sponsorable` instead. Removal on 2020-04-01 UTC.") - - """ - The privacy level for this sponsorship. - """ - privacyLevel: SponsorshipPrivacy! - - """ - The user that is sponsoring. Returns null if the sponsorship is private or if sponsor is not a user. - """ - sponsor: User @deprecated(reason: "`Sponsorship.sponsor` will be removed. Use `Sponsorship.sponsorEntity` instead. Removal on 2020-10-01 UTC.") - - """ - The user or organization that is sponsoring, if you have permission to view them. - """ - sponsorEntity: Sponsor - - """ - The entity that is being sponsored - """ - sponsorable: Sponsorable! - - """ - The associated sponsorship tier - """ - tier: SponsorsTier -} - -""" -The connection type for Sponsorship. -""" -type SponsorshipConnection { - """ - A list of edges. - """ - edges: [SponsorshipEdge] - - """ - A list of nodes. - """ - nodes: [Sponsorship] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type SponsorshipEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: Sponsorship -} - -""" -Ordering options for sponsorship connections. -""" -input SponsorshipOrder { - """ - The ordering direction. - """ - direction: OrderDirection! - - """ - The field to order sponsorship by. - """ - field: SponsorshipOrderField! -} - -""" -Properties by which sponsorship connections can be ordered. -""" -enum SponsorshipOrderField { - """ - Order sponsorship by creation time. - """ - CREATED_AT -} - -""" -The privacy of a sponsorship -""" -enum SponsorshipPrivacy { - """ - Private - """ - PRIVATE - - """ - Public - """ - PUBLIC -} - -""" -Ways in which star connections can be ordered. -""" -input StarOrder { - """ - The direction in which to order nodes. - """ - direction: OrderDirection! - - """ - The field in which to order nodes by. - """ - field: StarOrderField! -} - -""" -Properties by which star connections can be ordered. -""" -enum StarOrderField { - """ - Allows ordering a list of stars by when they were created. - """ - STARRED_AT -} - -""" -The connection type for User. -""" -type StargazerConnection { - """ - A list of edges. - """ - edges: [StargazerEdge] - - """ - A list of nodes. - """ - nodes: [User] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -Represents a user that's starred a repository. -""" -type StargazerEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - node: User! - - """ - Identifies when the item was starred. - """ - starredAt: DateTime! -} - -""" -Things that can be starred. -""" -interface Starrable { - id: ID! - - """ - Returns a count of how many stargazers there are on this object - """ - stargazerCount: Int! - - """ - A list of users who have starred this starrable. - """ - stargazers( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Order for connection - """ - orderBy: StarOrder - ): StargazerConnection! - - """ - Returns a boolean indicating whether the viewing user has starred this starrable. - """ - viewerHasStarred: Boolean! -} - -""" -The connection type for Repository. -""" -type StarredRepositoryConnection { - """ - A list of edges. - """ - edges: [StarredRepositoryEdge] - - """ - Is the list of stars for this user truncated? This is true for users that have many stars. - """ - isOverLimit: Boolean! - - """ - A list of nodes. - """ - nodes: [Repository] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -Represents a starred repository. -""" -type StarredRepositoryEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - node: Repository! - - """ - Identifies when the item was starred. - """ - starredAt: DateTime! -} - -""" -Represents a commit status. -""" -type Status implements Node { - """ - A list of status contexts and check runs for this commit. - """ - combinedContexts( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): StatusCheckRollupContextConnection! - - """ - The commit this status is attached to. - """ - commit: Commit - - """ - Looks up an individual status context by context name. - """ - context( - """ - The context name. - """ - name: String! - ): StatusContext - - """ - The individual status contexts for this commit. - """ - contexts: [StatusContext!]! - id: ID! - - """ - The combined commit status. - """ - state: StatusState! -} - -""" -Represents the rollup for both the check runs and status for a commit. -""" -type StatusCheckRollup implements Node { - """ - The commit the status and check runs are attached to. - """ - commit: Commit - - """ - A list of status contexts and check runs for this commit. - """ - contexts( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): StatusCheckRollupContextConnection! - id: ID! - - """ - The combined status for the commit. - """ - state: StatusState! -} - -""" -Types that can be inside a StatusCheckRollup context. -""" -union StatusCheckRollupContext = CheckRun | StatusContext - -""" -The connection type for StatusCheckRollupContext. -""" -type StatusCheckRollupContextConnection { - """ - A list of edges. - """ - edges: [StatusCheckRollupContextEdge] - - """ - A list of nodes. - """ - nodes: [StatusCheckRollupContext] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type StatusCheckRollupContextEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: StatusCheckRollupContext -} - -""" -Represents an individual commit status context -""" -type StatusContext implements Node & RequirableByPullRequest { - """ - The avatar of the OAuth application or the user that created the status - """ - avatarUrl( - """ - The size of the resulting square image. - """ - size: Int = 40 - ): URI - - """ - This commit this status context is attached to. - """ - commit: Commit - - """ - The name of this status context. - """ - context: String! - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - The actor who created this status context. - """ - creator: Actor - - """ - The description for this status context. - """ - description: String - id: ID! - - """ - Whether this is required to pass before merging for a specific pull request. - """ - isRequired( - """ - The id of the pull request this is required for - """ - pullRequestId: ID - - """ - The number of the pull request this is required for - """ - pullRequestNumber: Int - ): Boolean! - - """ - The state of this status context. - """ - state: StatusState! - - """ - The URL for this status context. - """ - targetUrl: URI -} - -""" -The possible commit status states. -""" -enum StatusState { - """ - Status is errored. - """ - ERROR - - """ - Status is expected. - """ - EXPECTED - - """ - Status is failing. - """ - FAILURE - - """ - Status is pending. - """ - PENDING - - """ - Status is successful. - """ - SUCCESS -} - -""" -Autogenerated input type of SubmitPullRequestReview -""" -input SubmitPullRequestReviewInput { - """ - The text field to set on the Pull Request Review. - """ - body: String - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The event to send to the Pull Request Review. - """ - event: PullRequestReviewEvent! - - """ - The Pull Request ID to submit any pending reviews. - """ - pullRequestId: ID @possibleTypes(concreteTypes: ["PullRequest"]) - - """ - The Pull Request Review ID to submit. - """ - pullRequestReviewId: ID @possibleTypes(concreteTypes: ["PullRequestReview"]) -} - -""" -Autogenerated return type of SubmitPullRequestReview -""" -type SubmitPullRequestReviewPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The submitted pull request review. - """ - pullRequestReview: PullRequestReview -} - -""" -A pointer to a repository at a specific revision embedded inside another repository. -""" -type Submodule { - """ - The branch of the upstream submodule for tracking updates - """ - branch: String - - """ - The git URL of the submodule repository - """ - gitUrl: URI! - - """ - The name of the submodule in .gitmodules - """ - name: String! - - """ - The path in the superproject that this submodule is located in - """ - path: String! - - """ - The commit revision of the subproject repository being tracked by the submodule - """ - subprojectCommitOid: GitObjectID -} - -""" -The connection type for Submodule. -""" -type SubmoduleConnection { - """ - A list of edges. - """ - edges: [SubmoduleEdge] - - """ - A list of nodes. - """ - nodes: [Submodule] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type SubmoduleEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: Submodule -} - -""" -Entities that can be subscribed to for web and email notifications. -""" -interface Subscribable { - id: ID! - - """ - Check if the viewer is able to change their subscription status for the repository. - """ - viewerCanSubscribe: Boolean! - - """ - Identifies if the viewer is watching, not watching, or ignoring the subscribable entity. - """ - viewerSubscription: SubscriptionState -} - -""" -Represents a 'subscribed' event on a given `Subscribable`. -""" -type SubscribedEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! - - """ - Object referenced by event. - """ - subscribable: Subscribable! -} - -""" -The possible states of a subscription. -""" -enum SubscriptionState { - """ - The User is never notified. - """ - IGNORED - - """ - The User is notified of all conversations. - """ - SUBSCRIBED - - """ - The User is only notified when participating or @mentioned. - """ - UNSUBSCRIBED -} - -""" -A suggestion to review a pull request based on a user's commit history and review comments. -""" -type SuggestedReviewer { - """ - Is this suggestion based on past commits? - """ - isAuthor: Boolean! - - """ - Is this suggestion based on past review comments? - """ - isCommenter: Boolean! - - """ - Identifies the user suggested to review the pull request. - """ - reviewer: User! -} - -""" -Represents a Git tag. -""" -type Tag implements GitObject & Node { - """ - An abbreviated version of the Git object ID - """ - abbreviatedOid: String! - - """ - The HTTP path for this Git object - """ - commitResourcePath: URI! - - """ - The HTTP URL for this Git object - """ - commitUrl: URI! - id: ID! - - """ - The Git tag message. - """ - message: String - - """ - The Git tag name. - """ - name: String! - - """ - The Git object ID - """ - oid: GitObjectID! - - """ - The Repository the Git object belongs to - """ - repository: Repository! - - """ - Details about the tag author. - """ - tagger: GitActor - - """ - The Git object the tag points to. - """ - target: GitObject! -} - -""" -A team of users in an organization. -""" -type Team implements MemberStatusable & Node & Subscribable { - """ - A list of teams that are ancestors of this team. - """ - ancestors( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): TeamConnection! - - """ - A URL pointing to the team's avatar. - """ - avatarUrl( - """ - The size in pixels of the resulting square image. - """ - size: Int = 400 - ): URI - - """ - List of child teams belonging to this team - """ - childTeams( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Whether to list immediate child teams or all descendant child teams. - """ - immediateOnly: Boolean = true - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Order for connection - """ - orderBy: TeamOrder - - """ - User logins to filter by - """ - userLogins: [String!] - ): TeamConnection! - - """ - The slug corresponding to the organization and team. - """ - combinedSlug: String! - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - - """ - The description of the team. - """ - description: String - - """ - Find a team discussion by its number. - """ - discussion( - """ - The sequence number of the discussion to find. - """ - number: Int! - ): TeamDiscussion - - """ - A list of team discussions. - """ - discussions( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - If provided, filters discussions according to whether or not they are pinned. - """ - isPinned: Boolean - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Order for connection - """ - orderBy: TeamDiscussionOrder - ): TeamDiscussionConnection! - - """ - The HTTP path for team discussions - """ - discussionsResourcePath: URI! - - """ - The HTTP URL for team discussions - """ - discussionsUrl: URI! - - """ - The HTTP path for editing this team - """ - editTeamResourcePath: URI! - - """ - The HTTP URL for editing this team - """ - editTeamUrl: URI! - id: ID! - - """ - A list of pending invitations for users to this team - """ - invitations( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): OrganizationInvitationConnection - - """ - Get the status messages members of this entity have set that are either public or visible only to the organization. - """ - memberStatuses( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for user statuses returned from the connection. - """ - orderBy: UserStatusOrder = {field: UPDATED_AT, direction: DESC} - ): UserStatusConnection! - - """ - A list of users who are members of this team. - """ - members( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Filter by membership type - """ - membership: TeamMembershipType = ALL - - """ - Order for the connection. - """ - orderBy: TeamMemberOrder - - """ - The search string to look for. - """ - query: String - - """ - Filter by team member role - """ - role: TeamMemberRole - ): TeamMemberConnection! - - """ - The HTTP path for the team' members - """ - membersResourcePath: URI! - - """ - The HTTP URL for the team' members - """ - membersUrl: URI! - - """ - The name of the team. - """ - name: String! - - """ - The HTTP path creating a new team - """ - newTeamResourcePath: URI! - - """ - The HTTP URL creating a new team - """ - newTeamUrl: URI! - - """ - The organization that owns this team. - """ - organization: Organization! - - """ - The parent team of the team. - """ - parentTeam: Team - - """ - The level of privacy the team has. - """ - privacy: TeamPrivacy! - - """ - A list of repositories this team has access to. - """ - repositories( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Order for the connection. - """ - orderBy: TeamRepositoryOrder - - """ - The search string to look for. - """ - query: String - ): TeamRepositoryConnection! - - """ - The HTTP path for this team's repositories - """ - repositoriesResourcePath: URI! - - """ - The HTTP URL for this team's repositories - """ - repositoriesUrl: URI! - - """ - The HTTP path for this team - """ - resourcePath: URI! - - """ - What algorithm is used for review assignment for this team - """ - reviewRequestDelegationAlgorithm: TeamReviewAssignmentAlgorithm @preview(toggledBy: "stone-crop-preview") - - """ - True if review assignment is enabled for this team - """ - reviewRequestDelegationEnabled: Boolean! @preview(toggledBy: "stone-crop-preview") - - """ - How many team members are required for review assignment for this team - """ - reviewRequestDelegationMemberCount: Int @preview(toggledBy: "stone-crop-preview") - - """ - When assigning team members via delegation, whether the entire team should be notified as well. - """ - reviewRequestDelegationNotifyTeam: Boolean! @preview(toggledBy: "stone-crop-preview") - - """ - The slug corresponding to the team. - """ - slug: String! - - """ - The HTTP path for this team's teams - """ - teamsResourcePath: URI! - - """ - The HTTP URL for this team's teams - """ - teamsUrl: URI! - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! - - """ - The HTTP URL for this team - """ - url: URI! - - """ - Team is adminable by the viewer. - """ - viewerCanAdminister: Boolean! - - """ - Check if the viewer is able to change their subscription status for the repository. - """ - viewerCanSubscribe: Boolean! - - """ - Identifies if the viewer is watching, not watching, or ignoring the subscribable entity. - """ - viewerSubscription: SubscriptionState -} - -""" -Audit log entry for a team.add_member event. -""" -type TeamAddMemberAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & TeamAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - Whether the team was mapped to an LDAP Group. - """ - isLdapMapped: Boolean - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The team associated with the action - """ - team: Team - - """ - The name of the team - """ - teamName: String - - """ - The HTTP path for this team - """ - teamResourcePath: URI - - """ - The HTTP URL for this team - """ - teamUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a team.add_repository event. -""" -type TeamAddRepositoryAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData & TeamAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - Whether the team was mapped to an LDAP Group. - """ - isLdapMapped: Boolean - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The repository associated with the action - """ - repository: Repository - - """ - The name of the repository - """ - repositoryName: String - - """ - The HTTP path for the repository - """ - repositoryResourcePath: URI - - """ - The HTTP URL for the repository - """ - repositoryUrl: URI - - """ - The team associated with the action - """ - team: Team - - """ - The name of the team - """ - teamName: String - - """ - The HTTP path for this team - """ - teamResourcePath: URI - - """ - The HTTP URL for this team - """ - teamUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Metadata for an audit entry with action team.* -""" -interface TeamAuditEntryData { - """ - The team associated with the action - """ - team: Team - - """ - The name of the team - """ - teamName: String - - """ - The HTTP path for this team - """ - teamResourcePath: URI - - """ - The HTTP URL for this team - """ - teamUrl: URI -} - -""" -Audit log entry for a team.change_parent_team event. -""" -type TeamChangeParentTeamAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & TeamAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - Whether the team was mapped to an LDAP Group. - """ - isLdapMapped: Boolean - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The new parent team. - """ - parentTeam: Team - - """ - The name of the new parent team - """ - parentTeamName: String - - """ - The name of the former parent team - """ - parentTeamNameWas: String - - """ - The HTTP path for the parent team - """ - parentTeamResourcePath: URI - - """ - The HTTP URL for the parent team - """ - parentTeamUrl: URI - - """ - The former parent team. - """ - parentTeamWas: Team - - """ - The HTTP path for the previous parent team - """ - parentTeamWasResourcePath: URI - - """ - The HTTP URL for the previous parent team - """ - parentTeamWasUrl: URI - - """ - The team associated with the action - """ - team: Team - - """ - The name of the team - """ - teamName: String - - """ - The HTTP path for this team - """ - teamResourcePath: URI - - """ - The HTTP URL for this team - """ - teamUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -The connection type for Team. -""" -type TeamConnection { - """ - A list of edges. - """ - edges: [TeamEdge] - - """ - A list of nodes. - """ - nodes: [Team] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -A team discussion. -""" -type TeamDiscussion implements Comment & Deletable & Node & Reactable & Subscribable & UniformResourceLocatable & Updatable & UpdatableComment { - """ - The actor who authored the comment. - """ - author: Actor - - """ - Author's association with the discussion's team. - """ - authorAssociation: CommentAuthorAssociation! - - """ - The body as Markdown. - """ - body: String! - - """ - The body rendered to HTML. - """ - bodyHTML: HTML! - - """ - The body rendered to text. - """ - bodyText: String! - - """ - Identifies the discussion body hash. - """ - bodyVersion: String! - - """ - A list of comments on this discussion. - """ - comments( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - When provided, filters the connection such that results begin with the comment with this number. - """ - fromComment: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Order for connection - """ - orderBy: TeamDiscussionCommentOrder - ): TeamDiscussionCommentConnection! - - """ - The HTTP path for discussion comments - """ - commentsResourcePath: URI! - - """ - The HTTP URL for discussion comments - """ - commentsUrl: URI! - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Check if this comment was created via an email reply. - """ - createdViaEmail: Boolean! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - - """ - The actor who edited the comment. - """ - editor: Actor - id: ID! - - """ - Check if this comment was edited and includes an edit with the creation data - """ - includesCreatedEdit: Boolean! - - """ - Whether or not the discussion is pinned. - """ - isPinned: Boolean! - - """ - Whether or not the discussion is only visible to team members and org admins. - """ - isPrivate: Boolean! - - """ - The moment the editor made the last edit - """ - lastEditedAt: DateTime - - """ - Identifies the discussion within its team. - """ - number: Int! - - """ - Identifies when the comment was published at. - """ - publishedAt: DateTime - - """ - A list of reactions grouped by content left on the subject. - """ - reactionGroups: [ReactionGroup!] - - """ - A list of Reactions left on the Issue. - """ - reactions( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Allows filtering Reactions by emoji. - """ - content: ReactionContent - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Allows specifying the order in which reactions are returned. - """ - orderBy: ReactionOrder - ): ReactionConnection! - - """ - The HTTP path for this discussion - """ - resourcePath: URI! - - """ - The team that defines the context of this discussion. - """ - team: Team! - - """ - The title of the discussion - """ - title: String! - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! - - """ - The HTTP URL for this discussion - """ - url: URI! - - """ - A list of edits to this content. - """ - userContentEdits( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): UserContentEditConnection - - """ - Check if the current viewer can delete this object. - """ - viewerCanDelete: Boolean! - - """ - Whether or not the current viewer can pin this discussion. - """ - viewerCanPin: Boolean! - - """ - Can user react to this subject - """ - viewerCanReact: Boolean! - - """ - Check if the viewer is able to change their subscription status for the repository. - """ - viewerCanSubscribe: Boolean! - - """ - Check if the current viewer can update this object. - """ - viewerCanUpdate: Boolean! - - """ - Reasons why the current viewer can not update this comment. - """ - viewerCannotUpdateReasons: [CommentCannotUpdateReason!]! - - """ - Did the viewer author this comment. - """ - viewerDidAuthor: Boolean! - - """ - Identifies if the viewer is watching, not watching, or ignoring the subscribable entity. - """ - viewerSubscription: SubscriptionState -} - -""" -A comment on a team discussion. -""" -type TeamDiscussionComment implements Comment & Deletable & Node & Reactable & UniformResourceLocatable & Updatable & UpdatableComment { - """ - The actor who authored the comment. - """ - author: Actor - - """ - Author's association with the comment's team. - """ - authorAssociation: CommentAuthorAssociation! - - """ - The body as Markdown. - """ - body: String! - - """ - The body rendered to HTML. - """ - bodyHTML: HTML! - - """ - The body rendered to text. - """ - bodyText: String! - - """ - The current version of the body content. - """ - bodyVersion: String! - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Check if this comment was created via an email reply. - """ - createdViaEmail: Boolean! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - - """ - The discussion this comment is about. - """ - discussion: TeamDiscussion! - - """ - The actor who edited the comment. - """ - editor: Actor - id: ID! - - """ - Check if this comment was edited and includes an edit with the creation data - """ - includesCreatedEdit: Boolean! - - """ - The moment the editor made the last edit - """ - lastEditedAt: DateTime - - """ - Identifies the comment number. - """ - number: Int! - - """ - Identifies when the comment was published at. - """ - publishedAt: DateTime - - """ - A list of reactions grouped by content left on the subject. - """ - reactionGroups: [ReactionGroup!] - - """ - A list of Reactions left on the Issue. - """ - reactions( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Allows filtering Reactions by emoji. - """ - content: ReactionContent - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Allows specifying the order in which reactions are returned. - """ - orderBy: ReactionOrder - ): ReactionConnection! - - """ - The HTTP path for this comment - """ - resourcePath: URI! - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! - - """ - The HTTP URL for this comment - """ - url: URI! - - """ - A list of edits to this content. - """ - userContentEdits( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): UserContentEditConnection - - """ - Check if the current viewer can delete this object. - """ - viewerCanDelete: Boolean! - - """ - Can user react to this subject - """ - viewerCanReact: Boolean! - - """ - Check if the current viewer can update this object. - """ - viewerCanUpdate: Boolean! - - """ - Reasons why the current viewer can not update this comment. - """ - viewerCannotUpdateReasons: [CommentCannotUpdateReason!]! - - """ - Did the viewer author this comment. - """ - viewerDidAuthor: Boolean! -} - -""" -The connection type for TeamDiscussionComment. -""" -type TeamDiscussionCommentConnection { - """ - A list of edges. - """ - edges: [TeamDiscussionCommentEdge] - - """ - A list of nodes. - """ - nodes: [TeamDiscussionComment] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type TeamDiscussionCommentEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: TeamDiscussionComment -} - -""" -Ways in which team discussion comment connections can be ordered. -""" -input TeamDiscussionCommentOrder { - """ - The direction in which to order nodes. - """ - direction: OrderDirection! - - """ - The field by which to order nodes. - """ - field: TeamDiscussionCommentOrderField! -} - -""" -Properties by which team discussion comment connections can be ordered. -""" -enum TeamDiscussionCommentOrderField { - """ - Allows sequential ordering of team discussion comments (which is equivalent to chronological ordering). - """ - NUMBER -} - -""" -The connection type for TeamDiscussion. -""" -type TeamDiscussionConnection { - """ - A list of edges. - """ - edges: [TeamDiscussionEdge] - - """ - A list of nodes. - """ - nodes: [TeamDiscussion] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type TeamDiscussionEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: TeamDiscussion -} - -""" -Ways in which team discussion connections can be ordered. -""" -input TeamDiscussionOrder { - """ - The direction in which to order nodes. - """ - direction: OrderDirection! - - """ - The field by which to order nodes. - """ - field: TeamDiscussionOrderField! -} - -""" -Properties by which team discussion connections can be ordered. -""" -enum TeamDiscussionOrderField { - """ - Allows chronological ordering of team discussions. - """ - CREATED_AT -} - -""" -An edge in a connection. -""" -type TeamEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: Team -} - -""" -The connection type for User. -""" -type TeamMemberConnection { - """ - A list of edges. - """ - edges: [TeamMemberEdge] - - """ - A list of nodes. - """ - nodes: [User] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -Represents a user who is a member of a team. -""" -type TeamMemberEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The HTTP path to the organization's member access page. - """ - memberAccessResourcePath: URI! - - """ - The HTTP URL to the organization's member access page. - """ - memberAccessUrl: URI! - node: User! - - """ - The role the member has on the team. - """ - role: TeamMemberRole! -} - -""" -Ordering options for team member connections -""" -input TeamMemberOrder { - """ - The ordering direction. - """ - direction: OrderDirection! - - """ - The field to order team members by. - """ - field: TeamMemberOrderField! -} - -""" -Properties by which team member connections can be ordered. -""" -enum TeamMemberOrderField { - """ - Order team members by creation time - """ - CREATED_AT - - """ - Order team members by login - """ - LOGIN -} - -""" -The possible team member roles; either 'maintainer' or 'member'. -""" -enum TeamMemberRole { - """ - A team maintainer has permission to add and remove team members. - """ - MAINTAINER - - """ - A team member has no administrative permissions on the team. - """ - MEMBER -} - -""" -Defines which types of team members are included in the returned list. Can be one of IMMEDIATE, CHILD_TEAM or ALL. -""" -enum TeamMembershipType { - """ - Includes immediate and child team members for the team. - """ - ALL - - """ - Includes only child team members for the team. - """ - CHILD_TEAM - - """ - Includes only immediate members of the team. - """ - IMMEDIATE -} - -""" -Ways in which team connections can be ordered. -""" -input TeamOrder { - """ - The direction in which to order nodes. - """ - direction: OrderDirection! - - """ - The field in which to order nodes by. - """ - field: TeamOrderField! -} - -""" -Properties by which team connections can be ordered. -""" -enum TeamOrderField { - """ - Allows ordering a list of teams by name. - """ - NAME -} - -""" -The possible team privacy values. -""" -enum TeamPrivacy { - """ - A secret team can only be seen by its members. - """ - SECRET - - """ - A visible team can be seen and @mentioned by every member of the organization. - """ - VISIBLE -} - -""" -Audit log entry for a team.remove_member event. -""" -type TeamRemoveMemberAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & TeamAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - Whether the team was mapped to an LDAP Group. - """ - isLdapMapped: Boolean - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The team associated with the action - """ - team: Team - - """ - The name of the team - """ - teamName: String - - """ - The HTTP path for this team - """ - teamResourcePath: URI - - """ - The HTTP URL for this team - """ - teamUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -Audit log entry for a team.remove_repository event. -""" -type TeamRemoveRepositoryAuditEntry implements AuditEntry & Node & OrganizationAuditEntryData & RepositoryAuditEntryData & TeamAuditEntryData { - """ - The action name - """ - action: String! - - """ - The user who initiated the action - """ - actor: AuditEntryActor - - """ - The IP address of the actor - """ - actorIp: String - - """ - A readable representation of the actor's location - """ - actorLocation: ActorLocation - - """ - The username of the user who initiated the action - """ - actorLogin: String - - """ - The HTTP path for the actor. - """ - actorResourcePath: URI - - """ - The HTTP URL for the actor. - """ - actorUrl: URI - - """ - The time the action was initiated - """ - createdAt: PreciseDateTime! - id: ID! - - """ - Whether the team was mapped to an LDAP Group. - """ - isLdapMapped: Boolean - - """ - The corresponding operation type for the action - """ - operationType: OperationType - - """ - The Organization associated with the Audit Entry. - """ - organization: Organization - - """ - The name of the Organization. - """ - organizationName: String - - """ - The HTTP path for the organization - """ - organizationResourcePath: URI - - """ - The HTTP URL for the organization - """ - organizationUrl: URI - - """ - The repository associated with the action - """ - repository: Repository - - """ - The name of the repository - """ - repositoryName: String - - """ - The HTTP path for the repository - """ - repositoryResourcePath: URI - - """ - The HTTP URL for the repository - """ - repositoryUrl: URI - - """ - The team associated with the action - """ - team: Team - - """ - The name of the team - """ - teamName: String - - """ - The HTTP path for this team - """ - teamResourcePath: URI - - """ - The HTTP URL for this team - """ - teamUrl: URI - - """ - The user affected by the action - """ - user: User - - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String - - """ - The HTTP path for the user. - """ - userResourcePath: URI - - """ - The HTTP URL for the user. - """ - userUrl: URI -} - -""" -The connection type for Repository. -""" -type TeamRepositoryConnection { - """ - A list of edges. - """ - edges: [TeamRepositoryEdge] - - """ - A list of nodes. - """ - nodes: [Repository] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -Represents a team repository. -""" -type TeamRepositoryEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - node: Repository! - - """ - The permission level the team has on the repository - """ - permission: RepositoryPermission! -} - -""" -Ordering options for team repository connections -""" -input TeamRepositoryOrder { - """ - The ordering direction. - """ - direction: OrderDirection! - - """ - The field to order repositories by. - """ - field: TeamRepositoryOrderField! -} - -""" -Properties by which team repository connections can be ordered. -""" -enum TeamRepositoryOrderField { - """ - Order repositories by creation time - """ - CREATED_AT - - """ - Order repositories by name - """ - NAME - - """ - Order repositories by permission - """ - PERMISSION - - """ - Order repositories by push time - """ - PUSHED_AT - - """ - Order repositories by number of stargazers - """ - STARGAZERS - - """ - Order repositories by update time - """ - UPDATED_AT -} - -""" -The possible team review assignment algorithms -""" -enum TeamReviewAssignmentAlgorithm @preview(toggledBy: "stone-crop-preview") { - """ - Balance review load across the entire team - """ - LOAD_BALANCE - - """ - Alternate reviews between each team member - """ - ROUND_ROBIN -} - -""" -The role of a user on a team. -""" -enum TeamRole { - """ - User has admin rights on the team. - """ - ADMIN - - """ - User is a member of the team. - """ - MEMBER -} - -""" -A text match within a search result. -""" -type TextMatch { - """ - The specific text fragment within the property matched on. - """ - fragment: String! - - """ - Highlights within the matched fragment. - """ - highlights: [TextMatchHighlight!]! - - """ - The property matched on. - """ - property: String! -} - -""" -Represents a single highlight in a search result match. -""" -type TextMatchHighlight { - """ - The indice in the fragment where the matched text begins. - """ - beginIndice: Int! - - """ - The indice in the fragment where the matched text ends. - """ - endIndice: Int! - - """ - The text matched. - """ - text: String! -} - -""" -A topic aggregates entities that are related to a subject. -""" -type Topic implements Node & Starrable { - id: ID! - - """ - The topic's name. - """ - name: String! - - """ - A list of related topics, including aliases of this topic, sorted with the most relevant - first. Returns up to 10 Topics. - """ - relatedTopics( - """ - How many topics to return. - """ - first: Int = 3 - ): [Topic!]! - - """ - Returns a count of how many stargazers there are on this object - """ - stargazerCount: Int! - - """ - A list of users who have starred this starrable. - """ - stargazers( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Order for connection - """ - orderBy: StarOrder - ): StargazerConnection! - - """ - Returns a boolean indicating whether the viewing user has starred this starrable. - """ - viewerHasStarred: Boolean! -} - -""" -Metadata for an audit entry with a topic. -""" -interface TopicAuditEntryData { - """ - The name of the topic added to the repository - """ - topic: Topic - - """ - The name of the topic added to the repository - """ - topicName: String -} - -""" -Reason that the suggested topic is declined. -""" -enum TopicSuggestionDeclineReason { - """ - The suggested topic is not relevant to the repository. - """ - NOT_RELEVANT - - """ - The viewer does not like the suggested topic. - """ - PERSONAL_PREFERENCE - - """ - The suggested topic is too general for the repository. - """ - TOO_GENERAL - - """ - The suggested topic is too specific for the repository (e.g. #ruby-on-rails-version-4-2-1). - """ - TOO_SPECIFIC -} - -""" -Autogenerated input type of TransferIssue -""" -input TransferIssueInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The Node ID of the issue to be transferred - """ - issueId: ID! @possibleTypes(concreteTypes: ["Issue"]) - - """ - The Node ID of the repository the issue should be transferred to - """ - repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) -} - -""" -Autogenerated return type of TransferIssue -""" -type TransferIssuePayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The issue that was transferred - """ - issue: Issue -} - -""" -Represents a 'transferred' event on a given issue or pull request. -""" -type TransferredEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - The repository this came from - """ - fromRepository: Repository - id: ID! - - """ - Identifies the issue associated with the event. - """ - issue: Issue! -} - -""" -Represents a Git tree. -""" -type Tree implements GitObject & Node { - """ - An abbreviated version of the Git object ID - """ - abbreviatedOid: String! - - """ - The HTTP path for this Git object - """ - commitResourcePath: URI! - - """ - The HTTP URL for this Git object - """ - commitUrl: URI! - - """ - A list of tree entries. - """ - entries: [TreeEntry!] - id: ID! - - """ - The Git object ID - """ - oid: GitObjectID! - - """ - The Repository the Git object belongs to - """ - repository: Repository! -} - -""" -Represents a Git tree entry. -""" -type TreeEntry { - """ - The extension of the file - """ - extension: String - - """ - Whether or not this tree entry is generated - """ - isGenerated: Boolean! - - """ - Entry file mode. - """ - mode: Int! - - """ - Entry file name. - """ - name: String! - - """ - Entry file object. - """ - object: GitObject - - """ - Entry file Git object ID. - """ - oid: GitObjectID! - - """ - The full path of the file. - """ - path: String - - """ - The Repository the tree entry belongs to - """ - repository: Repository! - - """ - If the TreeEntry is for a directory occupied by a submodule project, this returns the corresponding submodule - """ - submodule: Submodule - - """ - Entry file type. - """ - type: String! -} - -""" -An RFC 3986, RFC 3987, and RFC 6570 (level 4) compliant URI string. -""" -scalar URI - -""" -Autogenerated input type of UnarchiveRepository -""" -input UnarchiveRepositoryInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the repository to unarchive. - """ - repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) -} - -""" -Autogenerated return type of UnarchiveRepository -""" -type UnarchiveRepositoryPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The repository that was unarchived. - """ - repository: Repository -} - -""" -Represents an 'unassigned' event on any assignable object. -""" -type UnassignedEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the assignable associated with the event. - """ - assignable: Assignable! - - """ - Identifies the user or mannequin that was unassigned. - """ - assignee: Assignee - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! - - """ - Identifies the subject (user) who was unassigned. - """ - user: User @deprecated(reason: "Assignees can now be mannequins. Use the `assignee` field instead. Removal on 2020-01-01 UTC.") -} - -""" -Autogenerated input type of UnfollowUser -""" -input UnfollowUserInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - ID of the user to unfollow. - """ - userId: ID! @possibleTypes(concreteTypes: ["User"]) -} - -""" -Autogenerated return type of UnfollowUser -""" -type UnfollowUserPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The user that was unfollowed. - """ - user: User -} - -""" -Represents a type that can be retrieved by a URL. -""" -interface UniformResourceLocatable { - """ - The HTML path to this resource. - """ - resourcePath: URI! - - """ - The URL to this resource. - """ - url: URI! -} - -""" -Represents an unknown signature on a Commit or Tag. -""" -type UnknownSignature implements GitSignature { - """ - Email used to sign this object. - """ - email: String! - - """ - True if the signature is valid and verified by GitHub. - """ - isValid: Boolean! - - """ - Payload for GPG signing object. Raw ODB object without the signature header. - """ - payload: String! - - """ - ASCII-armored signature header from object. - """ - signature: String! - - """ - GitHub user corresponding to the email signing this commit. - """ - signer: User - - """ - The state of this signature. `VALID` if signature is valid and verified by - GitHub, otherwise represents reason why signature is considered invalid. - """ - state: GitSignatureState! - - """ - True if the signature was made with GitHub's signing key. - """ - wasSignedByGitHub: Boolean! -} - -""" -Represents an 'unlabeled' event on a given issue or pull request. -""" -type UnlabeledEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! - - """ - Identifies the label associated with the 'unlabeled' event. - """ - label: Label! - - """ - Identifies the `Labelable` associated with the event. - """ - labelable: Labelable! -} - -""" -Autogenerated input type of UnlinkRepositoryFromProject -""" -input UnlinkRepositoryFromProjectInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the Project linked to the Repository. - """ - projectId: ID! @possibleTypes(concreteTypes: ["Project"]) - - """ - The ID of the Repository linked to the Project. - """ - repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) -} - -""" -Autogenerated return type of UnlinkRepositoryFromProject -""" -type UnlinkRepositoryFromProjectPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The linked Project. - """ - project: Project - - """ - The linked Repository. - """ - repository: Repository -} - -""" -Autogenerated input type of UnlockLockable -""" -input UnlockLockableInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - ID of the item to be unlocked. - """ - lockableId: ID! @possibleTypes(concreteTypes: ["Issue", "PullRequest"], abstractType: "Lockable") -} - -""" -Autogenerated return type of UnlockLockable -""" -type UnlockLockablePayload { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The item that was unlocked. - """ - unlockedRecord: Lockable -} - -""" -Represents an 'unlocked' event on a given issue or pull request. -""" -type UnlockedEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! - - """ - Object that was unlocked. - """ - lockable: Lockable! -} - -""" -Autogenerated input type of UnmarkFileAsViewed -""" -input UnmarkFileAsViewedInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The path of the file to mark as unviewed - """ - path: String! - - """ - The Node ID of the pull request. - """ - pullRequestId: ID! @possibleTypes(concreteTypes: ["PullRequest"]) -} - -""" -Autogenerated return type of UnmarkFileAsViewed -""" -type UnmarkFileAsViewedPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The updated pull request. - """ - pullRequest: PullRequest -} - -""" -Autogenerated input type of UnmarkIssueAsDuplicate -""" -input UnmarkIssueAsDuplicateInput { - """ - ID of the issue or pull request currently considered canonical/authoritative/original. - """ - canonicalId: ID! @possibleTypes(concreteTypes: ["Issue", "PullRequest"], abstractType: "IssueOrPullRequest") - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - ID of the issue or pull request currently marked as a duplicate. - """ - duplicateId: ID! @possibleTypes(concreteTypes: ["Issue", "PullRequest"], abstractType: "IssueOrPullRequest") -} - -""" -Autogenerated return type of UnmarkIssueAsDuplicate -""" -type UnmarkIssueAsDuplicatePayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The issue or pull request that was marked as a duplicate. - """ - duplicate: IssueOrPullRequest -} - -""" -Represents an 'unmarked_as_duplicate' event on a given issue or pull request. -""" -type UnmarkedAsDuplicateEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - The authoritative issue or pull request which has been duplicated by another. - """ - canonical: IssueOrPullRequest - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - The issue or pull request which has been marked as a duplicate of another. - """ - duplicate: IssueOrPullRequest - id: ID! - - """ - Canonical and duplicate belong to different repositories. - """ - isCrossRepository: Boolean! -} - -""" -Autogenerated input type of UnminimizeComment -""" -input UnminimizeCommentInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The Node ID of the subject to modify. - """ - subjectId: ID! @possibleTypes(concreteTypes: ["CommitComment", "GistComment", "IssueComment", "PullRequestReviewComment"], abstractType: "Minimizable") -} - -""" -Autogenerated return type of UnminimizeComment -""" -type UnminimizeCommentPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The comment that was unminimized. - """ - unminimizedComment: Minimizable -} - -""" -Autogenerated input type of UnpinIssue -""" -input UnpinIssueInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the issue to be unpinned - """ - issueId: ID! @possibleTypes(concreteTypes: ["Issue"]) -} - -""" -Autogenerated return type of UnpinIssue -""" -type UnpinIssuePayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The issue that was unpinned - """ - issue: Issue -} - -""" -Represents an 'unpinned' event on a given issue or pull request. -""" -type UnpinnedEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! - - """ - Identifies the issue associated with the event. - """ - issue: Issue! -} - -""" -Autogenerated input type of UnresolveReviewThread -""" -input UnresolveReviewThreadInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the thread to unresolve - """ - threadId: ID! @possibleTypes(concreteTypes: ["PullRequestReviewThread"]) -} - -""" -Autogenerated return type of UnresolveReviewThread -""" -type UnresolveReviewThreadPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The thread to resolve. - """ - thread: PullRequestReviewThread -} - -""" -Represents an 'unsubscribed' event on a given `Subscribable`. -""" -type UnsubscribedEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! - - """ - Object referenced by event. - """ - subscribable: Subscribable! -} - -""" -Entities that can be updated. -""" -interface Updatable { - """ - Check if the current viewer can update this object. - """ - viewerCanUpdate: Boolean! -} - -""" -Comments that can be updated. -""" -interface UpdatableComment { - """ - Reasons why the current viewer can not update this comment. - """ - viewerCannotUpdateReasons: [CommentCannotUpdateReason!]! -} - -""" -Autogenerated input type of UpdateBranchProtectionRule -""" -input UpdateBranchProtectionRuleInput { - """ - Can this branch be deleted. - """ - allowsDeletions: Boolean - - """ - Are force pushes allowed on this branch. - """ - allowsForcePushes: Boolean - - """ - The global relay id of the branch protection rule to be updated. - """ - branchProtectionRuleId: ID! @possibleTypes(concreteTypes: ["BranchProtectionRule"]) - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - Will new commits pushed to matching branches dismiss pull request review approvals. - """ - dismissesStaleReviews: Boolean - - """ - Can admins overwrite branch protection. - """ - isAdminEnforced: Boolean - - """ - The glob-like pattern used to determine matching branches. - """ - pattern: String - - """ - A list of User, Team or App IDs allowed to push to matching branches. - """ - pushActorIds: [ID!] - - """ - Number of approving reviews required to update matching branches. - """ - requiredApprovingReviewCount: Int - - """ - List of required status check contexts that must pass for commits to be accepted to matching branches. - """ - requiredStatusCheckContexts: [String!] - - """ - Are approving reviews required to update matching branches. - """ - requiresApprovingReviews: Boolean - - """ - Are reviews from code owners required to update matching branches. - """ - requiresCodeOwnerReviews: Boolean - - """ - Are commits required to be signed. - """ - requiresCommitSignatures: Boolean - - """ - Are merge commits prohibited from being pushed to this branch. - """ - requiresLinearHistory: Boolean - - """ - Are status checks required to update matching branches. - """ - requiresStatusChecks: Boolean - - """ - Are branches required to be up to date before merging. - """ - requiresStrictStatusChecks: Boolean - - """ - Is pushing to matching branches restricted. - """ - restrictsPushes: Boolean - - """ - Is dismissal of pull request reviews restricted. - """ - restrictsReviewDismissals: Boolean - - """ - A list of User or Team IDs allowed to dismiss reviews on pull requests targeting matching branches. - """ - reviewDismissalActorIds: [ID!] -} - -""" -Autogenerated return type of UpdateBranchProtectionRule -""" -type UpdateBranchProtectionRulePayload { - """ - The newly created BranchProtectionRule. - """ - branchProtectionRule: BranchProtectionRule - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String -} - -""" -Autogenerated input type of UpdateCheckRun -""" -input UpdateCheckRunInput { - """ - Possible further actions the integrator can perform, which a user may trigger. - """ - actions: [CheckRunAction!] - - """ - The node of the check. - """ - checkRunId: ID! @possibleTypes(concreteTypes: ["CheckRun"]) - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The time that the check run finished. - """ - completedAt: DateTime - - """ - The final conclusion of the check. - """ - conclusion: CheckConclusionState - - """ - The URL of the integrator's site that has the full details of the check. - """ - detailsUrl: URI - - """ - A reference for the run on the integrator's system. - """ - externalId: String - - """ - The name of the check. - """ - name: String - - """ - Descriptive details about the run. - """ - output: CheckRunOutput - - """ - The node ID of the repository. - """ - repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) - - """ - The time that the check run began. - """ - startedAt: DateTime - - """ - The current status. - """ - status: RequestableCheckStatusState -} - -""" -Autogenerated return type of UpdateCheckRun -""" -type UpdateCheckRunPayload { - """ - The updated check run. - """ - checkRun: CheckRun - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String -} - -""" -Autogenerated input type of UpdateCheckSuitePreferences -""" -input UpdateCheckSuitePreferencesInput { - """ - The check suite preferences to modify. - """ - autoTriggerPreferences: [CheckSuiteAutoTriggerPreference!]! - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The Node ID of the repository. - """ - repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) -} - -""" -Autogenerated return type of UpdateCheckSuitePreferences -""" -type UpdateCheckSuitePreferencesPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The updated repository. - """ - repository: Repository -} - -""" -Autogenerated input type of UpdateEnterpriseAdministratorRole -""" -input UpdateEnterpriseAdministratorRoleInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the Enterprise which the admin belongs to. - """ - enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) - - """ - The login of a administrator whose role is being changed. - """ - login: String! - - """ - The new role for the Enterprise administrator. - """ - role: EnterpriseAdministratorRole! -} - -""" -Autogenerated return type of UpdateEnterpriseAdministratorRole -""" -type UpdateEnterpriseAdministratorRolePayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - A message confirming the result of changing the administrator's role. - """ - message: String -} - -""" -Autogenerated input type of UpdateEnterpriseAllowPrivateRepositoryForkingSetting -""" -input UpdateEnterpriseAllowPrivateRepositoryForkingSettingInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the enterprise on which to set the allow private repository forking setting. - """ - enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) - - """ - The value for the allow private repository forking setting on the enterprise. - """ - settingValue: EnterpriseEnabledDisabledSettingValue! -} - -""" -Autogenerated return type of UpdateEnterpriseAllowPrivateRepositoryForkingSetting -""" -type UpdateEnterpriseAllowPrivateRepositoryForkingSettingPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The enterprise with the updated allow private repository forking setting. - """ - enterprise: Enterprise - - """ - A message confirming the result of updating the allow private repository forking setting. - """ - message: String -} - -""" -Autogenerated input type of UpdateEnterpriseDefaultRepositoryPermissionSetting -""" -input UpdateEnterpriseDefaultRepositoryPermissionSettingInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the enterprise on which to set the default repository permission setting. - """ - enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) - - """ - The value for the default repository permission setting on the enterprise. - """ - settingValue: EnterpriseDefaultRepositoryPermissionSettingValue! -} - -""" -Autogenerated return type of UpdateEnterpriseDefaultRepositoryPermissionSetting -""" -type UpdateEnterpriseDefaultRepositoryPermissionSettingPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The enterprise with the updated default repository permission setting. - """ - enterprise: Enterprise - - """ - A message confirming the result of updating the default repository permission setting. - """ - message: String -} - -""" -Autogenerated input type of UpdateEnterpriseMembersCanChangeRepositoryVisibilitySetting -""" -input UpdateEnterpriseMembersCanChangeRepositoryVisibilitySettingInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the enterprise on which to set the members can change repository visibility setting. - """ - enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) - - """ - The value for the members can change repository visibility setting on the enterprise. - """ - settingValue: EnterpriseEnabledDisabledSettingValue! -} - -""" -Autogenerated return type of UpdateEnterpriseMembersCanChangeRepositoryVisibilitySetting -""" -type UpdateEnterpriseMembersCanChangeRepositoryVisibilitySettingPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The enterprise with the updated members can change repository visibility setting. - """ - enterprise: Enterprise - - """ - A message confirming the result of updating the members can change repository visibility setting. - """ - message: String -} - -""" -Autogenerated input type of UpdateEnterpriseMembersCanCreateRepositoriesSetting -""" -input UpdateEnterpriseMembersCanCreateRepositoriesSettingInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the enterprise on which to set the members can create repositories setting. - """ - enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) - - """ - Allow members to create internal repositories. Defaults to current value. - """ - membersCanCreateInternalRepositories: Boolean - - """ - Allow members to create private repositories. Defaults to current value. - """ - membersCanCreatePrivateRepositories: Boolean - - """ - Allow members to create public repositories. Defaults to current value. - """ - membersCanCreatePublicRepositories: Boolean - - """ - When false, allow member organizations to set their own repository creation member privileges. - """ - membersCanCreateRepositoriesPolicyEnabled: Boolean - - """ - Value for the members can create repositories setting on the enterprise. This - or the granular public/private/internal allowed fields (but not both) must be provided. - """ - settingValue: EnterpriseMembersCanCreateRepositoriesSettingValue -} - -""" -Autogenerated return type of UpdateEnterpriseMembersCanCreateRepositoriesSetting -""" -type UpdateEnterpriseMembersCanCreateRepositoriesSettingPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The enterprise with the updated members can create repositories setting. - """ - enterprise: Enterprise - - """ - A message confirming the result of updating the members can create repositories setting. - """ - message: String -} - -""" -Autogenerated input type of UpdateEnterpriseMembersCanDeleteIssuesSetting -""" -input UpdateEnterpriseMembersCanDeleteIssuesSettingInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the enterprise on which to set the members can delete issues setting. - """ - enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) - - """ - The value for the members can delete issues setting on the enterprise. - """ - settingValue: EnterpriseEnabledDisabledSettingValue! -} - -""" -Autogenerated return type of UpdateEnterpriseMembersCanDeleteIssuesSetting -""" -type UpdateEnterpriseMembersCanDeleteIssuesSettingPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The enterprise with the updated members can delete issues setting. - """ - enterprise: Enterprise - - """ - A message confirming the result of updating the members can delete issues setting. - """ - message: String -} - -""" -Autogenerated input type of UpdateEnterpriseMembersCanDeleteRepositoriesSetting -""" -input UpdateEnterpriseMembersCanDeleteRepositoriesSettingInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the enterprise on which to set the members can delete repositories setting. - """ - enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) - - """ - The value for the members can delete repositories setting on the enterprise. - """ - settingValue: EnterpriseEnabledDisabledSettingValue! -} - -""" -Autogenerated return type of UpdateEnterpriseMembersCanDeleteRepositoriesSetting -""" -type UpdateEnterpriseMembersCanDeleteRepositoriesSettingPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The enterprise with the updated members can delete repositories setting. - """ - enterprise: Enterprise - - """ - A message confirming the result of updating the members can delete repositories setting. - """ - message: String -} - -""" -Autogenerated input type of UpdateEnterpriseMembersCanInviteCollaboratorsSetting -""" -input UpdateEnterpriseMembersCanInviteCollaboratorsSettingInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the enterprise on which to set the members can invite collaborators setting. - """ - enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) - - """ - The value for the members can invite collaborators setting on the enterprise. - """ - settingValue: EnterpriseEnabledDisabledSettingValue! -} - -""" -Autogenerated return type of UpdateEnterpriseMembersCanInviteCollaboratorsSetting -""" -type UpdateEnterpriseMembersCanInviteCollaboratorsSettingPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The enterprise with the updated members can invite collaborators setting. - """ - enterprise: Enterprise - - """ - A message confirming the result of updating the members can invite collaborators setting. - """ - message: String -} - -""" -Autogenerated input type of UpdateEnterpriseMembersCanMakePurchasesSetting -""" -input UpdateEnterpriseMembersCanMakePurchasesSettingInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the enterprise on which to set the members can make purchases setting. - """ - enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) - - """ - The value for the members can make purchases setting on the enterprise. - """ - settingValue: EnterpriseMembersCanMakePurchasesSettingValue! -} - -""" -Autogenerated return type of UpdateEnterpriseMembersCanMakePurchasesSetting -""" -type UpdateEnterpriseMembersCanMakePurchasesSettingPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The enterprise with the updated members can make purchases setting. - """ - enterprise: Enterprise - - """ - A message confirming the result of updating the members can make purchases setting. - """ - message: String -} - -""" -Autogenerated input type of UpdateEnterpriseMembersCanUpdateProtectedBranchesSetting -""" -input UpdateEnterpriseMembersCanUpdateProtectedBranchesSettingInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the enterprise on which to set the members can update protected branches setting. - """ - enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) - - """ - The value for the members can update protected branches setting on the enterprise. - """ - settingValue: EnterpriseEnabledDisabledSettingValue! -} - -""" -Autogenerated return type of UpdateEnterpriseMembersCanUpdateProtectedBranchesSetting -""" -type UpdateEnterpriseMembersCanUpdateProtectedBranchesSettingPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The enterprise with the updated members can update protected branches setting. - """ - enterprise: Enterprise - - """ - A message confirming the result of updating the members can update protected branches setting. - """ - message: String -} - -""" -Autogenerated input type of UpdateEnterpriseMembersCanViewDependencyInsightsSetting -""" -input UpdateEnterpriseMembersCanViewDependencyInsightsSettingInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the enterprise on which to set the members can view dependency insights setting. - """ - enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) - - """ - The value for the members can view dependency insights setting on the enterprise. - """ - settingValue: EnterpriseEnabledDisabledSettingValue! -} - -""" -Autogenerated return type of UpdateEnterpriseMembersCanViewDependencyInsightsSetting -""" -type UpdateEnterpriseMembersCanViewDependencyInsightsSettingPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The enterprise with the updated members can view dependency insights setting. - """ - enterprise: Enterprise - - """ - A message confirming the result of updating the members can view dependency insights setting. - """ - message: String -} - -""" -Autogenerated input type of UpdateEnterpriseOrganizationProjectsSetting -""" -input UpdateEnterpriseOrganizationProjectsSettingInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the enterprise on which to set the organization projects setting. - """ - enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) - - """ - The value for the organization projects setting on the enterprise. - """ - settingValue: EnterpriseEnabledDisabledSettingValue! -} - -""" -Autogenerated return type of UpdateEnterpriseOrganizationProjectsSetting -""" -type UpdateEnterpriseOrganizationProjectsSettingPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The enterprise with the updated organization projects setting. - """ - enterprise: Enterprise - - """ - A message confirming the result of updating the organization projects setting. - """ - message: String -} - -""" -Autogenerated input type of UpdateEnterpriseProfile -""" -input UpdateEnterpriseProfileInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The description of the enterprise. - """ - description: String - - """ - The Enterprise ID to update. - """ - enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) - - """ - The location of the enterprise. - """ - location: String - - """ - The name of the enterprise. - """ - name: String - - """ - The URL of the enterprise's website. - """ - websiteUrl: String -} - -""" -Autogenerated return type of UpdateEnterpriseProfile -""" -type UpdateEnterpriseProfilePayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The updated enterprise. - """ - enterprise: Enterprise -} - -""" -Autogenerated input type of UpdateEnterpriseRepositoryProjectsSetting -""" -input UpdateEnterpriseRepositoryProjectsSettingInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the enterprise on which to set the repository projects setting. - """ - enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) - - """ - The value for the repository projects setting on the enterprise. - """ - settingValue: EnterpriseEnabledDisabledSettingValue! -} - -""" -Autogenerated return type of UpdateEnterpriseRepositoryProjectsSetting -""" -type UpdateEnterpriseRepositoryProjectsSettingPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The enterprise with the updated repository projects setting. - """ - enterprise: Enterprise - - """ - A message confirming the result of updating the repository projects setting. - """ - message: String -} - -""" -Autogenerated input type of UpdateEnterpriseTeamDiscussionsSetting -""" -input UpdateEnterpriseTeamDiscussionsSettingInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the enterprise on which to set the team discussions setting. - """ - enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) - - """ - The value for the team discussions setting on the enterprise. - """ - settingValue: EnterpriseEnabledDisabledSettingValue! -} - -""" -Autogenerated return type of UpdateEnterpriseTeamDiscussionsSetting -""" -type UpdateEnterpriseTeamDiscussionsSettingPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The enterprise with the updated team discussions setting. - """ - enterprise: Enterprise - - """ - A message confirming the result of updating the team discussions setting. - """ - message: String -} - -""" -Autogenerated input type of UpdateEnterpriseTwoFactorAuthenticationRequiredSetting -""" -input UpdateEnterpriseTwoFactorAuthenticationRequiredSettingInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the enterprise on which to set the two factor authentication required setting. - """ - enterpriseId: ID! @possibleTypes(concreteTypes: ["Enterprise"]) - - """ - The value for the two factor authentication required setting on the enterprise. - """ - settingValue: EnterpriseEnabledSettingValue! -} - -""" -Autogenerated return type of UpdateEnterpriseTwoFactorAuthenticationRequiredSetting -""" -type UpdateEnterpriseTwoFactorAuthenticationRequiredSettingPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The enterprise with the updated two factor authentication required setting. - """ - enterprise: Enterprise - - """ - A message confirming the result of updating the two factor authentication required setting. - """ - message: String -} - -""" -Autogenerated input type of UpdateIpAllowListEnabledSetting -""" -input UpdateIpAllowListEnabledSettingInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the owner on which to set the IP allow list enabled setting. - """ - ownerId: ID! @possibleTypes(concreteTypes: ["Enterprise", "Organization"], abstractType: "IpAllowListOwner") - - """ - The value for the IP allow list enabled setting. - """ - settingValue: IpAllowListEnabledSettingValue! -} - -""" -Autogenerated return type of UpdateIpAllowListEnabledSetting -""" -type UpdateIpAllowListEnabledSettingPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The IP allow list owner on which the setting was updated. - """ - owner: IpAllowListOwner -} - -""" -Autogenerated input type of UpdateIpAllowListEntry -""" -input UpdateIpAllowListEntryInput { - """ - An IP address or range of addresses in CIDR notation. - """ - allowListValue: String! - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the IP allow list entry to update. - """ - ipAllowListEntryId: ID! @possibleTypes(concreteTypes: ["IpAllowListEntry"]) - - """ - Whether the IP allow list entry is active when an IP allow list is enabled. - """ - isActive: Boolean! - - """ - An optional name for the IP allow list entry. - """ - name: String -} - -""" -Autogenerated return type of UpdateIpAllowListEntry -""" -type UpdateIpAllowListEntryPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The IP allow list entry that was updated. - """ - ipAllowListEntry: IpAllowListEntry -} - -""" -Autogenerated input type of UpdateIssueComment -""" -input UpdateIssueCommentInput { - """ - The updated text of the comment. - """ - body: String! - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the IssueComment to modify. - """ - id: ID! @possibleTypes(concreteTypes: ["IssueComment"]) -} - -""" -Autogenerated return type of UpdateIssueComment -""" -type UpdateIssueCommentPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The updated comment. - """ - issueComment: IssueComment -} - -""" -Autogenerated input type of UpdateIssue -""" -input UpdateIssueInput { - """ - An array of Node IDs of users for this issue. - """ - assigneeIds: [ID!] @possibleTypes(concreteTypes: ["User"]) - - """ - The body for the issue description. - """ - body: String - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the Issue to modify. - """ - id: ID! @possibleTypes(concreteTypes: ["Issue"]) - - """ - An array of Node IDs of labels for this issue. - """ - labelIds: [ID!] @possibleTypes(concreteTypes: ["Label"]) - - """ - The Node ID of the milestone for this issue. - """ - milestoneId: ID @possibleTypes(concreteTypes: ["Milestone"]) - - """ - An array of Node IDs for projects associated with this issue. - """ - projectIds: [ID!] - - """ - The desired issue state. - """ - state: IssueState - - """ - The title for the issue. - """ - title: String -} - -""" -Autogenerated return type of UpdateIssue -""" -type UpdateIssuePayload { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The issue. - """ - issue: Issue -} - -""" -Autogenerated input type of UpdateLabel -""" -input UpdateLabelInput @preview(toggledBy: "bane-preview") { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - A 6 character hex code, without the leading #, identifying the updated color of the label. - """ - color: String - - """ - A brief description of the label, such as its purpose. - """ - description: String - - """ - The Node ID of the label to be updated. - """ - id: ID! @possibleTypes(concreteTypes: ["Label"]) - - """ - The updated name of the label. - """ - name: String -} - -""" -Autogenerated return type of UpdateLabel -""" -type UpdateLabelPayload @preview(toggledBy: "bane-preview") { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The updated label. - """ - label: Label -} - -""" -Autogenerated input type of UpdateNotificationRestrictionSetting -""" -input UpdateNotificationRestrictionSettingInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the owner on which to set the restrict notifications setting. - """ - ownerId: ID! @possibleTypes(concreteTypes: ["Enterprise", "Organization"], abstractType: "VerifiableDomainOwner") - - """ - The value for the restrict notifications setting. - """ - settingValue: NotificationRestrictionSettingValue! -} - -""" -Autogenerated return type of UpdateNotificationRestrictionSetting -""" -type UpdateNotificationRestrictionSettingPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The owner on which the setting was updated. - """ - owner: VerifiableDomainOwner -} - -""" -Autogenerated input type of UpdateProjectCard -""" -input UpdateProjectCardInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - Whether or not the ProjectCard should be archived - """ - isArchived: Boolean - - """ - The note of ProjectCard. - """ - note: String - - """ - The ProjectCard ID to update. - """ - projectCardId: ID! @possibleTypes(concreteTypes: ["ProjectCard"]) -} - -""" -Autogenerated return type of UpdateProjectCard -""" -type UpdateProjectCardPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The updated ProjectCard. - """ - projectCard: ProjectCard -} - -""" -Autogenerated input type of UpdateProjectColumn -""" -input UpdateProjectColumnInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The name of project column. - """ - name: String! - - """ - The ProjectColumn ID to update. - """ - projectColumnId: ID! @possibleTypes(concreteTypes: ["ProjectColumn"]) -} - -""" -Autogenerated return type of UpdateProjectColumn -""" -type UpdateProjectColumnPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The updated project column. - """ - projectColumn: ProjectColumn -} - -""" -Autogenerated input type of UpdateProject -""" -input UpdateProjectInput { - """ - The description of project. - """ - body: String - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The name of project. - """ - name: String - - """ - The Project ID to update. - """ - projectId: ID! @possibleTypes(concreteTypes: ["Project"]) - - """ - Whether the project is public or not. - """ - public: Boolean - - """ - Whether the project is open or closed. - """ - state: ProjectState -} - -""" -Autogenerated return type of UpdateProject -""" -type UpdateProjectPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The updated project. - """ - project: Project -} - -""" -Autogenerated input type of UpdatePullRequest -""" -input UpdatePullRequestInput { - """ - An array of Node IDs of users for this pull request. - """ - assigneeIds: [ID!] @possibleTypes(concreteTypes: ["User"]) - - """ - The name of the branch you want your changes pulled into. This should be an existing branch - on the current repository. - """ - baseRefName: String - - """ - The contents of the pull request. - """ - body: String - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - An array of Node IDs of labels for this pull request. - """ - labelIds: [ID!] @possibleTypes(concreteTypes: ["Label"]) - - """ - Indicates whether maintainers can modify the pull request. - """ - maintainerCanModify: Boolean - - """ - The Node ID of the milestone for this pull request. - """ - milestoneId: ID @possibleTypes(concreteTypes: ["Milestone"]) - - """ - An array of Node IDs for projects associated with this pull request. - """ - projectIds: [ID!] - - """ - The Node ID of the pull request. - """ - pullRequestId: ID! @possibleTypes(concreteTypes: ["PullRequest"]) - - """ - The target state of the pull request. - """ - state: PullRequestUpdateState - - """ - The title of the pull request. - """ - title: String -} - -""" -Autogenerated return type of UpdatePullRequest -""" -type UpdatePullRequestPayload { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The updated pull request. - """ - pullRequest: PullRequest -} - -""" -Autogenerated input type of UpdatePullRequestReviewComment -""" -input UpdatePullRequestReviewCommentInput { - """ - The text of the comment. - """ - body: String! - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The Node ID of the comment to modify. - """ - pullRequestReviewCommentId: ID! @possibleTypes(concreteTypes: ["PullRequestReviewComment"]) -} - -""" -Autogenerated return type of UpdatePullRequestReviewComment -""" -type UpdatePullRequestReviewCommentPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The updated comment. - """ - pullRequestReviewComment: PullRequestReviewComment -} - -""" -Autogenerated input type of UpdatePullRequestReview -""" -input UpdatePullRequestReviewInput { - """ - The contents of the pull request review body. - """ - body: String! - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The Node ID of the pull request review to modify. - """ - pullRequestReviewId: ID! @possibleTypes(concreteTypes: ["PullRequestReview"]) -} - -""" -Autogenerated return type of UpdatePullRequestReview -""" -type UpdatePullRequestReviewPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The updated pull request review. - """ - pullRequestReview: PullRequestReview -} - -""" -Autogenerated input type of UpdateRef -""" -input UpdateRefInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - Permit updates of branch Refs that are not fast-forwards? - """ - force: Boolean = false - - """ - The GitObjectID that the Ref shall be updated to target. - """ - oid: GitObjectID! - - """ - The Node ID of the Ref to be updated. - """ - refId: ID! @possibleTypes(concreteTypes: ["Ref"]) -} - -""" -Autogenerated return type of UpdateRef -""" -type UpdateRefPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The updated Ref. - """ - ref: Ref -} - -""" -Autogenerated input type of UpdateRefs -""" -input UpdateRefsInput @preview(toggledBy: "update-refs-preview") { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - A list of ref updates. - """ - refUpdates: [RefUpdate!]! - - """ - The Node ID of the repository. - """ - repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) -} - -""" -Autogenerated return type of UpdateRefs -""" -type UpdateRefsPayload @preview(toggledBy: "update-refs-preview") { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String -} - -""" -Autogenerated input type of UpdateRepository -""" -input UpdateRepositoryInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - A new description for the repository. Pass an empty string to erase the existing description. - """ - description: String - - """ - Indicates if the repository should have the issues feature enabled. - """ - hasIssuesEnabled: Boolean - - """ - Indicates if the repository should have the project boards feature enabled. - """ - hasProjectsEnabled: Boolean - - """ - Indicates if the repository should have the wiki feature enabled. - """ - hasWikiEnabled: Boolean - - """ - The URL for a web page about this repository. Pass an empty string to erase the existing URL. - """ - homepageUrl: URI - - """ - The new name of the repository. - """ - name: String - - """ - The ID of the repository to update. - """ - repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) - - """ - Whether this repository should be marked as a template such that anyone who - can access it can create new repositories with the same files and directory structure. - """ - template: Boolean -} - -""" -Autogenerated return type of UpdateRepository -""" -type UpdateRepositoryPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The updated repository. - """ - repository: Repository -} - -""" -Autogenerated input type of UpdateSubscription -""" -input UpdateSubscriptionInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The new state of the subscription. - """ - state: SubscriptionState! - - """ - The Node ID of the subscribable object to modify. - """ - subscribableId: ID! @possibleTypes(concreteTypes: ["Commit", "Issue", "PullRequest", "Repository", "Team", "TeamDiscussion"], abstractType: "Subscribable") -} - -""" -Autogenerated return type of UpdateSubscription -""" -type UpdateSubscriptionPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The input subscribable entity. - """ - subscribable: Subscribable -} - -""" -Autogenerated input type of UpdateTeamDiscussionComment -""" -input UpdateTeamDiscussionCommentInput { - """ - The updated text of the comment. - """ - body: String! - - """ - The current version of the body content. - """ - bodyVersion: String - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the comment to modify. - """ - id: ID! @possibleTypes(concreteTypes: ["TeamDiscussionComment"]) -} - -""" -Autogenerated return type of UpdateTeamDiscussionComment -""" -type UpdateTeamDiscussionCommentPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The updated comment. - """ - teamDiscussionComment: TeamDiscussionComment -} - -""" -Autogenerated input type of UpdateTeamDiscussion -""" -input UpdateTeamDiscussionInput { - """ - The updated text of the discussion. - """ - body: String - - """ - The current version of the body content. If provided, this update operation - will be rejected if the given version does not match the latest version on the server. - """ - bodyVersion: String - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The Node ID of the discussion to modify. - """ - id: ID! @possibleTypes(concreteTypes: ["TeamDiscussion"]) - - """ - If provided, sets the pinned state of the updated discussion. - """ - pinned: Boolean - - """ - The updated title of the discussion. - """ - title: String -} - -""" -Autogenerated return type of UpdateTeamDiscussion -""" -type UpdateTeamDiscussionPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The updated discussion. - """ - teamDiscussion: TeamDiscussion -} - -""" -Autogenerated input type of UpdateTeamReviewAssignment -""" -input UpdateTeamReviewAssignmentInput @preview(toggledBy: "stone-crop-preview") { - """ - The algorithm to use for review assignment - """ - algorithm: TeamReviewAssignmentAlgorithm = ROUND_ROBIN - - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - Turn on or off review assignment - """ - enabled: Boolean! - - """ - An array of team member IDs to exclude - """ - excludedTeamMemberIds: [ID!] @possibleTypes(concreteTypes: ["User"]) - - """ - The Node ID of the team to update review assignments of - """ - id: ID! @possibleTypes(concreteTypes: ["Team"]) - - """ - Notify the entire team of the PR if it is delegated - """ - notifyTeam: Boolean = true - - """ - The number of team members to assign - """ - teamMemberCount: Int = 1 -} - -""" -Autogenerated return type of UpdateTeamReviewAssignment -""" -type UpdateTeamReviewAssignmentPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The team that was modified - """ - team: Team -} - -""" -Autogenerated input type of UpdateTopics -""" -input UpdateTopicsInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The Node ID of the repository. - """ - repositoryId: ID! @possibleTypes(concreteTypes: ["Repository"]) - - """ - An array of topic names. - """ - topicNames: [String!]! -} - -""" -Autogenerated return type of UpdateTopics -""" -type UpdateTopicsPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - Names of the provided topics that are not valid. - """ - invalidTopicNames: [String!] - - """ - The updated repository. - """ - repository: Repository -} - -""" -A user is an individual's account on GitHub that owns repositories and can make new content. -""" -type User implements Actor & Node & PackageOwner & ProfileOwner & ProjectOwner & RepositoryOwner & Sponsorable & UniformResourceLocatable { - """ - Determine if this repository owner has any items that can be pinned to their profile. - """ - anyPinnableItems( - """ - Filter to only a particular kind of pinnable item. - """ - type: PinnableItemType - ): Boolean! - - """ - A URL pointing to the user's public avatar. - """ - avatarUrl( - """ - The size of the resulting square image. - """ - size: Int - ): URI! - - """ - The user's public profile bio. - """ - bio: String - - """ - The user's public profile bio as HTML. - """ - bioHTML: HTML! - - """ - A list of commit comments made by this user. - """ - commitComments( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): CommitCommentConnection! - - """ - The user's public profile company. - """ - company: String - - """ - The user's public profile company as HTML. - """ - companyHTML: HTML! - - """ - The collection of contributions this user has made to different repositories. - """ - contributionsCollection( - """ - Only contributions made at this time or later will be counted. If omitted, defaults to a year ago. - """ - from: DateTime - - """ - The ID of the organization used to filter contributions. - """ - organizationID: ID - - """ - Only contributions made before and up to and including this time will be - counted. If omitted, defaults to the current time. - """ - to: DateTime - ): ContributionsCollection! - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - - """ - The user's publicly visible profile email. - """ - email: String! - - """ - A list of users the given user is followed by. - """ - followers( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): FollowerConnection! - - """ - A list of users the given user is following. - """ - following( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): FollowingConnection! - - """ - Find gist by repo name. - """ - gist( - """ - The gist name to find. - """ - name: String! - ): Gist - - """ - A list of gist comments made by this user. - """ - gistComments( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): GistCommentConnection! - - """ - A list of the Gists the user has created. - """ - gists( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for gists returned from the connection - """ - orderBy: GistOrder - - """ - Filters Gists according to privacy. - """ - privacy: GistPrivacy - ): GistConnection! - - """ - True if this user/organization has a GitHub Sponsors listing. - """ - hasSponsorsListing: Boolean! - - """ - The hovercard information for this user in a given context - """ - hovercard( - """ - The ID of the subject to get the hovercard in the context of - """ - primarySubjectId: ID - ): Hovercard! - id: ID! - - """ - The interaction ability settings for this user. - """ - interactionAbility: RepositoryInteractionAbility - - """ - Whether or not this user is a participant in the GitHub Security Bug Bounty. - """ - isBountyHunter: Boolean! - - """ - Whether or not this user is a participant in the GitHub Campus Experts Program. - """ - isCampusExpert: Boolean! - - """ - Whether or not this user is a GitHub Developer Program member. - """ - isDeveloperProgramMember: Boolean! - - """ - Whether or not this user is a GitHub employee. - """ - isEmployee: Boolean! - - """ - Whether or not this user is a member of the GitHub Stars Program. - """ - isGitHubStar: Boolean! - - """ - Whether or not the user has marked themselves as for hire. - """ - isHireable: Boolean! - - """ - Whether or not this user is a site administrator. - """ - isSiteAdmin: Boolean! - - """ - Check if the given account is sponsoring this user/organization. - """ - isSponsoredBy( - """ - The target account's login. - """ - accountLogin: String! - ): Boolean! - - """ - True if the viewer is sponsored by this user/organization. - """ - isSponsoringViewer: Boolean! - - """ - Whether or not this user is the viewing user. - """ - isViewer: Boolean! - - """ - A list of issue comments made by this user. - """ - issueComments( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for issue comments returned from the connection. - """ - orderBy: IssueCommentOrder - ): IssueCommentConnection! - - """ - A list of issues associated with this user. - """ - issues( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Filtering options for issues returned from the connection. - """ - filterBy: IssueFilters - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - A list of label names to filter the pull requests by. - """ - labels: [String!] - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for issues returned from the connection. - """ - orderBy: IssueOrder - - """ - A list of states to filter the issues by. - """ - states: [IssueState!] - ): IssueConnection! - - """ - Showcases a selection of repositories and gists that the profile owner has - either curated or that have been selected automatically based on popularity. - """ - itemShowcase: ProfileItemShowcase! - - """ - The user's public profile location. - """ - location: String - - """ - The username used to login. - """ - login: String! - - """ - The user's public profile name. - """ - name: String - - """ - Find an organization by its login that the user belongs to. - """ - organization( - """ - The login of the organization to find. - """ - login: String! - ): Organization - - """ - Verified email addresses that match verified domains for a specified organization the user is a member of. - """ - organizationVerifiedDomainEmails( - """ - The login of the organization to match verified domains from. - """ - login: String! - ): [String!]! - - """ - A list of organizations the user belongs to. - """ - organizations( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): OrganizationConnection! - - """ - A list of packages under the owner. - """ - packages( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Find packages by their names. - """ - names: [String] - - """ - Ordering of the returned packages. - """ - orderBy: PackageOrder = {field: CREATED_AT, direction: DESC} - - """ - Filter registry package by type. - """ - packageType: PackageType - - """ - Find packages in a repository by ID. - """ - repositoryId: ID - ): PackageConnection! - - """ - A list of repositories and gists this profile owner can pin to their profile. - """ - pinnableItems( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Filter the types of pinnable items that are returned. - """ - types: [PinnableItemType!] - ): PinnableItemConnection! - - """ - A list of repositories and gists this profile owner has pinned to their profile - """ - pinnedItems( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Filter the types of pinned items that are returned. - """ - types: [PinnableItemType!] - ): PinnableItemConnection! - - """ - Returns how many more items this profile owner can pin to their profile. - """ - pinnedItemsRemaining: Int! - - """ - Find project by number. - """ - project( - """ - The project number to find. - """ - number: Int! - ): Project - - """ - A list of projects under the owner. - """ - projects( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for projects returned from the connection - """ - orderBy: ProjectOrder - - """ - Query to search projects by, currently only searching by name. - """ - search: String - - """ - A list of states to filter the projects by. - """ - states: [ProjectState!] - ): ProjectConnection! - - """ - The HTTP path listing user's projects - """ - projectsResourcePath: URI! - - """ - The HTTP URL listing user's projects - """ - projectsUrl: URI! - - """ - A list of public keys associated with this user. - """ - publicKeys( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): PublicKeyConnection! - - """ - A list of pull requests associated with this user. - """ - pullRequests( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - The base ref name to filter the pull requests by. - """ - baseRefName: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - The head ref name to filter the pull requests by. - """ - headRefName: String - - """ - A list of label names to filter the pull requests by. - """ - labels: [String!] - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for pull requests returned from the connection. - """ - orderBy: IssueOrder - - """ - A list of states to filter the pull requests by. - """ - states: [PullRequestState!] - ): PullRequestConnection! - - """ - A list of repositories that the user owns. - """ - repositories( - """ - Array of viewer's affiliation options for repositories returned from the - connection. For example, OWNER will include only repositories that the - current viewer owns. - """ - affiliations: [RepositoryAffiliation] - - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - If non-null, filters repositories according to whether they are forks of another repository - """ - isFork: Boolean - - """ - If non-null, filters repositories according to whether they have been locked - """ - isLocked: Boolean - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for repositories returned from the connection - """ - orderBy: RepositoryOrder - - """ - Array of owner's affiliation options for repositories returned from the - connection. For example, OWNER will include only repositories that the - organization or user being viewed owns. - """ - ownerAffiliations: [RepositoryAffiliation] = [OWNER, COLLABORATOR] - - """ - If non-null, filters repositories according to privacy - """ - privacy: RepositoryPrivacy - ): RepositoryConnection! - - """ - A list of repositories that the user recently contributed to. - """ - repositoriesContributedTo( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - If non-null, include only the specified types of contributions. The - GitHub.com UI uses [COMMIT, ISSUE, PULL_REQUEST, REPOSITORY] - """ - contributionTypes: [RepositoryContributionType] - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - If true, include user repositories - """ - includeUserRepositories: Boolean - - """ - If non-null, filters repositories according to whether they have been locked - """ - isLocked: Boolean - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for repositories returned from the connection - """ - orderBy: RepositoryOrder - - """ - If non-null, filters repositories according to privacy - """ - privacy: RepositoryPrivacy - ): RepositoryConnection! - - """ - Find Repository. - """ - repository( - """ - Name of Repository to find. - """ - name: String! - ): Repository - - """ - The HTTP path for this user - """ - resourcePath: URI! - - """ - Replies this user has saved - """ - savedReplies( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - The field to order saved replies by. - """ - orderBy: SavedReplyOrder = {field: UPDATED_AT, direction: DESC} - ): SavedReplyConnection - - """ - The GitHub Sponsors listing for this user or organization. - """ - sponsorsListing: SponsorsListing - - """ - The viewer's sponsorship of this entity. - """ - sponsorshipForViewerAsSponsor: Sponsorship - - """ - This object's sponsorships as the maintainer. - """ - sponsorshipsAsMaintainer( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Whether or not to include private sponsorships in the result set - """ - includePrivate: Boolean = false - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for sponsorships returned from this connection. If left - blank, the sponsorships will be ordered based on relevancy to the viewer. - """ - orderBy: SponsorshipOrder - ): SponsorshipConnection! - - """ - This object's sponsorships as the sponsor. - """ - sponsorshipsAsSponsor( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for sponsorships returned from this connection. If left - blank, the sponsorships will be ordered based on relevancy to the viewer. - """ - orderBy: SponsorshipOrder - ): SponsorshipConnection! - - """ - Repositories the user has starred. - """ - starredRepositories( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Order for connection - """ - orderBy: StarOrder - - """ - Filters starred repositories to only return repositories owned by the viewer. - """ - ownedByViewer: Boolean - ): StarredRepositoryConnection! - - """ - The user's description of what they're currently doing. - """ - status: UserStatus - - """ - Repositories the user has contributed to, ordered by contribution rank, plus repositories the user has created - """ - topRepositories( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for repositories returned from the connection - """ - orderBy: RepositoryOrder! - - """ - How far back in time to fetch contributed repositories - """ - since: DateTime - ): RepositoryConnection! - - """ - The user's Twitter username. - """ - twitterUsername: String - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! - - """ - The HTTP URL for this user - """ - url: URI! - - """ - Can the viewer pin repositories and gists to the profile? - """ - viewerCanChangePinnedItems: Boolean! - - """ - Can the current viewer create new projects on this owner. - """ - viewerCanCreateProjects: Boolean! - - """ - Whether or not the viewer is able to follow the user. - """ - viewerCanFollow: Boolean! - - """ - Whether or not the viewer is able to sponsor this user/organization. - """ - viewerCanSponsor: Boolean! - - """ - Whether or not this user is followed by the viewer. - """ - viewerIsFollowing: Boolean! - - """ - True if the viewer is sponsoring this user/organization. - """ - viewerIsSponsoring: Boolean! - - """ - A list of repositories the given user is watching. - """ - watching( - """ - Affiliation options for repositories returned from the connection. If none - specified, the results will include repositories for which the current - viewer is an owner or collaborator, or member. - """ - affiliations: [RepositoryAffiliation] - - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - If non-null, filters repositories according to whether they have been locked - """ - isLocked: Boolean - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Ordering options for repositories returned from the connection - """ - orderBy: RepositoryOrder - - """ - Array of owner's affiliation options for repositories returned from the - connection. For example, OWNER will include only repositories that the - organization or user being viewed owns. - """ - ownerAffiliations: [RepositoryAffiliation] = [OWNER, COLLABORATOR] - - """ - If non-null, filters repositories according to privacy - """ - privacy: RepositoryPrivacy - ): RepositoryConnection! - - """ - A URL pointing to the user's public website/blog. - """ - websiteUrl: URI -} - -""" -The possible durations that a user can be blocked for. -""" -enum UserBlockDuration { - """ - The user was blocked for 1 day - """ - ONE_DAY - - """ - The user was blocked for 30 days - """ - ONE_MONTH - - """ - The user was blocked for 7 days - """ - ONE_WEEK - - """ - The user was blocked permanently - """ - PERMANENT - - """ - The user was blocked for 3 days - """ - THREE_DAYS -} - -""" -Represents a 'user_blocked' event on a given user. -""" -type UserBlockedEvent implements Node { - """ - Identifies the actor who performed the event. - """ - actor: Actor - - """ - Number of days that the user was blocked for. - """ - blockDuration: UserBlockDuration! - - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - id: ID! - - """ - The user who was blocked. - """ - subject: User -} - -""" -The connection type for User. -""" -type UserConnection { - """ - A list of edges. - """ - edges: [UserEdge] - - """ - A list of nodes. - """ - nodes: [User] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edit on user content -""" -type UserContentEdit implements Node { - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Identifies the date and time when the object was deleted. - """ - deletedAt: DateTime - - """ - The actor who deleted this content - """ - deletedBy: Actor - - """ - A summary of the changes for this edit - """ - diff: String - - """ - When this content was edited - """ - editedAt: DateTime! - - """ - The actor who edited this content - """ - editor: Actor - id: ID! - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! -} - -""" -A list of edits to content. -""" -type UserContentEditConnection { - """ - A list of edges. - """ - edges: [UserContentEditEdge] - - """ - A list of nodes. - """ - nodes: [UserContentEdit] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type UserContentEditEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: UserContentEdit -} - -""" -Represents a user. -""" -type UserEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: User -} - -""" -Email attributes from External Identity -""" -type UserEmailMetadata { - """ - Boolean to identify primary emails - """ - primary: Boolean - - """ - Type of email - """ - type: String - - """ - Email id - """ - value: String! -} - -""" -The user's description of what they're currently doing. -""" -type UserStatus implements Node { - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - An emoji summarizing the user's status. - """ - emoji: String - - """ - The status emoji as HTML. - """ - emojiHTML: HTML - - """ - If set, the status will not be shown after this date. - """ - expiresAt: DateTime - - """ - ID of the object. - """ - id: ID! - - """ - Whether this status indicates the user is not fully available on GitHub. - """ - indicatesLimitedAvailability: Boolean! - - """ - A brief message describing what the user is doing. - """ - message: String - - """ - The organization whose members can see this status. If null, this status is publicly visible. - """ - organization: Organization - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! - - """ - The user who has this status. - """ - user: User! -} - -""" -The connection type for UserStatus. -""" -type UserStatusConnection { - """ - A list of edges. - """ - edges: [UserStatusEdge] - - """ - A list of nodes. - """ - nodes: [UserStatus] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type UserStatusEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: UserStatus -} - -""" -Ordering options for user status connections. -""" -input UserStatusOrder { - """ - The ordering direction. - """ - direction: OrderDirection! - - """ - The field to order user statuses by. - """ - field: UserStatusOrderField! -} - -""" -Properties by which user status connections can be ordered. -""" -enum UserStatusOrderField { - """ - Order user statuses by when they were updated. - """ - UPDATED_AT -} - -""" -A domain that can be verified for an organization or an enterprise. -""" -type VerifiableDomain implements Node { - """ - Identifies the date and time when the object was created. - """ - createdAt: DateTime! - - """ - Identifies the primary key from the database. - """ - databaseId: Int - - """ - The DNS host name that should be used for verification. - """ - dnsHostName: URI - - """ - The unicode encoded domain. - """ - domain: URI! - - """ - Whether a TXT record for verification with the expected host name was found. - """ - hasFoundHostName: Boolean! - - """ - Whether a TXT record for verification with the expected verification token was found. - """ - hasFoundVerificationToken: Boolean! - id: ID! - - """ - Whether this domain is required to exist for an organization or enterprise policy to be enforced. - """ - isRequiredForPolicyEnforcement: Boolean! - - """ - Whether or not the domain is verified. - """ - isVerified: Boolean! - - """ - The owner of the domain. - """ - owner: VerifiableDomainOwner! - - """ - The punycode encoded domain. - """ - punycodeEncodedDomain: URI! - - """ - The time that the current verification token will expire. - """ - tokenExpirationTime: DateTime - - """ - Identifies the date and time when the object was last updated. - """ - updatedAt: DateTime! - - """ - The current verification token for the domain. - """ - verificationToken: String -} - -""" -The connection type for VerifiableDomain. -""" -type VerifiableDomainConnection { - """ - A list of edges. - """ - edges: [VerifiableDomainEdge] - - """ - A list of nodes. - """ - nodes: [VerifiableDomain] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Identifies the total count of items in the connection. - """ - totalCount: Int! -} - -""" -An edge in a connection. -""" -type VerifiableDomainEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: VerifiableDomain -} - -""" -Ordering options for verifiable domain connections. -""" -input VerifiableDomainOrder { - """ - The ordering direction. - """ - direction: OrderDirection! - - """ - The field to order verifiable domains by. - """ - field: VerifiableDomainOrderField! -} - -""" -Properties by which verifiable domain connections can be ordered. -""" -enum VerifiableDomainOrderField { - """ - Order verifiable domains by their creation date. - """ - CREATED_AT - - """ - Order verifiable domains by the domain name. - """ - DOMAIN -} - -""" -Types that can own a verifiable domain. -""" -union VerifiableDomainOwner = Enterprise | Organization - -""" -Autogenerated input type of VerifyVerifiableDomain -""" -input VerifyVerifiableDomainInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The ID of the verifiable domain to verify. - """ - id: ID! @possibleTypes(concreteTypes: ["VerifiableDomain"]) -} - -""" -Autogenerated return type of VerifyVerifiableDomain -""" -type VerifyVerifiableDomainPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The verifiable domain that was verified. - """ - domain: VerifiableDomain -} - -""" -A hovercard context with a message describing how the viewer is related. -""" -type ViewerHovercardContext implements HovercardContext { - """ - A string describing this context - """ - message: String! - - """ - An octicon to accompany this context - """ - octicon: String! - - """ - Identifies the user who is related to this context. - """ - viewer: User! -} - -""" -A valid x509 certificate string -""" -scalar X509Certificate - -""" -The root query for implementing GraphQL subscriptions. -""" -type Subscription { - count: Int! -} \ No newline at end of file diff --git a/go.mod b/go.mod index 6fe9424c..d6967948 100644 --- a/go.mod +++ b/go.mod @@ -21,6 +21,6 @@ require ( github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect golang.org/x/mod v0.10.0 // indirect - golang.org/x/sys v0.8.0 // indirect + golang.org/x/sys v0.12.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 4321f309..9388a4f5 100644 --- a/go.sum +++ b/go.sum @@ -48,8 +48,8 @@ github.com/vektah/gqlparser/v2 v2.5.8/go.mod h1:z8xXUff237NntSuH8mLFijZ+1tjV1swD golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 049f7f1880e12048821eb98fd5c3020504ce3b56 Mon Sep 17 00:00:00 2001 From: matthieu4294967296moineau Date: Fri, 6 Oct 2023 09:28:17 +0200 Subject: [PATCH 20/35] removed package gorilla/websocket from lint file --- .golangci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index 3c294267..7f96025c 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -49,7 +49,6 @@ linters-settings: - golang.org/x/tools - gopkg.in/yaml.v2 - github.com/alexflint/go-arg - - github.com/gorilla/websocket forbidigo: forbid: From 5b6f4bf31312f90b1d073f37f1f4739230992adf Mon Sep 17 00:00:00 2001 From: matthieu4294967296moineau Date: Fri, 6 Oct 2023 09:33:58 +0200 Subject: [PATCH 21/35] added link to doc --- docs/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 497fdc66..d22d07fa 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -26,7 +26,7 @@ When releasing a new version: - The new `optional: generic` allows using a generic type to represent optionality. See the [documentation](genqlient.yaml) for details. - For schemas with enum values that differ only in casing, it's now possible to disable smart-casing in genqlient.yaml; see the [documentation](genqlient.yaml) for `casing` for details. -- genqlient now supports subscriptions +- genqlient now supports subscriptions; see the [documentation](FAQ.md) for how to `subscribe to an API 'subscription' endpoint` ### Bug fixes: - The presence of negative pointer directives, i.e., `# @genqlient(pointer: false)` are now respected even in the when `optional: pointer` is set in the configuration file. From f5d2e926cb756ca97c88b21e89846a4a9488f6bd Mon Sep 17 00:00:00 2001 From: matthieu4294967296moineau Date: Fri, 6 Oct 2023 09:36:31 +0200 Subject: [PATCH 22/35] remove useless underscore --- generate/operation.go.tmpl | 4 ++-- ...e-SimpleSubscription.graphql-SimpleSubscription.graphql.go | 4 ++-- internal/integration/generated.go | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/generate/operation.go.tmpl b/generate/operation.go.tmpl index 1d32c88c..94ad55b5 100644 --- a/generate/operation.go.tmpl +++ b/generate/operation.go.tmpl @@ -70,8 +70,8 @@ func {{.Name}}ForwardData(dataChan_ chan {{.Name}}WsResponse, respChan_ chan jso var gqlResp graphql.Response var wsResp {{.Name}}WsResponse for { - jsonRaw, more_ := <-respChan_ - if !more_ { + jsonRaw, more := <-respChan_ + if !more { return } err := json.Unmarshal(jsonRaw, &gqlResp) diff --git a/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go index e236254e..8c117496 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go @@ -56,8 +56,8 @@ func SimpleSubscriptionForwardData(dataChan_ chan SimpleSubscriptionWsResponse, var gqlResp graphql.Response var wsResp SimpleSubscriptionWsResponse for { - jsonRaw, more_ := <-respChan_ - if !more_ { + jsonRaw, more := <-respChan_ + if !more { return } err := json.Unmarshal(jsonRaw, &gqlResp) diff --git a/internal/integration/generated.go b/internal/integration/generated.go index fbf71bc6..30006c9c 100644 --- a/internal/integration/generated.go +++ b/internal/integration/generated.go @@ -3126,8 +3126,8 @@ func countForwardData(dataChan_ chan countWsResponse, respChan_ chan json.RawMes var gqlResp graphql.Response var wsResp countWsResponse for { - jsonRaw, more_ := <-respChan_ - if !more_ { + jsonRaw, more := <-respChan_ + if !more { return } err := json.Unmarshal(jsonRaw, &gqlResp) From 70661393e47502b15fa506819cef4b0243dfc42f Mon Sep 17 00:00:00 2001 From: matthieu4294967296moineau Date: Fri, 6 Oct 2023 09:38:53 +0200 Subject: [PATCH 23/35] bis --- generate/operation.go.tmpl | 4 ++-- ...e-SimpleSubscription.graphql-SimpleSubscription.graphql.go | 4 ++-- internal/integration/generated.go | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/generate/operation.go.tmpl b/generate/operation.go.tmpl index 94ad55b5..b56d2c5a 100644 --- a/generate/operation.go.tmpl +++ b/generate/operation.go.tmpl @@ -65,12 +65,12 @@ type {{.Name}}WsResponse struct { Errors error `json:"errors"` } -func {{.Name}}ForwardData(dataChan_ chan {{.Name}}WsResponse, respChan_ chan json.RawMessage, errChan_ chan error) { +func {{.Name}}ForwardData(dataChan_ chan {{.Name}}WsResponse, respChan chan json.RawMessage, errChan_ chan error) { defer close(dataChan_) var gqlResp graphql.Response var wsResp {{.Name}}WsResponse for { - jsonRaw, more := <-respChan_ + jsonRaw, more := <-respChan if !more { return } diff --git a/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go index 8c117496..1791ffec 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go @@ -51,12 +51,12 @@ type SimpleSubscriptionWsResponse struct { Errors error `json:"errors"` } -func SimpleSubscriptionForwardData(dataChan_ chan SimpleSubscriptionWsResponse, respChan_ chan json.RawMessage, errChan_ chan error) { +func SimpleSubscriptionForwardData(dataChan_ chan SimpleSubscriptionWsResponse, respChan chan json.RawMessage, errChan_ chan error) { defer close(dataChan_) var gqlResp graphql.Response var wsResp SimpleSubscriptionWsResponse for { - jsonRaw, more := <-respChan_ + jsonRaw, more := <-respChan if !more { return } diff --git a/internal/integration/generated.go b/internal/integration/generated.go index 30006c9c..ff62a46b 100644 --- a/internal/integration/generated.go +++ b/internal/integration/generated.go @@ -3121,12 +3121,12 @@ type countWsResponse struct { Errors error `json:"errors"` } -func countForwardData(dataChan_ chan countWsResponse, respChan_ chan json.RawMessage, errChan_ chan error) { +func countForwardData(dataChan_ chan countWsResponse, respChan chan json.RawMessage, errChan_ chan error) { defer close(dataChan_) var gqlResp graphql.Response var wsResp countWsResponse for { - jsonRaw, more := <-respChan_ + jsonRaw, more := <-respChan if !more { return } From 28987e18a95dce933a4b467cb35fff0651948ee6 Mon Sep 17 00:00:00 2001 From: matthieu4294967296moineau Date: Fri, 6 Oct 2023 09:55:41 +0200 Subject: [PATCH 24/35] possible to define other websocket protocol via header --- docs/CHANGELOG.md | 3 ++- docs/FAQ.md | 6 +++++- graphql/client.go | 4 +++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index d22d07fa..da5e604b 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -26,7 +26,8 @@ When releasing a new version: - The new `optional: generic` allows using a generic type to represent optionality. See the [documentation](genqlient.yaml) for details. - For schemas with enum values that differ only in casing, it's now possible to disable smart-casing in genqlient.yaml; see the [documentation](genqlient.yaml) for `casing` for details. -- genqlient now supports subscriptions; see the [documentation](FAQ.md) for how to `subscribe to an API 'subscription' endpoint` +- genqlient now supports subscriptions; the websocket protocol is by default `graphql-transport-ws` but can be set to another value. + See the [documentation](FAQ.md) for how to `subscribe to an API 'subscription' endpoint`. ### Bug fixes: - The presence of negative pointer directives, i.e., `# @genqlient(pointer: false)` are now respected even in the when `optional: pointer` is set in the configuration file. diff --git a/docs/FAQ.md b/docs/FAQ.md index b7b49226..f1b49325 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -108,7 +108,7 @@ Once your webSocket client matches the interfaces, you can get your `graphql.Web a loop for incoming messages and errors: ```go -graphqlClient := graphql.NewClientUsingWebSocket( + graphqlClient := graphql.NewClientUsingWebSocket( "ws://localhost:8080/query", &MyDialer{Dialer: dialer}, headers, @@ -139,6 +139,10 @@ graphqlClient := graphql.NewClientUsingWebSocket( } } ``` +To change the websocket protocol from its default value `graphql-transport-ws`, add the following header before calling `graphql.NewClientUsingWebSocket()`: +```go + headers.Add("Sec-WebSocket-Protocol", "graphql-ws") +``` ### … use an API that requires authentication? diff --git a/graphql/client.go b/graphql/client.go index b691ac14..94dbe8b7 100644 --- a/graphql/client.go +++ b/graphql/client.go @@ -132,7 +132,9 @@ func NewClientUsingWebSocket(endpoint string, wsDialer Dialer, headers http.Head if headers == nil { headers = http.Header{} } - headers.Add("Sec-WebSocket-Protocol", "graphql-transport-ws") + if headers.Get("Sec-WebSocket-Protocol") == "" { + headers.Add("Sec-WebSocket-Protocol", "graphql-transport-ws") + } return &webSocketClient{ Dialer: wsDialer, Header: headers, From 5487b0bdca5d53b0f5c1d23fb9e0a9f498fca729 Mon Sep 17 00:00:00 2001 From: matthieu4294967296moineau Date: Fri, 6 Oct 2023 11:37:09 +0200 Subject: [PATCH 25/35] removed buffer from channels --- generate/operation.go.tmpl | 4 ++-- ...e-SimpleSubscription.graphql-SimpleSubscription.graphql.go | 4 ++-- graphql/client.go | 2 +- internal/integration/generated.go | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/generate/operation.go.tmpl b/generate/operation.go.tmpl index b56d2c5a..0edd3133 100644 --- a/generate/operation.go.tmpl +++ b/generate/operation.go.tmpl @@ -36,8 +36,8 @@ func {{.Name}}( } {{end}} {{if eq .Type "subscription"}} - dataChan_ = make(chan {{.Name}}WsResponse, 1) - respChan_ := make(chan json.RawMessage, 1) + dataChan_ = make(chan {{.Name}}WsResponse) + respChan_ := make(chan json.RawMessage) errChan_, err_ = client_.DialWebSocket({{if ne .Config.ContextType "-" -}}ctx_{{else}}context.Background(){{end}}, req_, respChan_) if err_ != nil { diff --git a/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go index 1791ffec..1857fe9e 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go @@ -33,8 +33,8 @@ func SimpleSubscription( Query: SimpleSubscription_Operation, } - dataChan_ = make(chan SimpleSubscriptionWsResponse, 1) - respChan_ := make(chan json.RawMessage, 1) + dataChan_ = make(chan SimpleSubscriptionWsResponse) + respChan_ := make(chan json.RawMessage) errChan_, err_ = client_.DialWebSocket(context.Background(), req_, respChan_) if err_ != nil { diff --git a/graphql/client.go b/graphql/client.go index 94dbe8b7..c92cd026 100644 --- a/graphql/client.go +++ b/graphql/client.go @@ -139,7 +139,7 @@ func NewClientUsingWebSocket(endpoint string, wsDialer Dialer, headers http.Head Dialer: wsDialer, Header: headers, endpoint: endpoint, - errChan: make(chan error, 1), + errChan: make(chan error), } } diff --git a/internal/integration/generated.go b/internal/integration/generated.go index ff62a46b..4edafebf 100644 --- a/internal/integration/generated.go +++ b/internal/integration/generated.go @@ -3103,8 +3103,8 @@ func count( Query: count_Operation, } - dataChan_ = make(chan countWsResponse, 1) - respChan_ := make(chan json.RawMessage, 1) + dataChan_ = make(chan countWsResponse) + respChan_ := make(chan json.RawMessage) errChan_, err_ = client_.DialWebSocket(ctx_, req_, respChan_) if err_ != nil { From cf8b2c680d06fcdf8a761fe1b3af748c9c36efea Mon Sep 17 00:00:00 2001 From: matthieu4294967296moineau Date: Fri, 6 Oct 2023 14:50:08 +0200 Subject: [PATCH 26/35] checking context --- generate/operation.go.tmpl | 50 ++++++++++++++++++------------- internal/integration/generated.go | 37 +++++++++++++---------- 2 files changed, 51 insertions(+), 36 deletions(-) diff --git a/generate/operation.go.tmpl b/generate/operation.go.tmpl index 0edd3133..ca849244 100644 --- a/generate/operation.go.tmpl +++ b/generate/operation.go.tmpl @@ -43,7 +43,7 @@ func {{.Name}}( if err_ != nil { return nil, nil, err_ } - go {{.Name}}ForwardData(dataChan_, respChan_, errChan_) + go {{.Name}}ForwardData({{if ne .Config.ContextType "-" -}}ctx_, {{end}}dataChan_, respChan_, errChan_) {{else}} data_ = &{{.ResponseName}}{} resp_ := &graphql.Response{Data: data_} @@ -65,30 +65,38 @@ type {{.Name}}WsResponse struct { Errors error `json:"errors"` } -func {{.Name}}ForwardData(dataChan_ chan {{.Name}}WsResponse, respChan chan json.RawMessage, errChan_ chan error) { +func {{.Name}}ForwardData({{if ne .Config.ContextType "-" -}}ctx_ {{ref .Config.ContextType}}, {{end}}dataChan_ chan {{.Name}}WsResponse, respChan chan json.RawMessage, errChan_ chan error) { defer close(dataChan_) var gqlResp graphql.Response var wsResp {{.Name}}WsResponse for { - jsonRaw, more := <-respChan - if !more { - return - } - err := json.Unmarshal(jsonRaw, &gqlResp) - if err != nil { - errChan_ <- err - return - } - if len(gqlResp.Errors) == 0 { - err = json.Unmarshal(jsonRaw, &wsResp) - if err != nil { - errChan_ <- err - return - } - } else { - wsResp.Errors = gqlResp.Errors - } - dataChan_ <- wsResp + {{if ne .Config.ContextType "-" -}} + select { + case <-ctx_.Done(): + errChan_ <- errors.New("context was canceled") + return + default: + {{end -}} + jsonRaw, more := <-respChan + if !more { + return + } + err := json.Unmarshal(jsonRaw, &gqlResp) + if err != nil { + errChan_ <- err + return + } + if len(gqlResp.Errors) == 0 { + err = json.Unmarshal(jsonRaw, &wsResp) + if err != nil { + errChan_ <- err + return + } + } else { + wsResp.Errors = gqlResp.Errors + } + dataChan_ <- wsResp + {{if ne .Config.ContextType "-" -}}}{{end -}} } } {{end}} diff --git a/internal/integration/generated.go b/internal/integration/generated.go index 4edafebf..4a55eb3d 100644 --- a/internal/integration/generated.go +++ b/internal/integration/generated.go @@ -5,6 +5,7 @@ package integration import ( "context" "encoding/json" + "errors" "fmt" "time" @@ -3110,7 +3111,7 @@ func count( if err_ != nil { return nil, nil, err_ } - go countForwardData(dataChan_, respChan_, errChan_) + go countForwardData(ctx_, dataChan_, respChan_, errChan_) return dataChan_, errChan_, err_ } @@ -3121,30 +3122,36 @@ type countWsResponse struct { Errors error `json:"errors"` } -func countForwardData(dataChan_ chan countWsResponse, respChan chan json.RawMessage, errChan_ chan error) { +func countForwardData(ctx_ context.Context, dataChan_ chan countWsResponse, respChan chan json.RawMessage, errChan_ chan error) { defer close(dataChan_) var gqlResp graphql.Response var wsResp countWsResponse for { - jsonRaw, more := <-respChan - if !more { + select { + case <-ctx_.Done(): + errChan_ <- errors.New("context was canceled") return - } - err := json.Unmarshal(jsonRaw, &gqlResp) - if err != nil { - errChan_ <- err - return - } - if len(gqlResp.Errors) == 0 { - err = json.Unmarshal(jsonRaw, &wsResp) + default: + jsonRaw, more := <-respChan + if !more { + return + } + err := json.Unmarshal(jsonRaw, &gqlResp) if err != nil { errChan_ <- err return } - } else { - wsResp.Errors = gqlResp.Errors + if len(gqlResp.Errors) == 0 { + err = json.Unmarshal(jsonRaw, &wsResp) + if err != nil { + errChan_ <- err + return + } + } else { + wsResp.Errors = gqlResp.Errors + } + dataChan_ <- wsResp } - dataChan_ <- wsResp } } From 0781863043730e96d7b2e01573329b39b3511d7d Mon Sep 17 00:00:00 2001 From: matthieu4294967296moineau Date: Mon, 9 Oct 2023 17:19:00 +0200 Subject: [PATCH 27/35] only 1 goroutine; multiple subscriptions per connection --- .golangci.yml | 1 + docs/FAQ.md | 12 +- generate/generate.go | 2 +- generate/operation.go.tmpl | 60 ++---- ...tion.graphql-SimpleSubscription.graphql.go | 52 ++--- go.mod | 1 + go.sum | 2 + graphql/client.go | 183 ++++++++++-------- graphql/subscription.go | 43 ++++ graphql/websocket.go | 53 ++--- internal/integration/generated.go | 58 ++---- internal/integration/integration_test.go | 17 +- internal/integration/roundtrip.go | 12 +- 13 files changed, 261 insertions(+), 235 deletions(-) create mode 100644 graphql/subscription.go diff --git a/.golangci.yml b/.golangci.yml index 7f96025c..6e65e014 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -49,6 +49,7 @@ linters-settings: - golang.org/x/tools - gopkg.in/yaml.v2 - github.com/alexflint/go-arg + - github.com/google/uuid forbidigo: forbid: diff --git a/docs/FAQ.md b/docs/FAQ.md index f1b49325..66dde308 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -114,7 +114,12 @@ a loop for incoming messages and errors: headers, ) - respChan, errChan, err := count(context.Background(), graphqlClient) + errChan, err := graphqlClient.StartWebSocket(ctx) + if err != nil { + return + } + + dataChan, subscriptionID, err := count(ctx, graphqlClient) if err != nil { return } @@ -122,7 +127,7 @@ a loop for incoming messages and errors: defer graphqlClient.CloseWebSocket() for loop := true; loop; { select { - case msg, more := <-respChan: + case msg, more := <-dataChan: if !more { loop = false break @@ -136,6 +141,9 @@ a loop for incoming messages and errors: } case err = <-errChan: return + case <-time.After(time.Minute): + err = wsClient.Unsubscribe(subscriptionID) + loop = false } } ``` diff --git a/generate/generate.go b/generate/generate.go index 07661ca9..be26301a 100644 --- a/generate/generate.go +++ b/generate/generate.go @@ -282,7 +282,7 @@ func (g *generator) addOperation(op *ast.OperationDefinition) error { docComment = "// " + strings.ReplaceAll(commentLines, "\n", "\n// ") } if op.Operation == ast.Subscription { - docComment += "\n// To close the connection, use [graphql.WebSocketClient.CloseWebSocket()]" + docComment += "\n// To unsubscribe, use [graphql.WebSocketClient.Unsubscribe]" } // If the filename is a pseudo-filename filename.go:startline, just diff --git a/generate/operation.go.tmpl b/generate/operation.go.tmpl index ca849244..1b70890e 100644 --- a/generate/operation.go.tmpl +++ b/generate/operation.go.tmpl @@ -15,7 +15,7 @@ func {{.Name}}( {{.GraphQLName}} {{.GoType.Reference}}, {{end -}} {{end -}} -) ({{if eq .Type "subscription"}}dataChan_ chan {{.Name}}WsResponse, errChan_ chan error,{{else}}data_ *{{.ResponseName}}, {{if .Config.Extensions -}}ext_ map[string]interface{},{{end}}{{end}} err_ error) { +) ({{if eq .Type "subscription"}}dataChan_ chan {{.Name}}WsResponse, subscriptionID_ string,{{else}}data_ *{{.ResponseName}}, {{if .Config.Extensions -}}ext_ map[string]interface{},{{end}}{{end}} err_ error) { req_ := &graphql.Request{ OpName: "{{.Name}}", Query: {{.Name}}_Operation, @@ -37,13 +37,7 @@ func {{.Name}}( {{end}} {{if eq .Type "subscription"}} dataChan_ = make(chan {{.Name}}WsResponse) - respChan_ := make(chan json.RawMessage) - - errChan_, err_ = client_.DialWebSocket({{if ne .Config.ContextType "-" -}}ctx_{{else}}context.Background(){{end}}, req_, respChan_) - if err_ != nil { - return nil, nil, err_ - } - go {{.Name}}ForwardData({{if ne .Config.ContextType "-" -}}ctx_, {{end}}dataChan_, respChan_, errChan_) + subscriptionID_, err_ = client_.Subscribe(req_, dataChan_, {{.Name}}ForwardData) {{else}} data_ = &{{.ResponseName}}{} resp_ := &graphql.Response{Data: data_} @@ -55,7 +49,7 @@ func {{.Name}}( ) {{end}} - return {{if eq .Type "subscription"}}dataChan_, errChan_,{{else}}data_, {{if .Config.Extensions -}}resp_.Extensions,{{end -}}{{end}} err_ + return {{if eq .Type "subscription"}}dataChan_, subscriptionID_,{{else}}data_, {{if .Config.Extensions -}}resp_.Extensions,{{end -}}{{end}} err_ } {{if eq .Type "subscription"}} @@ -65,38 +59,26 @@ type {{.Name}}WsResponse struct { Errors error `json:"errors"` } -func {{.Name}}ForwardData({{if ne .Config.ContextType "-" -}}ctx_ {{ref .Config.ContextType}}, {{end}}dataChan_ chan {{.Name}}WsResponse, respChan chan json.RawMessage, errChan_ chan error) { - defer close(dataChan_) +func {{.Name}}ForwardData(interfaceChan interface{}, jsonRawMsg json.RawMessage) error { var gqlResp graphql.Response var wsResp {{.Name}}WsResponse - for { - {{if ne .Config.ContextType "-" -}} - select { - case <-ctx_.Done(): - errChan_ <- errors.New("context was canceled") - return - default: - {{end -}} - jsonRaw, more := <-respChan - if !more { - return - } - err := json.Unmarshal(jsonRaw, &gqlResp) - if err != nil { - errChan_ <- err - return - } - if len(gqlResp.Errors) == 0 { - err = json.Unmarshal(jsonRaw, &wsResp) - if err != nil { - errChan_ <- err - return - } - } else { - wsResp.Errors = gqlResp.Errors - } - dataChan_ <- wsResp - {{if ne .Config.ContextType "-" -}}}{{end -}} + err := json.Unmarshal(jsonRawMsg, &gqlResp) + if err != nil { + return err + } + if len(gqlResp.Errors) == 0 { + err = json.Unmarshal(jsonRawMsg, &wsResp) + if err != nil { + return err + } + } else { + wsResp.Errors = gqlResp.Errors + } + dataChan_, ok := interfaceChan.(chan {{.Name}}WsResponse) + if !ok { + return errors.New("failed to cast interface into 'chan {{.Name}}WsResponse'") } + dataChan_ <- wsResp + return nil } {{end}} diff --git a/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go index 1857fe9e..4f1ebca6 100644 --- a/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-SimpleSubscription.graphql-SimpleSubscription.graphql.go @@ -3,8 +3,8 @@ package test import ( - "context" "encoding/json" + "errors" "github.com/Khan/genqlient/graphql" ) @@ -24,25 +24,19 @@ subscription SimpleSubscription { } ` -// To close the connection, use [graphql.WebSocketClient.CloseWebSocket()] +// To unsubscribe, use [graphql.WebSocketClient.Unsubscribe] func SimpleSubscription( client_ graphql.WebSocketClient, -) (dataChan_ chan SimpleSubscriptionWsResponse, errChan_ chan error, err_ error) { +) (dataChan_ chan SimpleSubscriptionWsResponse, subscriptionID_ string, err_ error) { req_ := &graphql.Request{ OpName: "SimpleSubscription", Query: SimpleSubscription_Operation, } dataChan_ = make(chan SimpleSubscriptionWsResponse) - respChan_ := make(chan json.RawMessage) + subscriptionID_, err_ = client_.Subscribe(req_, dataChan_, SimpleSubscriptionForwardData) - errChan_, err_ = client_.DialWebSocket(context.Background(), req_, respChan_) - if err_ != nil { - return nil, nil, err_ - } - go SimpleSubscriptionForwardData(dataChan_, respChan_, errChan_) - - return dataChan_, errChan_, err_ + return dataChan_, subscriptionID_, err_ } type SimpleSubscriptionWsResponse struct { @@ -51,30 +45,26 @@ type SimpleSubscriptionWsResponse struct { Errors error `json:"errors"` } -func SimpleSubscriptionForwardData(dataChan_ chan SimpleSubscriptionWsResponse, respChan chan json.RawMessage, errChan_ chan error) { - defer close(dataChan_) +func SimpleSubscriptionForwardData(interfaceChan interface{}, jsonRawMsg json.RawMessage) error { var gqlResp graphql.Response var wsResp SimpleSubscriptionWsResponse - for { - jsonRaw, more := <-respChan - if !more { - return - } - err := json.Unmarshal(jsonRaw, &gqlResp) + err := json.Unmarshal(jsonRawMsg, &gqlResp) + if err != nil { + return err + } + if len(gqlResp.Errors) == 0 { + err = json.Unmarshal(jsonRawMsg, &wsResp) if err != nil { - errChan_ <- err - return - } - if len(gqlResp.Errors) == 0 { - err = json.Unmarshal(jsonRaw, &wsResp) - if err != nil { - errChan_ <- err - return - } - } else { - wsResp.Errors = gqlResp.Errors + return err } - dataChan_ <- wsResp + } else { + wsResp.Errors = gqlResp.Errors + } + dataChan_, ok := interfaceChan.(chan SimpleSubscriptionWsResponse) + if !ok { + return errors.New("failed to cast interface into 'chan SimpleSubscriptionWsResponse'") } + dataChan_ <- wsResp + return nil } diff --git a/go.mod b/go.mod index d6967948..6d3f2050 100644 --- a/go.mod +++ b/go.mod @@ -6,6 +6,7 @@ require ( github.com/99designs/gqlgen v0.17.35 github.com/alexflint/go-arg v1.4.2 github.com/bradleyjkemp/cupaloy/v2 v2.6.0 + github.com/google/uuid v1.3.1 github.com/gorilla/websocket v1.5.0 github.com/stretchr/testify v1.8.2 github.com/vektah/gqlparser/v2 v2.5.8 diff --git a/go.sum b/go.sum index 9388a4f5..885c5957 100644 --- a/go.sum +++ b/go.sum @@ -17,6 +17,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= +github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= +github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/hashicorp/golang-lru/v2 v2.0.3 h1:kmRrRLlInXvng0SmLxmQpQkpbYAvcXm7NPDrgxJa9mE= diff --git a/graphql/client.go b/graphql/client.go index c92cd026..34882b1f 100644 --- a/graphql/client.go +++ b/graphql/client.go @@ -10,7 +10,9 @@ import ( "net/http" "net/url" "strings" + "sync" + "github.com/google/uuid" "github.com/vektah/gqlparser/v2/gqlerror" ) @@ -41,32 +43,38 @@ type Client interface { } type WebSocketClient interface { - // DialWebSocket must open a webSocket connection and subscribe to an endpoint + // StartWebSocket must open a webSocket connection and subscribe to an endpoint // of the client's GraphQL API. // - // ctx is the context that should be used to make this request. If context - // is disabled in the genqlient settings, this will be set to - // context.Background(). + // errChan is a channel on which are sent the errors of webSocket + // communication. + // + // err is any error that occurs when setting up the webSocket connection. + StartWebSocket(ctx context.Context) (errChan chan error, err error) + + // CloseWebSocket must close the webSocket connection. + CloseWebSocket() + + // Subscribe must subscribe to an endpoint of the client's GraphQL API. // // req contains the data to be sent to the GraphQL server. Will be marshalled // into JSON bytes. // - // respChan is a channel used to send the data that arrives via the + // interfaceChan is a channel used to send the data that arrives via the // webSocket connection. // - // errChan is a channel on which are sent the errors of webSocket - // communication. + // forwardDataFunc is the function that will cast the received interface into + // the valid type for the subscription's response. // - // err is any error that occurs when setting up the webSocket connection. - DialWebSocket( - ctx context.Context, + // returns a subscriptionID if successful, an error otherwise + Subscribe( req *Request, - respChan chan json.RawMessage, - ) (errChan chan error, err error) + interfaceChan interface{}, + forwardDataFunc ForwardDataFunction, + ) (string, error) - // CloseWebSocket must end the graphql subscription and close the webSocket - // connection. - CloseWebSocket() + // Unsubscribe must unsubscribe from an endpoint of the client's GraphQL API. + Unsubscribe(subscriptionID string) error } type client struct { @@ -76,11 +84,13 @@ type client struct { } type webSocketClient struct { - Dialer Dialer - Header http.Header - conn WSConn - errChan chan error - endpoint string + Dialer Dialer + Header http.Header + conn WSConn + errChan chan error + endpoint string + subscriptions subscriptionMap + sync.RWMutex } // NewClient returns a [Client] which makes requests to the given endpoint, @@ -136,10 +146,11 @@ func NewClientUsingWebSocket(endpoint string, wsDialer Dialer, headers http.Head headers.Add("Sec-WebSocket-Protocol", "graphql-transport-ws") } return &webSocketClient{ - Dialer: wsDialer, - Header: headers, - endpoint: endpoint, - errChan: make(chan error), + Dialer: wsDialer, + Header: headers, + errChan: make(chan error), + endpoint: endpoint, + subscriptions: subscriptionMap{map_: make(map[string]subscription)}, } } @@ -251,66 +262,6 @@ func (c *client) MakeRequest(ctx context.Context, req *Request, resp *Response) return nil } -func (w *webSocketClient) DialWebSocket(ctx context.Context, req *Request, respChan chan json.RawMessage) (errChan chan error, err error) { - if req.Query != "" { - if strings.HasPrefix(strings.TrimSpace(req.Query), "query") { - return nil, errors.New("client does not support queries") - } - if strings.HasPrefix(strings.TrimSpace(req.Query), "mutation") { - return nil, errors.New("client does not support mutations") - } - } - - err = w.subscribeAndListen( - ctx, - req, - respChan, - ) - - return w.errChan, err -} - -func (w *webSocketClient) CloseWebSocket() { - defer w.conn.Close() - err := w.sendComplete() - if err != nil { - w.errChan <- err - } - err = w.conn.WriteMessage(closeMessage, formatCloseMessage(closeNormalClosure, "")) - if err != nil { - w.errChan <- err - } -} - -func (w *webSocketClient) subscribeAndListen(ctx context.Context, req *Request, respChan chan json.RawMessage) error { - var err error - w.conn, err = w.Dialer.DialContext(ctx, w.endpoint, w.Header) - if err != nil { - return err - } - - err = w.sendInit() - if err != nil { - w.conn.Close() - return err - } - err = w.waitForConnAck() - if err != nil { - w.conn.Close() - return err - } - - go w.listenWebSocket(respChan) - - err = w.sendSubscribe(req) - if err != nil { - w.conn.Close() - return err - } - - return nil -} - func (c *client) createPostRequest(req *Request) (*http.Request, error) { if req.Query != "" { if strings.HasPrefix(strings.TrimSpace(req.Query), "subscription") { @@ -382,3 +333,67 @@ func (c *client) createGetRequest(req *Request) (*http.Request, error) { return httpReq, nil } + +func (w *webSocketClient) StartWebSocket(ctx context.Context) (errChan chan error, err error) { + w.conn, err = w.Dialer.DialContext(ctx, w.endpoint, w.Header) + if err != nil { + return nil, err + } + err = w.sendInit() + if err != nil { + w.conn.Close() + return nil, err + } + err = w.waitForConnAck() + if err != nil { + w.conn.Close() + return nil, err + } + go w.listenWebSocket() + return w.errChan, err +} + +func (w *webSocketClient) CloseWebSocket() { + defer w.conn.Close() + err := w.conn.WriteMessage(closeMessage, formatCloseMessage(closeNormalClosure, "")) + if err != nil { + w.errChan <- err + } +} + +func (w *webSocketClient) Subscribe(req *Request, interfaceChan interface{}, forwardDataFunc ForwardDataFunction) (string, error) { + if req.Query != "" { + if strings.HasPrefix(strings.TrimSpace(req.Query), "query") { + return "", errors.New("client does not support queries") + } + if strings.HasPrefix(strings.TrimSpace(req.Query), "mutation") { + return "", errors.New("client does not support mutations") + } + } + + subscriptionID := uuid.NewString() + subscriptionMsg := webSocketSendMessage{ + Type: webSocketTypeSubscribe, + Payload: req, + ID: subscriptionID, + } + err := w.sendStructAsJSON(subscriptionMsg) + if err != nil { + return "", err + } + w.subscriptions.Create(subscriptionID, interfaceChan, forwardDataFunc) + return subscriptionID, nil +} + +func (w *webSocketClient) Unsubscribe(subscriptionID string) error { + completeMsg := webSocketSendMessage{ + Type: webSocketTypeComplete, + ID: subscriptionID, + } + err := w.sendStructAsJSON(completeMsg) + if err != nil { + return err + } + w.subscriptions.Delete(subscriptionID) + return nil +} diff --git a/graphql/subscription.go b/graphql/subscription.go new file mode 100644 index 00000000..79c765fd --- /dev/null +++ b/graphql/subscription.go @@ -0,0 +1,43 @@ +package graphql + +import ( + "encoding/json" + "sync" +) + +// map of subscription ID to subscription +type subscriptionMap struct { + map_ map[string]subscription + sync.RWMutex +} + +type subscription struct { + interfaceChan interface{} + forwardDataFunc ForwardDataFunction + id string +} + +type ForwardDataFunction func(interfaceChan interface{}, jsonRawMsg json.RawMessage) error + +func (s *subscriptionMap) Create(subscriptionID string, interfaceChan interface{}, forwardDataFunc ForwardDataFunction) { + s.Lock() + defer s.Unlock() + s.map_[subscriptionID] = subscription{ + id: subscriptionID, + interfaceChan: interfaceChan, + forwardDataFunc: forwardDataFunc, + } +} + +func (s *subscriptionMap) Read(subscriptionID string) (sub subscription, success bool) { + s.RLock() + defer s.RUnlock() + sub, success = s.map_[subscriptionID] + return sub, success +} + +func (s *subscriptionMap) Delete(subscriptionID string) { + s.Lock() + defer s.Unlock() + delete(s.map_, subscriptionID) +} diff --git a/graphql/websocket.go b/graphql/websocket.go index 646dbc39..2bd04ceb 100644 --- a/graphql/websocket.go +++ b/graphql/websocket.go @@ -39,33 +39,20 @@ const ( type webSocketSendMessage struct { Payload *Request `json:"payload"` Type string `json:"type"` + ID string `json:"id"` } type webSocketReceiveMessage struct { Type string `json:"type"` + ID string `json:"id"` Payload json.RawMessage `json:"payload"` } func (w *webSocketClient) sendInit() error { - connInit := webSocketSendMessage{ + connInitMsg := webSocketSendMessage{ Type: webSocketTypeConnInit, } - return w.sendStructAsJSON(connInit) -} - -func (w *webSocketClient) sendSubscribe(req *Request) error { - subscription := webSocketSendMessage{ - Type: webSocketTypeSubscribe, - Payload: req, - } - return w.sendStructAsJSON(subscription) -} - -func (w *webSocketClient) sendComplete() error { - complete := webSocketSendMessage{ - Type: webSocketTypeComplete, - } - return w.sendStructAsJSON(complete) + return w.sendStructAsJSON(connInitMsg) } func (w *webSocketClient) sendStructAsJSON(object any) error { @@ -92,15 +79,14 @@ func (w *webSocketClient) waitForConnAck() error { return nil } -func (w *webSocketClient) listenWebSocket(respChan chan json.RawMessage) { - defer close(respChan) +func (w *webSocketClient) listenWebSocket() { for { _, message, err := w.conn.ReadMessage() if err != nil { w.errChan <- err return } - err = forwardWebSocketData(respChan, message) + err = w.forwardWebSocketData(message) if err != nil { w.errChan <- err return @@ -108,6 +94,19 @@ func (w *webSocketClient) listenWebSocket(respChan chan json.RawMessage) { } } +func (w *webSocketClient) forwardWebSocketData(message []byte) error { + var wsMsg webSocketReceiveMessage + err := json.Unmarshal(message, &wsMsg) + if err != nil { + return err + } + sub, ok := w.subscriptions.Read(wsMsg.ID) + if !ok { + return fmt.Errorf("received message for unknown subscription ID '%s'", wsMsg.ID) + } + return sub.forwardDataFunc(sub.interfaceChan, wsMsg.Payload) +} + func (w *webSocketClient) receiveWebSocketConnAck() (bool, error) { _, message, err := w.conn.ReadMessage() if err != nil { @@ -125,20 +124,6 @@ func checkConnectionAckReceived(message []byte) (bool, error) { return wsMessage.Type == webSocketTypeConnAck, nil } -func forwardWebSocketData(respChan chan json.RawMessage, message []byte) error { - var wsMsg webSocketReceiveMessage - err := json.Unmarshal(message, &wsMsg) - if err != nil { - return err - } - switch wsMsg.Type { - case webSocketTypeNext, webSocketTypeError: - respChan <- wsMsg.Payload - default: - } - return nil -} - // formatCloseMessage formats closeCode and text as a WebSocket close message. // An empty message is returned for code CloseNoStatusReceived. func formatCloseMessage(closeCode int, text string) []byte { diff --git a/internal/integration/generated.go b/internal/integration/generated.go index 4a55eb3d..371fd1d3 100644 --- a/internal/integration/generated.go +++ b/internal/integration/generated.go @@ -3094,26 +3094,20 @@ subscription count { } ` -// To close the connection, use [graphql.WebSocketClient.CloseWebSocket()] +// To unsubscribe, use [graphql.WebSocketClient.Unsubscribe] func count( ctx_ context.Context, client_ graphql.WebSocketClient, -) (dataChan_ chan countWsResponse, errChan_ chan error, err_ error) { +) (dataChan_ chan countWsResponse, subscriptionID_ string, err_ error) { req_ := &graphql.Request{ OpName: "count", Query: count_Operation, } dataChan_ = make(chan countWsResponse) - respChan_ := make(chan json.RawMessage) + subscriptionID_, err_ = client_.Subscribe(req_, dataChan_, countForwardData) - errChan_, err_ = client_.DialWebSocket(ctx_, req_, respChan_) - if err_ != nil { - return nil, nil, err_ - } - go countForwardData(ctx_, dataChan_, respChan_, errChan_) - - return dataChan_, errChan_, err_ + return dataChan_, subscriptionID_, err_ } type countWsResponse struct { @@ -3122,37 +3116,27 @@ type countWsResponse struct { Errors error `json:"errors"` } -func countForwardData(ctx_ context.Context, dataChan_ chan countWsResponse, respChan chan json.RawMessage, errChan_ chan error) { - defer close(dataChan_) +func countForwardData(interfaceChan interface{}, jsonRawMsg json.RawMessage) error { var gqlResp graphql.Response var wsResp countWsResponse - for { - select { - case <-ctx_.Done(): - errChan_ <- errors.New("context was canceled") - return - default: - jsonRaw, more := <-respChan - if !more { - return - } - err := json.Unmarshal(jsonRaw, &gqlResp) - if err != nil { - errChan_ <- err - return - } - if len(gqlResp.Errors) == 0 { - err = json.Unmarshal(jsonRaw, &wsResp) - if err != nil { - errChan_ <- err - return - } - } else { - wsResp.Errors = gqlResp.Errors - } - dataChan_ <- wsResp + err := json.Unmarshal(jsonRawMsg, &gqlResp) + if err != nil { + return err + } + if len(gqlResp.Errors) == 0 { + err = json.Unmarshal(jsonRawMsg, &wsResp) + if err != nil { + return err } + } else { + wsResp.Errors = gqlResp.Errors + } + dataChan_, ok := interfaceChan.(chan countWsResponse) + if !ok { + return errors.New("failed to cast interface into 'chan countWsResponse'") } + dataChan_ <- wsResp + return nil } // The mutation executed by createUser. diff --git a/internal/integration/integration_test.go b/internal/integration/integration_test.go index 0ed4520d..53cfc58d 100644 --- a/internal/integration/integration_test.go +++ b/internal/integration/integration_test.go @@ -66,14 +66,17 @@ func TestSubscription(t *testing.T) { defer server.Close() wsClient := newRoundtripWebScoketClient(t, server.URL) - start := time.Now() - respChan, errChan, err := count(ctx, wsClient) + errChan, err := wsClient.StartWebSocket(ctx) + require.NoError(t, err) + + dataChan, subscriptionID, err := count(ctx, wsClient) require.NoError(t, err) defer wsClient.CloseWebSocket() counter := 0 + start := time.Now() for loop := true; loop; { select { - case resp, more := <-respChan: + case resp, more := <-dataChan: if !more { loop = false break @@ -81,11 +84,15 @@ func TestSubscription(t *testing.T) { require.NotNil(t, resp.Data) assert.Equal(t, counter, resp.Data.Count) require.Nil(t, resp.Errors) - loop = time.Since(start) < time.Second*2 + if time.Since(start) > time.Second*5 { + err = wsClient.Unsubscribe(subscriptionID) + require.NoError(t, err) + loop = false + } counter++ case err := <-errChan: require.NoError(t, err) - case <-time.After(time.Second * 5): + case <-time.After(time.Second * 10): require.NoError(t, fmt.Errorf("subscription timed out")) } } diff --git a/internal/integration/roundtrip.go b/internal/integration/roundtrip.go index 8b386c84..665c52f9 100644 --- a/internal/integration/roundtrip.go +++ b/internal/integration/roundtrip.go @@ -106,14 +106,22 @@ func (c *roundtripClient) MakeRequest(ctx context.Context, req *graphql.Request, return nil } -func (c *roundtripClient) DialWebSocket(ctx context.Context, req *graphql.Request, respChan chan json.RawMessage) (errChan chan error, err error) { - return c.wsWrapped.DialWebSocket(ctx, req, respChan) +func (c *roundtripClient) StartWebSocket(ctx context.Context) (errChan chan error, err error) { + return c.wsWrapped.StartWebSocket(ctx) } func (c *roundtripClient) CloseWebSocket() { c.wsWrapped.CloseWebSocket() } +func (c *roundtripClient) Subscribe(req *graphql.Request, interfaceChan interface{}, forwardDataFunc graphql.ForwardDataFunction) (string, error) { + return c.wsWrapped.Subscribe(req, interfaceChan, forwardDataFunc) +} + +func (c *roundtripClient) Unsubscribe(subscriptionID string) error { + return c.wsWrapped.Unsubscribe(subscriptionID) +} + func newRoundtripClients(t *testing.T, endpoint string) []graphql.Client { return []graphql.Client{newRoundtripClient(t, endpoint), newRoundtripGetClient(t, endpoint)} } From 495be60abb223bddd112a383ec9c01dfca158025 Mon Sep 17 00:00:00 2001 From: matthieu4294967296moineau Date: Mon, 9 Oct 2023 17:44:58 +0200 Subject: [PATCH 28/35] check ctx --- graphql/client.go | 2 +- graphql/websocket.go | 25 ++++++++++++++++--------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/graphql/client.go b/graphql/client.go index 34882b1f..ee3fd743 100644 --- a/graphql/client.go +++ b/graphql/client.go @@ -349,7 +349,7 @@ func (w *webSocketClient) StartWebSocket(ctx context.Context) (errChan chan erro w.conn.Close() return nil, err } - go w.listenWebSocket() + go w.listenWebSocket(ctx) return w.errChan, err } diff --git a/graphql/websocket.go b/graphql/websocket.go index 2bd04ceb..4b87593b 100644 --- a/graphql/websocket.go +++ b/graphql/websocket.go @@ -1,6 +1,7 @@ package graphql import ( + "context" "encoding/binary" "encoding/json" "fmt" @@ -79,17 +80,23 @@ func (w *webSocketClient) waitForConnAck() error { return nil } -func (w *webSocketClient) listenWebSocket() { +func (w *webSocketClient) listenWebSocket(ctx context.Context) { for { - _, message, err := w.conn.ReadMessage() - if err != nil { - w.errChan <- err - return - } - err = w.forwardWebSocketData(message) - if err != nil { - w.errChan <- err + select { + case <-ctx.Done(): + w.errChan <- fmt.Errorf("context canceled") return + default: + _, message, err := w.conn.ReadMessage() + if err != nil { + w.errChan <- err + return + } + err = w.forwardWebSocketData(message) + if err != nil { + w.errChan <- err + return + } } } } From 0d88cfb2110eb34a6b6fbc43e7b75e01bdeb7ca5 Mon Sep 17 00:00:00 2001 From: matthieu4294967296moineau Date: Thu, 12 Oct 2023 16:53:26 +0200 Subject: [PATCH 29/35] CloseWebSocket no-op --- graphql/client.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/graphql/client.go b/graphql/client.go index ee3fd743..aa5acdea 100644 --- a/graphql/client.go +++ b/graphql/client.go @@ -52,7 +52,8 @@ type WebSocketClient interface { // err is any error that occurs when setting up the webSocket connection. StartWebSocket(ctx context.Context) (errChan chan error, err error) - // CloseWebSocket must close the webSocket connection. + // CloseWebSocket must close the webSocket connection. If no connection was + // started, CloseWebSocket is a no-op CloseWebSocket() // Subscribe must subscribe to an endpoint of the client's GraphQL API. @@ -354,6 +355,9 @@ func (w *webSocketClient) StartWebSocket(ctx context.Context) (errChan chan erro } func (w *webSocketClient) CloseWebSocket() { + if w.conn == nil { + return + } defer w.conn.Close() err := w.conn.WriteMessage(closeMessage, formatCloseMessage(closeNormalClosure, "")) if err != nil { From 8a4bc0c8f70492aa464f09a3f245f6988c66feb8 Mon Sep 17 00:00:00 2001 From: matthieu4294967296moineau Date: Thu, 18 Jul 2024 16:57:51 +0200 Subject: [PATCH 30/35] revert golangci rules --- .golangci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 6e65e014..53ea6943 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -92,7 +92,7 @@ issues: # Ok to use fmt.Print in the examples, and in the CLI entrypoint. - linters: - forbidigo - path: ^example/|^exampleSubscription/|^generate/main\.go$ + path: ^example/|^generate/main\.go$ - linters: - errcheck @@ -109,5 +109,5 @@ issues: - linters: - govet # Only a big deal for runtime code. - path: ^generate/|^example/|^exampleSubscription/ + path: ^generate/|^example/ text: "^fieldalignment: struct with \\d+ pointer bytes could be \\d+$" From fe08b7fd1316d5b85f8a71fbf2daac0fb3a522a7 Mon Sep 17 00:00:00 2001 From: matthieu4294967296moineau Date: Fri, 19 Jul 2024 14:36:37 +0200 Subject: [PATCH 31/35] corrected according to comments --- docs/CHANGELOG.md | 4 +- docs/FAQ.md | 4 +- graphql/client.go | 93 ++------------------- graphql/subscription.go | 38 +++++++-- graphql/websocket.go | 102 +++++++++++++++++++++++ internal/integration/integration_test.go | 4 +- internal/integration/roundtrip.go | 8 +- 7 files changed, 151 insertions(+), 102 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index da5e604b..41f0d48a 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -24,10 +24,10 @@ When releasing a new version: ### New features: -- The new `optional: generic` allows using a generic type to represent optionality. See the [documentation](genqlient.yaml) for details. -- For schemas with enum values that differ only in casing, it's now possible to disable smart-casing in genqlient.yaml; see the [documentation](genqlient.yaml) for `casing` for details. - genqlient now supports subscriptions; the websocket protocol is by default `graphql-transport-ws` but can be set to another value. See the [documentation](FAQ.md) for how to `subscribe to an API 'subscription' endpoint`. +- The new `optional: generic` allows using a generic type to represent optionality. See the [documentation](genqlient.yaml) for details. +- For schemas with enum values that differ only in casing, it's now possible to disable smart-casing in genqlient.yaml; see the [documentation](genqlient.yaml) for `casing` for details. ### Bug fixes: - The presence of negative pointer directives, i.e., `# @genqlient(pointer: false)` are now respected even in the when `optional: pointer` is set in the configuration file. diff --git a/docs/FAQ.md b/docs/FAQ.md index 66dde308..283aa014 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -114,7 +114,7 @@ a loop for incoming messages and errors: headers, ) - errChan, err := graphqlClient.StartWebSocket(ctx) + errChan, err := graphqlClient.Start(ctx) if err != nil { return } @@ -124,7 +124,7 @@ a loop for incoming messages and errors: return } - defer graphqlClient.CloseWebSocket() + defer graphqlClient.Close() for loop := true; loop; { select { case msg, more := <-dataChan: diff --git a/graphql/client.go b/graphql/client.go index aa5acdea..cd57d95e 100644 --- a/graphql/client.go +++ b/graphql/client.go @@ -10,9 +10,7 @@ import ( "net/http" "net/url" "strings" - "sync" - "github.com/google/uuid" "github.com/vektah/gqlparser/v2/gqlerror" ) @@ -43,18 +41,18 @@ type Client interface { } type WebSocketClient interface { - // StartWebSocket must open a webSocket connection and subscribe to an endpoint + // Start must open a webSocket connection and subscribe to an endpoint // of the client's GraphQL API. // // errChan is a channel on which are sent the errors of webSocket - // communication. + // communication. It will be closed when calling the `Close()` method. // // err is any error that occurs when setting up the webSocket connection. - StartWebSocket(ctx context.Context) (errChan chan error, err error) + Start(ctx context.Context) (errChan chan error, err error) - // CloseWebSocket must close the webSocket connection. If no connection was - // started, CloseWebSocket is a no-op - CloseWebSocket() + // Close must close the webSocket connection and close the error channel. + // If no connection was started, Close is a no-op + Close() error // Subscribe must subscribe to an endpoint of the client's GraphQL API. // @@ -62,7 +60,7 @@ type WebSocketClient interface { // into JSON bytes. // // interfaceChan is a channel used to send the data that arrives via the - // webSocket connection. + // webSocket connection (it is the channel that is passed to `forwardDataFunc`). // // forwardDataFunc is the function that will cast the received interface into // the valid type for the subscription's response. @@ -84,16 +82,6 @@ type client struct { method string } -type webSocketClient struct { - Dialer Dialer - Header http.Header - conn WSConn - errChan chan error - endpoint string - subscriptions subscriptionMap - sync.RWMutex -} - // NewClient returns a [Client] which makes requests to the given endpoint, // suitable for most users. // @@ -334,70 +322,3 @@ func (c *client) createGetRequest(req *Request) (*http.Request, error) { return httpReq, nil } - -func (w *webSocketClient) StartWebSocket(ctx context.Context) (errChan chan error, err error) { - w.conn, err = w.Dialer.DialContext(ctx, w.endpoint, w.Header) - if err != nil { - return nil, err - } - err = w.sendInit() - if err != nil { - w.conn.Close() - return nil, err - } - err = w.waitForConnAck() - if err != nil { - w.conn.Close() - return nil, err - } - go w.listenWebSocket(ctx) - return w.errChan, err -} - -func (w *webSocketClient) CloseWebSocket() { - if w.conn == nil { - return - } - defer w.conn.Close() - err := w.conn.WriteMessage(closeMessage, formatCloseMessage(closeNormalClosure, "")) - if err != nil { - w.errChan <- err - } -} - -func (w *webSocketClient) Subscribe(req *Request, interfaceChan interface{}, forwardDataFunc ForwardDataFunction) (string, error) { - if req.Query != "" { - if strings.HasPrefix(strings.TrimSpace(req.Query), "query") { - return "", errors.New("client does not support queries") - } - if strings.HasPrefix(strings.TrimSpace(req.Query), "mutation") { - return "", errors.New("client does not support mutations") - } - } - - subscriptionID := uuid.NewString() - subscriptionMsg := webSocketSendMessage{ - Type: webSocketTypeSubscribe, - Payload: req, - ID: subscriptionID, - } - err := w.sendStructAsJSON(subscriptionMsg) - if err != nil { - return "", err - } - w.subscriptions.Create(subscriptionID, interfaceChan, forwardDataFunc) - return subscriptionID, nil -} - -func (w *webSocketClient) Unsubscribe(subscriptionID string) error { - completeMsg := webSocketSendMessage{ - Type: webSocketTypeComplete, - ID: subscriptionID, - } - err := w.sendStructAsJSON(completeMsg) - if err != nil { - return err - } - w.subscriptions.Delete(subscriptionID) - return nil -} diff --git a/graphql/subscription.go b/graphql/subscription.go index 79c765fd..85162974 100644 --- a/graphql/subscription.go +++ b/graphql/subscription.go @@ -2,6 +2,8 @@ package graphql import ( "encoding/json" + "fmt" + "reflect" "sync" ) @@ -12,9 +14,10 @@ type subscriptionMap struct { } type subscription struct { - interfaceChan interface{} - forwardDataFunc ForwardDataFunction - id string + interfaceChan interface{} + forwardDataFunc ForwardDataFunction + id string + hasBeenUnsubscribed bool } type ForwardDataFunction func(interfaceChan interface{}, jsonRawMsg json.RawMessage) error @@ -23,9 +26,10 @@ func (s *subscriptionMap) Create(subscriptionID string, interfaceChan interface{ s.Lock() defer s.Unlock() s.map_[subscriptionID] = subscription{ - id: subscriptionID, - interfaceChan: interfaceChan, - forwardDataFunc: forwardDataFunc, + id: subscriptionID, + interfaceChan: interfaceChan, + forwardDataFunc: forwardDataFunc, + hasBeenUnsubscribed: false, } } @@ -36,6 +40,28 @@ func (s *subscriptionMap) Read(subscriptionID string) (sub subscription, success return sub, success } +func (s *subscriptionMap) Unsubscribe(subscriptionID string) error { + s.Lock() + defer s.Unlock() + unsub, success := s.map_[subscriptionID] + if !success { + return fmt.Errorf("tried to unsubscribe from unknown subscription with ID '%s'", subscriptionID) + } + unsub.hasBeenUnsubscribed = true + s.map_[subscriptionID] = unsub + reflect.ValueOf(s.map_[subscriptionID].interfaceChan).Close() + return nil +} + +func (s *subscriptionMap) GetAllIDs() (subscriptionIDs []string) { + s.RLock() + defer s.RUnlock() + for subID := range s.map_ { + subscriptionIDs = append(subscriptionIDs, subID) + } + return subscriptionIDs +} + func (s *subscriptionMap) Delete(subscriptionID string) { s.Lock() defer s.Unlock() diff --git a/graphql/websocket.go b/graphql/websocket.go index 4b87593b..9ee0a318 100644 --- a/graphql/websocket.go +++ b/graphql/websocket.go @@ -5,7 +5,12 @@ import ( "encoding/binary" "encoding/json" "fmt" + "net/http" + "strings" + "sync" "time" + + "github.com/google/uuid" ) const ( @@ -37,6 +42,16 @@ const ( closeMessage = 8 ) +type webSocketClient struct { + Dialer Dialer + Header http.Header + conn WSConn + errChan chan error + endpoint string + subscriptions subscriptionMap + sync.RWMutex +} + type webSocketSendMessage struct { Payload *Request `json:"payload"` Type string `json:"type"` @@ -111,6 +126,9 @@ func (w *webSocketClient) forwardWebSocketData(message []byte) error { if !ok { return fmt.Errorf("received message for unknown subscription ID '%s'", wsMsg.ID) } + if sub.hasBeenUnsubscribed { + return nil + } return sub.forwardDataFunc(sub.interfaceChan, wsMsg.Payload) } @@ -131,6 +149,90 @@ func checkConnectionAckReceived(message []byte) (bool, error) { return wsMessage.Type == webSocketTypeConnAck, nil } +func (w *webSocketClient) Start(ctx context.Context) (errChan chan error, err error) { + w.conn, err = w.Dialer.DialContext(ctx, w.endpoint, w.Header) + if err != nil { + return nil, err + } + err = w.sendInit() + if err != nil { + w.conn.Close() + return nil, err + } + err = w.waitForConnAck() + if err != nil { + w.conn.Close() + return nil, err + } + go w.listenWebSocket(ctx) + return w.errChan, err +} + +func (w *webSocketClient) Close() error { + if w.conn == nil { + return nil + } + err := w.conn.WriteMessage(closeMessage, formatCloseMessage(closeNormalClosure, "")) + if err != nil { + return fmt.Errorf("failed to send closure message: %w", err) + } + defer close(w.errChan) + w.UnsubscribeAll() + return w.conn.Close() +} + +func (w *webSocketClient) Subscribe(req *Request, interfaceChan interface{}, forwardDataFunc ForwardDataFunction) (string, error) { + if req.Query != "" { + if strings.HasPrefix(strings.TrimSpace(req.Query), "query") { + return "", fmt.Errorf("client does not support queries") + } + if strings.HasPrefix(strings.TrimSpace(req.Query), "mutation") { + return "", fmt.Errorf("client does not support mutations") + } + } + + subscriptionID := uuid.NewString() + w.subscriptions.Create(subscriptionID, interfaceChan, forwardDataFunc) + subscriptionMsg := webSocketSendMessage{ + Type: webSocketTypeSubscribe, + Payload: req, + ID: subscriptionID, + } + err := w.sendStructAsJSON(subscriptionMsg) + if err != nil { + w.subscriptions.Delete(subscriptionID) + return "", err + } + return subscriptionID, nil +} + +func (w *webSocketClient) Unsubscribe(subscriptionID string) error { + completeMsg := webSocketSendMessage{ + Type: webSocketTypeComplete, + ID: subscriptionID, + } + err := w.sendStructAsJSON(completeMsg) + if err != nil { + return err + } + err = w.subscriptions.Unsubscribe(subscriptionID) + if err != nil { + return err + } + return nil +} + +func (w *webSocketClient) UnsubscribeAll() error { + subscriptionIDs := w.subscriptions.GetAllIDs() + for _, subscriptionID := range subscriptionIDs { + err := w.Unsubscribe(subscriptionID) + if err != nil { + return err + } + } + return nil +} + // formatCloseMessage formats closeCode and text as a WebSocket close message. // An empty message is returned for code CloseNoStatusReceived. func formatCloseMessage(closeCode int, text string) []byte { diff --git a/internal/integration/integration_test.go b/internal/integration/integration_test.go index 53cfc58d..4ada55ed 100644 --- a/internal/integration/integration_test.go +++ b/internal/integration/integration_test.go @@ -66,12 +66,12 @@ func TestSubscription(t *testing.T) { defer server.Close() wsClient := newRoundtripWebScoketClient(t, server.URL) - errChan, err := wsClient.StartWebSocket(ctx) + errChan, err := wsClient.Start(ctx) require.NoError(t, err) dataChan, subscriptionID, err := count(ctx, wsClient) require.NoError(t, err) - defer wsClient.CloseWebSocket() + defer wsClient.Close() counter := 0 start := time.Now() for loop := true; loop; { diff --git a/internal/integration/roundtrip.go b/internal/integration/roundtrip.go index 665c52f9..c9343d54 100644 --- a/internal/integration/roundtrip.go +++ b/internal/integration/roundtrip.go @@ -106,12 +106,12 @@ func (c *roundtripClient) MakeRequest(ctx context.Context, req *graphql.Request, return nil } -func (c *roundtripClient) StartWebSocket(ctx context.Context) (errChan chan error, err error) { - return c.wsWrapped.StartWebSocket(ctx) +func (c *roundtripClient) Start(ctx context.Context) (errChan chan error, err error) { + return c.wsWrapped.Start(ctx) } -func (c *roundtripClient) CloseWebSocket() { - c.wsWrapped.CloseWebSocket() +func (c *roundtripClient) Close() error { + return c.wsWrapped.Close() } func (c *roundtripClient) Subscribe(req *graphql.Request, interfaceChan interface{}, forwardDataFunc graphql.ForwardDataFunction) (string, error) { From cc76a22601b1873a65bae34409d72a4dbc770342 Mon Sep 17 00:00:00 2001 From: matthieu4294967296moineau Date: Fri, 19 Jul 2024 15:43:25 +0200 Subject: [PATCH 32/35] fix closing --- graphql/websocket.go | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/graphql/websocket.go b/graphql/websocket.go index 9ee0a318..589f6a81 100644 --- a/graphql/websocket.go +++ b/graphql/websocket.go @@ -46,10 +46,11 @@ type webSocketClient struct { Dialer Dialer Header http.Header conn WSConn + isClosing bool errChan chan error endpoint string subscriptions subscriptionMap - sync.RWMutex + sync.Mutex } type webSocketSendMessage struct { @@ -95,23 +96,28 @@ func (w *webSocketClient) waitForConnAck() error { return nil } -func (w *webSocketClient) listenWebSocket(ctx context.Context) { +func (w *webSocketClient) listenWebSocket() { for { - select { - case <-ctx.Done(): - w.errChan <- fmt.Errorf("context canceled") + if w.isClosing { return - default: - _, message, err := w.conn.ReadMessage() - if err != nil { + } + _, message, err := w.conn.ReadMessage() + if err != nil { + w.Lock() + defer w.Unlock() + if !w.isClosing { w.errChan <- err - return } - err = w.forwardWebSocketData(message) - if err != nil { + return + } + err = w.forwardWebSocketData(message) + if err != nil { + w.Lock() + defer w.Unlock() + if !w.isClosing { w.errChan <- err - return } + return } } } @@ -164,7 +170,7 @@ func (w *webSocketClient) Start(ctx context.Context) (errChan chan error, err er w.conn.Close() return nil, err } - go w.listenWebSocket(ctx) + go w.listenWebSocket() return w.errChan, err } @@ -176,8 +182,11 @@ func (w *webSocketClient) Close() error { if err != nil { return fmt.Errorf("failed to send closure message: %w", err) } - defer close(w.errChan) w.UnsubscribeAll() + w.Lock() + defer w.Unlock() + w.isClosing = true + close(w.errChan) return w.conn.Close() } From 828a1f9d73ab4ceb3c9fa2fad8d8093e771ffb1f Mon Sep 17 00:00:00 2001 From: Ben Kraft Date: Fri, 16 Aug 2024 16:33:24 -0700 Subject: [PATCH 33/35] docs nits --- docs/subscriptions.md | 15 ++++++++------- graphql/client.go | 6 +++++- graphql/subscription.go | 3 --- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/docs/subscriptions.md b/docs/subscriptions.md index 26571a97..ee4d3d89 100644 --- a/docs/subscriptions.md +++ b/docs/subscriptions.md @@ -4,7 +4,7 @@ This document describes how to use genqlient to make GraphQL subscriptions. It a ## Client setup -You will need to use a different client calling `graphql.NewClientUsingWebSocket`, passing as parameter your own websocket client. +You will need to use a different client calling `graphql.NewClientUsingWebSocket`, passing as a parameter your own websocket client. Here is how to configure your webSocket client to match the interfaces: @@ -72,11 +72,11 @@ func (md *MyDialer) DialContext(ctx context.Context, urlStr string, requestHeade ## Making subscriptions -Once your webSocket client matches the interfaces, you can get your `graphql.WebSocketClient` and listen in +Once your websocket client matches the interfaces, you can get your `graphql.WebSocketClient` and listen in a loop for incoming messages and errors: ```go - graphqlClient := graphql.NewClientUsingWebSocket( + graphqlClient := graphql.NewClientUsingWebSocket( "ws://localhost:8080/query", &MyDialer{Dialer: dialer}, headers, @@ -109,13 +109,14 @@ a loop for incoming messages and errors: } case err = <-errChan: return - case <-time.After(time.Minute): - err = wsClient.Unsubscribe(subscriptionID) - loop = false + case <-time.After(time.Minute): + err = wsClient.Unsubscribe(subscriptionID) + loop = false } } ``` + To change the websocket protocol from its default value `graphql-transport-ws`, add the following header before calling `graphql.NewClientUsingWebSocket()`: ```go - headers.Add("Sec-WebSocket-Protocol", "graphql-ws") + headers.Add("Sec-WebSocket-Protocol", "graphql-ws") ``` diff --git a/graphql/client.go b/graphql/client.go index cd57d95e..526395b8 100644 --- a/graphql/client.go +++ b/graphql/client.go @@ -65,7 +65,7 @@ type WebSocketClient interface { // forwardDataFunc is the function that will cast the received interface into // the valid type for the subscription's response. // - // returns a subscriptionID if successful, an error otherwise + // Returns a subscriptionID if successful, an error otherwise. Subscribe( req *Request, interfaceChan interface{}, @@ -76,6 +76,10 @@ type WebSocketClient interface { Unsubscribe(subscriptionID string) error } +// ForwardDataFunction is a part of the WebSocketClient interface, see +// [WebSocketClient.Subscribe] for details. +type ForwardDataFunction func(interfaceChan interface{}, jsonRawMsg json.RawMessage) error + type client struct { httpClient Doer endpoint string diff --git a/graphql/subscription.go b/graphql/subscription.go index 85162974..f86f75ee 100644 --- a/graphql/subscription.go +++ b/graphql/subscription.go @@ -1,7 +1,6 @@ package graphql import ( - "encoding/json" "fmt" "reflect" "sync" @@ -20,8 +19,6 @@ type subscription struct { hasBeenUnsubscribed bool } -type ForwardDataFunction func(interfaceChan interface{}, jsonRawMsg json.RawMessage) error - func (s *subscriptionMap) Create(subscriptionID string, interfaceChan interface{}, forwardDataFunc ForwardDataFunction) { s.Lock() defer s.Unlock() From b32d4d94203744133874fb6b0fcf9987ec5928b9 Mon Sep 17 00:00:00 2001 From: Ben Kraft Date: Fri, 16 Aug 2024 16:49:33 -0700 Subject: [PATCH 34/35] update snapshots after merge --- ...Fragments.graphql-ComplexNamedFragments.graphql.go | 11 +++++------ ...ate-DefaultInputs.graphql-DefaultInputs.graphql.go | 11 +++++------ ...utsPointer.graphql-DefaultInputsPointer.graphql.go | 11 +++++------ ...tive.graphql-DefaultInputsWithDirective.graphql.go | 11 +++++------ ...e.graphql-DefaultInputsWithForDirective.graphql.go | 11 +++++------ ...e-OmitemptyFalse.graphql-OmitemptyFalse.graphql.go | 11 +++++------ ...uctReference.graphql-UseStructReference.graphql.go | 11 +++++------ ...g-UseStructReference-testdata-queries-generated.go | 11 +++++------ 8 files changed, 40 insertions(+), 48 deletions(-) diff --git a/generate/testdata/snapshots/TestGenerate-ComplexNamedFragments.graphql-ComplexNamedFragments.graphql.go b/generate/testdata/snapshots/TestGenerate-ComplexNamedFragments.graphql-ComplexNamedFragments.graphql.go index 356f2882..1ea1a5aa 100644 --- a/generate/testdata/snapshots/TestGenerate-ComplexNamedFragments.graphql-ComplexNamedFragments.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-ComplexNamedFragments.graphql-ComplexNamedFragments.graphql.go @@ -2619,7 +2619,7 @@ func ComplexNamedFragments( return data_, err_ } -// The query or mutation executed by ComplexNamedFragmentsWithInlineUnion. +// The query executed by ComplexNamedFragmentsWithInlineUnion. const ComplexNamedFragmentsWithInlineUnion_Operation = ` query ComplexNamedFragmentsWithInlineUnion { user { @@ -2653,15 +2653,14 @@ fragment SimpleLeafContent on LeafContent { func ComplexNamedFragmentsWithInlineUnion( client_ graphql.Client, -) (*ComplexNamedFragmentsWithInlineUnionResponse, error) { +) (data_ *ComplexNamedFragmentsWithInlineUnionResponse, err_ error) { req_ := &graphql.Request{ OpName: "ComplexNamedFragmentsWithInlineUnion", Query: ComplexNamedFragmentsWithInlineUnion_Operation, } - var err_ error - var data_ ComplexNamedFragmentsWithInlineUnionResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &ComplexNamedFragmentsWithInlineUnionResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -2669,6 +2668,6 @@ func ComplexNamedFragmentsWithInlineUnion( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-DefaultInputs.graphql-DefaultInputs.graphql.go b/generate/testdata/snapshots/TestGenerate-DefaultInputs.graphql-DefaultInputs.graphql.go index b3971938..404fcd5b 100644 --- a/generate/testdata/snapshots/TestGenerate-DefaultInputs.graphql-DefaultInputs.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-DefaultInputs.graphql-DefaultInputs.graphql.go @@ -33,7 +33,7 @@ type __DefaultInputsInput struct { // GetInput returns __DefaultInputsInput.Input, and is useful for accessing the field via an interface. func (v *__DefaultInputsInput) GetInput() InputWithDefaults { return v.Input } -// The query or mutation executed by DefaultInputs. +// The query executed by DefaultInputs. const DefaultInputs_Operation = ` query DefaultInputs ($input: InputWithDefaults!) { default(input: $input) @@ -45,7 +45,7 @@ query DefaultInputs ($input: InputWithDefaults!) { func DefaultInputs( client_ graphql.Client, input InputWithDefaults, -) (*DefaultInputsResponse, error) { +) (data_ *DefaultInputsResponse, err_ error) { req_ := &graphql.Request{ OpName: "DefaultInputs", Query: DefaultInputs_Operation, @@ -53,10 +53,9 @@ func DefaultInputs( Input: input, }, } - var err_ error - var data_ DefaultInputsResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &DefaultInputsResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -64,6 +63,6 @@ func DefaultInputs( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-DefaultInputsPointer.graphql-DefaultInputsPointer.graphql.go b/generate/testdata/snapshots/TestGenerate-DefaultInputsPointer.graphql-DefaultInputsPointer.graphql.go index a2793024..4617210a 100644 --- a/generate/testdata/snapshots/TestGenerate-DefaultInputsPointer.graphql-DefaultInputsPointer.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-DefaultInputsPointer.graphql-DefaultInputsPointer.graphql.go @@ -33,7 +33,7 @@ type __DefaultInputsInput struct { // GetInput returns __DefaultInputsInput.Input, and is useful for accessing the field via an interface. func (v *__DefaultInputsInput) GetInput() InputWithDefaults { return v.Input } -// The query or mutation executed by DefaultInputs. +// The query executed by DefaultInputs. const DefaultInputs_Operation = ` query DefaultInputs ($input: InputWithDefaults!) { default(input: $input) @@ -46,7 +46,7 @@ query DefaultInputs ($input: InputWithDefaults!) { func DefaultInputs( client_ graphql.Client, input InputWithDefaults, -) (*DefaultInputsResponse, error) { +) (data_ *DefaultInputsResponse, err_ error) { req_ := &graphql.Request{ OpName: "DefaultInputs", Query: DefaultInputs_Operation, @@ -54,10 +54,9 @@ func DefaultInputs( Input: input, }, } - var err_ error - var data_ DefaultInputsResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &DefaultInputsResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -65,6 +64,6 @@ func DefaultInputs( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-DefaultInputsWithDirective.graphql-DefaultInputsWithDirective.graphql.go b/generate/testdata/snapshots/TestGenerate-DefaultInputsWithDirective.graphql-DefaultInputsWithDirective.graphql.go index 51aee5c7..8ca4cad0 100644 --- a/generate/testdata/snapshots/TestGenerate-DefaultInputsWithDirective.graphql-DefaultInputsWithDirective.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-DefaultInputsWithDirective.graphql-DefaultInputsWithDirective.graphql.go @@ -33,7 +33,7 @@ type __DefaultInputsInput struct { // GetInput returns __DefaultInputsInput.Input, and is useful for accessing the field via an interface. func (v *__DefaultInputsInput) GetInput() InputWithDefaults { return v.Input } -// The query or mutation executed by DefaultInputs. +// The query executed by DefaultInputs. const DefaultInputs_Operation = ` query DefaultInputs ($input: InputWithDefaults!) { default(input: $input) @@ -44,7 +44,7 @@ query DefaultInputs ($input: InputWithDefaults!) { func DefaultInputs( client_ graphql.Client, input InputWithDefaults, -) (*DefaultInputsResponse, error) { +) (data_ *DefaultInputsResponse, err_ error) { req_ := &graphql.Request{ OpName: "DefaultInputs", Query: DefaultInputs_Operation, @@ -52,10 +52,9 @@ func DefaultInputs( Input: input, }, } - var err_ error - var data_ DefaultInputsResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &DefaultInputsResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -63,6 +62,6 @@ func DefaultInputs( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-DefaultInputsWithForDirective.graphql-DefaultInputsWithForDirective.graphql.go b/generate/testdata/snapshots/TestGenerate-DefaultInputsWithForDirective.graphql-DefaultInputsWithForDirective.graphql.go index 5c76a562..0aa80666 100644 --- a/generate/testdata/snapshots/TestGenerate-DefaultInputsWithForDirective.graphql-DefaultInputsWithForDirective.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-DefaultInputsWithForDirective.graphql-DefaultInputsWithForDirective.graphql.go @@ -33,7 +33,7 @@ type __DefaultInputsInput struct { // GetInput returns __DefaultInputsInput.Input, and is useful for accessing the field via an interface. func (v *__DefaultInputsInput) GetInput() InputWithDefaults { return v.Input } -// The query or mutation executed by DefaultInputs. +// The query executed by DefaultInputs. const DefaultInputs_Operation = ` query DefaultInputs ($input: InputWithDefaults!) { default(input: $input) @@ -43,7 +43,7 @@ query DefaultInputs ($input: InputWithDefaults!) { func DefaultInputs( client_ graphql.Client, input InputWithDefaults, -) (*DefaultInputsResponse, error) { +) (data_ *DefaultInputsResponse, err_ error) { req_ := &graphql.Request{ OpName: "DefaultInputs", Query: DefaultInputs_Operation, @@ -51,10 +51,9 @@ func DefaultInputs( Input: input, }, } - var err_ error - var data_ DefaultInputsResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &DefaultInputsResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -62,6 +61,6 @@ func DefaultInputs( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-OmitemptyFalse.graphql-OmitemptyFalse.graphql.go b/generate/testdata/snapshots/TestGenerate-OmitemptyFalse.graphql-OmitemptyFalse.graphql.go index 74b81eb5..ccb8ed7c 100644 --- a/generate/testdata/snapshots/TestGenerate-OmitemptyFalse.graphql-OmitemptyFalse.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-OmitemptyFalse.graphql-OmitemptyFalse.graphql.go @@ -33,7 +33,7 @@ type __OmitemptyFalseInput struct { // GetInput returns __OmitemptyFalseInput.Input, and is useful for accessing the field via an interface. func (v *__OmitemptyFalseInput) GetInput() OmitemptyInput { return v.Input } -// The query or mutation executed by OmitemptyFalse. +// The query executed by OmitemptyFalse. const OmitemptyFalse_Operation = ` query OmitemptyFalse ($input: OmitemptyInput) { omitempty(input: $input) @@ -43,7 +43,7 @@ query OmitemptyFalse ($input: OmitemptyInput) { func OmitemptyFalse( client_ graphql.Client, input OmitemptyInput, -) (*OmitemptyFalseResponse, error) { +) (data_ *OmitemptyFalseResponse, err_ error) { req_ := &graphql.Request{ OpName: "OmitemptyFalse", Query: OmitemptyFalse_Operation, @@ -51,10 +51,9 @@ func OmitemptyFalse( Input: input, }, } - var err_ error - var data_ OmitemptyFalseResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &OmitemptyFalseResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -62,6 +61,6 @@ func OmitemptyFalse( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerate-UseStructReference.graphql-UseStructReference.graphql.go b/generate/testdata/snapshots/TestGenerate-UseStructReference.graphql-UseStructReference.graphql.go index 09c5c6ce..b42b76e7 100644 --- a/generate/testdata/snapshots/TestGenerate-UseStructReference.graphql-UseStructReference.graphql.go +++ b/generate/testdata/snapshots/TestGenerate-UseStructReference.graphql-UseStructReference.graphql.go @@ -54,7 +54,7 @@ type __UseStructReferenceInput struct { // GetInput returns __UseStructReferenceInput.Input, and is useful for accessing the field via an interface. func (v *__UseStructReferenceInput) GetInput() UseStructReferencesInput { return v.Input } -// The query or mutation executed by UseStructReference. +// The query executed by UseStructReference. const UseStructReference_Operation = ` query UseStructReference ($input: UseStructReferencesInput!) { useStructReferencesInput(input: $input) @@ -65,7 +65,7 @@ query UseStructReference ($input: UseStructReferencesInput!) { func UseStructReference( client_ graphql.Client, input UseStructReferencesInput, -) (*UseStructReferenceResponse, error) { +) (data_ *UseStructReferenceResponse, err_ error) { req_ := &graphql.Request{ OpName: "UseStructReference", Query: UseStructReference_Operation, @@ -73,10 +73,9 @@ func UseStructReference( Input: input, }, } - var err_ error - var data_ UseStructReferenceResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &UseStructReferenceResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( nil, @@ -84,6 +83,6 @@ func UseStructReference( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-UseStructReference-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-UseStructReference-testdata-queries-generated.go index c2c3723a..c03a50f6 100644 --- a/generate/testdata/snapshots/TestGenerateWithConfig-UseStructReference-testdata-queries-generated.go +++ b/generate/testdata/snapshots/TestGenerateWithConfig-UseStructReference-testdata-queries-generated.go @@ -56,7 +56,7 @@ type __UseStructReferenceInput struct { // GetInput returns __UseStructReferenceInput.Input, and is useful for accessing the field via an interface. func (v *__UseStructReferenceInput) GetInput() *UseStructReferencesInput { return v.Input } -// The query or mutation executed by UseStructReference. +// The query executed by UseStructReference. const UseStructReference_Operation = ` query UseStructReference ($input: UseStructReferencesInput!) { useStructReferencesInput(input: $input) @@ -68,7 +68,7 @@ func UseStructReference( ctx_ context.Context, client_ graphql.Client, input *UseStructReferencesInput, -) (*UseStructReferenceResponse, error) { +) (data_ *UseStructReferenceResponse, err_ error) { req_ := &graphql.Request{ OpName: "UseStructReference", Query: UseStructReference_Operation, @@ -76,10 +76,9 @@ func UseStructReference( Input: input, }, } - var err_ error - var data_ UseStructReferenceResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &UseStructReferenceResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -87,6 +86,6 @@ func UseStructReference( resp_, ) - return &data_, err_ + return data_, err_ } From 65b9ba9d505b7ad266f1260142730397faa4e68f Mon Sep 17 00:00:00 2001 From: Ben Kraft Date: Fri, 16 Aug 2024 16:58:01 -0700 Subject: [PATCH 35/35] lint after merge --- graphql/websocket.go | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/graphql/websocket.go b/graphql/websocket.go index 589f6a81..bb9a98b6 100644 --- a/graphql/websocket.go +++ b/graphql/websocket.go @@ -45,11 +45,11 @@ const ( type webSocketClient struct { Dialer Dialer Header http.Header + endpoint string conn WSConn - isClosing bool errChan chan error - endpoint string subscriptions subscriptionMap + isClosing bool sync.Mutex } @@ -96,6 +96,14 @@ func (w *webSocketClient) waitForConnAck() error { return nil } +func (w *webSocketClient) handleErr(err error) { + w.Lock() + defer w.Unlock() + if !w.isClosing { + w.errChan <- err + } +} + func (w *webSocketClient) listenWebSocket() { for { if w.isClosing { @@ -103,20 +111,12 @@ func (w *webSocketClient) listenWebSocket() { } _, message, err := w.conn.ReadMessage() if err != nil { - w.Lock() - defer w.Unlock() - if !w.isClosing { - w.errChan <- err - } + w.handleErr(err) return } err = w.forwardWebSocketData(message) if err != nil { - w.Lock() - defer w.Unlock() - if !w.isClosing { - w.errChan <- err - } + w.handleErr(err) return } } @@ -182,7 +182,10 @@ func (w *webSocketClient) Close() error { if err != nil { return fmt.Errorf("failed to send closure message: %w", err) } - w.UnsubscribeAll() + err = w.UnsubscribeAll() + if err != nil { + return fmt.Errorf("failed to unsubscribe: %w", err) + } w.Lock() defer w.Unlock() w.isClosing = true