@@ -14898,18 +14898,20 @@ public final class RemoveReactionMutation: GraphQLMutation {
14898
14898
14899
14899
public final class FetchRepositoryBranchesQuery: GraphQLQuery {
14900
14900
public static let operationString =
14901
- "query fetchRepositoryBranches($owner: String!, $name: String!) {\n repository(owner: $owner, name: $name) {\n __typename\n refs(first: 50, refPrefix: \"refs/heads/\") {\n __typename\n edges {\n __typename\n node {\n __typename\n name\n }\n }\n }\n }\n}"
14901
+ "query fetchRepositoryBranches($owner: String!, $name: String!, $after: String ) {\n repository(owner: $owner, name: $name) {\n __typename\n refs(first: 50, after: $after, refPrefix: \"refs/heads/\") {\n __typename\n edges {\n __typename\n node {\n __typename\n name\n }\n }\n pageInfo {\n __typename\n hasNextPage\n endCursor \n }\n }\n }\n}"
14902
14902
14903
14903
public var owner: String
14904
14904
public var name: String
14905
+ public var after: String?
14905
14906
14906
- public init(owner: String, name: String) {
14907
+ public init(owner: String, name: String, after: String? = nil ) {
14907
14908
self.owner = owner
14908
14909
self.name = name
14910
+ self.after = after
14909
14911
}
14910
14912
14911
14913
public var variables: GraphQLMap? {
14912
- return ["owner": owner, "name": name]
14914
+ return ["owner": owner, "name": name, "after": after ]
14913
14915
}
14914
14916
14915
14917
public struct Data: GraphQLSelectionSet {
@@ -14944,7 +14946,7 @@ public final class FetchRepositoryBranchesQuery: GraphQLQuery {
14944
14946
14945
14947
public static let selections: [GraphQLSelection] = [
14946
14948
GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
14947
- GraphQLField("refs", arguments: ["first": 50, "refPrefix": "refs/heads/"], type: .object(Ref.selections)),
14949
+ GraphQLField("refs", arguments: ["first": 50, "after": GraphQLVariable("after"), " refPrefix": "refs/heads/"], type: .object(Ref.selections)),
14948
14950
]
14949
14951
14950
14952
public var snapshot: Snapshot
@@ -14982,6 +14984,7 @@ public final class FetchRepositoryBranchesQuery: GraphQLQuery {
14982
14984
public static let selections: [GraphQLSelection] = [
14983
14985
GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
14984
14986
GraphQLField("edges", type: .list(.object(Edge.selections))),
14987
+ GraphQLField("pageInfo", type: .nonNull(.object(PageInfo.selections))),
14985
14988
]
14986
14989
14987
14990
public var snapshot: Snapshot
@@ -14990,8 +14993,8 @@ public final class FetchRepositoryBranchesQuery: GraphQLQuery {
14990
14993
self.snapshot = snapshot
14991
14994
}
14992
14995
14993
- public init(edges: [Edge?]? = nil) {
14994
- self.init(snapshot: ["__typename": "RefConnection", "edges": edges.flatMap { (value: [Edge?]) -> [Snapshot?] in value.map { (value: Edge?) -> Snapshot? in value.flatMap { (value: Edge) -> Snapshot in value.snapshot } } }])
14996
+ public init(edges: [Edge?]? = nil, pageInfo: PageInfo ) {
14997
+ self.init(snapshot: ["__typename": "RefConnection", "edges": edges.flatMap { (value: [Edge?]) -> [Snapshot?] in value.map { (value: Edge?) -> Snapshot? in value.flatMap { (value: Edge) -> Snapshot in value.snapshot } } }, "pageInfo": pageInfo.snapshot ])
14995
14998
}
14996
14999
14997
15000
public var __typename: String {
@@ -15013,6 +15016,16 @@ public final class FetchRepositoryBranchesQuery: GraphQLQuery {
15013
15016
}
15014
15017
}
15015
15018
15019
+ /// Information to aid in pagination.
15020
+ public var pageInfo: PageInfo {
15021
+ get {
15022
+ return PageInfo(snapshot: snapshot["pageInfo"]! as! Snapshot)
15023
+ }
15024
+ set {
15025
+ snapshot.updateValue(newValue.snapshot, forKey: "pageInfo")
15026
+ }
15027
+ }
15028
+
15016
15029
public struct Edge: GraphQLSelectionSet {
15017
15030
public static let possibleTypes = ["RefEdge"]
15018
15031
@@ -15088,6 +15101,55 @@ public final class FetchRepositoryBranchesQuery: GraphQLQuery {
15088
15101
}
15089
15102
}
15090
15103
}
15104
+
15105
+ public struct PageInfo: GraphQLSelectionSet {
15106
+ public static let possibleTypes = ["PageInfo"]
15107
+
15108
+ public static let selections: [GraphQLSelection] = [
15109
+ GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
15110
+ GraphQLField("hasNextPage", type: .nonNull(.scalar(Bool.self))),
15111
+ GraphQLField("endCursor", type: .scalar(String.self)),
15112
+ ]
15113
+
15114
+ public var snapshot: Snapshot
15115
+
15116
+ public init(snapshot: Snapshot) {
15117
+ self.snapshot = snapshot
15118
+ }
15119
+
15120
+ public init(hasNextPage: Bool, endCursor: String? = nil) {
15121
+ self.init(snapshot: ["__typename": "PageInfo", "hasNextPage": hasNextPage, "endCursor": endCursor])
15122
+ }
15123
+
15124
+ public var __typename: String {
15125
+ get {
15126
+ return snapshot["__typename"]! as! String
15127
+ }
15128
+ set {
15129
+ snapshot.updateValue(newValue, forKey: "__typename")
15130
+ }
15131
+ }
15132
+
15133
+ /// When paginating forwards, are there more items?
15134
+ public var hasNextPage: Bool {
15135
+ get {
15136
+ return snapshot["hasNextPage"]! as! Bool
15137
+ }
15138
+ set {
15139
+ snapshot.updateValue(newValue, forKey: "hasNextPage")
15140
+ }
15141
+ }
15142
+
15143
+ /// When paginating forwards, the cursor to continue.
15144
+ public var endCursor: String? {
15145
+ get {
15146
+ return snapshot["endCursor"] as? String
15147
+ }
15148
+ set {
15149
+ snapshot.updateValue(newValue, forKey: "endCursor")
15150
+ }
15151
+ }
15152
+ }
15091
15153
}
15092
15154
}
15093
15155
}
0 commit comments