@@ -14898,18 +14898,20 @@ public final class RemoveReactionMutation: GraphQLMutation {
1489814898
1489914899public final class FetchRepositoryBranchesQuery: GraphQLQuery {
1490014900 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}"
1490214902
1490314903 public var owner: String
1490414904 public var name: String
14905+ public var after: String?
1490514906
14906- public init(owner: String, name: String) {
14907+ public init(owner: String, name: String, after: String? = nil ) {
1490714908 self.owner = owner
1490814909 self.name = name
14910+ self.after = after
1490914911 }
1491014912
1491114913 public var variables: GraphQLMap? {
14912- return ["owner": owner, "name": name]
14914+ return ["owner": owner, "name": name, "after": after ]
1491314915 }
1491414916
1491514917 public struct Data: GraphQLSelectionSet {
@@ -14944,7 +14946,7 @@ public final class FetchRepositoryBranchesQuery: GraphQLQuery {
1494414946
1494514947 public static let selections: [GraphQLSelection] = [
1494614948 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)),
1494814950 ]
1494914951
1495014952 public var snapshot: Snapshot
@@ -14982,6 +14984,7 @@ public final class FetchRepositoryBranchesQuery: GraphQLQuery {
1498214984 public static let selections: [GraphQLSelection] = [
1498314985 GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
1498414986 GraphQLField("edges", type: .list(.object(Edge.selections))),
14987+ GraphQLField("pageInfo", type: .nonNull(.object(PageInfo.selections))),
1498514988 ]
1498614989
1498714990 public var snapshot: Snapshot
@@ -14990,8 +14993,8 @@ public final class FetchRepositoryBranchesQuery: GraphQLQuery {
1499014993 self.snapshot = snapshot
1499114994 }
1499214995
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 ])
1499514998 }
1499614999
1499715000 public var __typename: String {
@@ -15013,6 +15016,16 @@ public final class FetchRepositoryBranchesQuery: GraphQLQuery {
1501315016 }
1501415017 }
1501515018
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+
1501615029 public struct Edge: GraphQLSelectionSet {
1501715030 public static let possibleTypes = ["RefEdge"]
1501815031
@@ -15088,6 +15101,55 @@ public final class FetchRepositoryBranchesQuery: GraphQLQuery {
1508815101 }
1508915102 }
1509015103 }
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+ }
1509115153 }
1509215154 }
1509315155 }
0 commit comments