We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d2dd8f2 commit 3cab7b1Copy full SHA for 3cab7b1
pkg/github/server.go
@@ -246,10 +246,14 @@ type UnifiedPaginationParams struct {
246
// ToGraphQLParams converts REST API pagination parameters to GraphQL-specific parameters.
247
// This converts page/perPage to first parameter for GraphQL queries.
248
func (u UnifiedPaginationParams) ToGraphQLParams() GraphQLPaginationParams {
249
+ // Cap perPage to safe range before converting to int32
250
perPage := u.PerPage
- if perPage > 2147483647 {
251
+ if perPage > 100 { // GraphQL expects a max of 100
252
perPage = 100
253
}
254
+ if perPage < 1 {
255
+ perPage = 1
256
+ }
257
first := int32(perPage)
258
259
return GraphQLPaginationParams{
0 commit comments