@@ -2088,25 +2088,31 @@ public final class RepoFileHistoryQuery: GraphQLQuery {
20882088
20892089public final class RepositoryInfoQuery: GraphQLQuery {
20902090 public let operationDefinition =
2091- "query RepositoryInfo($owner: String!, $name: String!) {\n repository(owner: $owner, name: $name) {\n __typename\n id\n defaultBranchRef {\n __typename\n name\n }\n hasIssuesEnabled\n }\n}"
2091+ "query RepositoryInfo($owner: String!, $name: String!, $issueQuery: String!, $prQuery: String! ) {\n repository(owner: $owner, name: $name) {\n __typename\n id\n defaultBranchRef {\n __typename\n name\n }\n hasIssuesEnabled\n }\n repoIssueOverview: search(query: $issueQuery, type: ISSUE) {\n __typename\n issueCount\n }\n repoPullRequestOverView: search(query: $prQuery, type: ISSUE) {\n __typename\n issueCount \n }\n}"
20922092
20932093 public var owner: String
20942094 public var name: String
2095+ public var issueQuery: String
2096+ public var prQuery: String
20952097
2096- public init(owner: String, name: String) {
2098+ public init(owner: String, name: String, issueQuery: String, prQuery: String ) {
20972099 self.owner = owner
20982100 self.name = name
2101+ self.issueQuery = issueQuery
2102+ self.prQuery = prQuery
20992103 }
21002104
21012105 public var variables: GraphQLMap? {
2102- return ["owner": owner, "name": name]
2106+ return ["owner": owner, "name": name, "issueQuery": issueQuery, "prQuery": prQuery ]
21032107 }
21042108
21052109 public struct Data: GraphQLSelectionSet {
21062110 public static let possibleTypes = ["Query"]
21072111
21082112 public static let selections: [GraphQLSelection] = [
21092113 GraphQLField("repository", arguments: ["owner": GraphQLVariable("owner"), "name": GraphQLVariable("name")], type: .object(Repository.selections)),
2114+ GraphQLField("search", alias: "repoIssueOverview", arguments: ["query": GraphQLVariable("issueQuery"), "type": "ISSUE"], type: .nonNull(.object(RepoIssueOverview.selections))),
2115+ GraphQLField("search", alias: "repoPullRequestOverView", arguments: ["query": GraphQLVariable("prQuery"), "type": "ISSUE"], type: .nonNull(.object(RepoPullRequestOverView.selections))),
21102116 ]
21112117
21122118 public private(set) var resultMap: ResultMap
@@ -2115,8 +2121,8 @@ public final class RepositoryInfoQuery: GraphQLQuery {
21152121 self.resultMap = unsafeResultMap
21162122 }
21172123
2118- public init(repository: Repository? = nil) {
2119- self.init(unsafeResultMap: ["__typename": "Query", "repository": repository.flatMap { (value: Repository) -> ResultMap in value.resultMap }])
2124+ public init(repository: Repository? = nil, repoIssueOverview: RepoIssueOverview, repoPullRequestOverView: RepoPullRequestOverView ) {
2125+ self.init(unsafeResultMap: ["__typename": "Query", "repository": repository.flatMap { (value: Repository) -> ResultMap in value.resultMap }, "repoIssueOverview": repoIssueOverview.resultMap, "repoPullRequestOverView": repoPullRequestOverView.resultMap ])
21202126 }
21212127
21222128 /// Lookup a given repository by the owner and repository name.
@@ -2129,6 +2135,26 @@ public final class RepositoryInfoQuery: GraphQLQuery {
21292135 }
21302136 }
21312137
2138+ /// Perform a search across resources.
2139+ public var repoIssueOverview: RepoIssueOverview {
2140+ get {
2141+ return RepoIssueOverview(unsafeResultMap: resultMap["repoIssueOverview"]! as! ResultMap)
2142+ }
2143+ set {
2144+ resultMap.updateValue(newValue.resultMap, forKey: "repoIssueOverview")
2145+ }
2146+ }
2147+
2148+ /// Perform a search across resources.
2149+ public var repoPullRequestOverView: RepoPullRequestOverView {
2150+ get {
2151+ return RepoPullRequestOverView(unsafeResultMap: resultMap["repoPullRequestOverView"]! as! ResultMap)
2152+ }
2153+ set {
2154+ resultMap.updateValue(newValue.resultMap, forKey: "repoPullRequestOverView")
2155+ }
2156+ }
2157+
21322158 public struct Repository: GraphQLSelectionSet {
21332159 public static let possibleTypes = ["Repository"]
21342160
@@ -2225,6 +2251,82 @@ public final class RepositoryInfoQuery: GraphQLQuery {
22252251 }
22262252 }
22272253 }
2254+
2255+ public struct RepoIssueOverview: GraphQLSelectionSet {
2256+ public static let possibleTypes = ["SearchResultItemConnection"]
2257+
2258+ public static let selections: [GraphQLSelection] = [
2259+ GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
2260+ GraphQLField("issueCount", type: .nonNull(.scalar(Int.self))),
2261+ ]
2262+
2263+ public private(set) var resultMap: ResultMap
2264+
2265+ public init(unsafeResultMap: ResultMap) {
2266+ self.resultMap = unsafeResultMap
2267+ }
2268+
2269+ public init(issueCount: Int) {
2270+ self.init(unsafeResultMap: ["__typename": "SearchResultItemConnection", "issueCount": issueCount])
2271+ }
2272+
2273+ public var __typename: String {
2274+ get {
2275+ return resultMap["__typename"]! as! String
2276+ }
2277+ set {
2278+ resultMap.updateValue(newValue, forKey: "__typename")
2279+ }
2280+ }
2281+
2282+ /// The number of issues that matched the search query.
2283+ public var issueCount: Int {
2284+ get {
2285+ return resultMap["issueCount"]! as! Int
2286+ }
2287+ set {
2288+ resultMap.updateValue(newValue, forKey: "issueCount")
2289+ }
2290+ }
2291+ }
2292+
2293+ public struct RepoPullRequestOverView: GraphQLSelectionSet {
2294+ public static let possibleTypes = ["SearchResultItemConnection"]
2295+
2296+ public static let selections: [GraphQLSelection] = [
2297+ GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
2298+ GraphQLField("issueCount", type: .nonNull(.scalar(Int.self))),
2299+ ]
2300+
2301+ public private(set) var resultMap: ResultMap
2302+
2303+ public init(unsafeResultMap: ResultMap) {
2304+ self.resultMap = unsafeResultMap
2305+ }
2306+
2307+ public init(issueCount: Int) {
2308+ self.init(unsafeResultMap: ["__typename": "SearchResultItemConnection", "issueCount": issueCount])
2309+ }
2310+
2311+ public var __typename: String {
2312+ get {
2313+ return resultMap["__typename"]! as! String
2314+ }
2315+ set {
2316+ resultMap.updateValue(newValue, forKey: "__typename")
2317+ }
2318+ }
2319+
2320+ /// The number of issues that matched the search query.
2321+ public var issueCount: Int {
2322+ get {
2323+ return resultMap["issueCount"]! as! Int
2324+ }
2325+ set {
2326+ resultMap.updateValue(newValue, forKey: "issueCount")
2327+ }
2328+ }
2329+ }
22282330 }
22292331}
22302332
0 commit comments