File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -246,18 +246,9 @@ type UnifiedPaginationParams struct {
246
246
// ToGraphQLParams converts REST API pagination parameters to GraphQL-specific parameters.
247
247
// This converts page/perPage to first parameter for GraphQL queries.
248
248
func (u UnifiedPaginationParams ) ToGraphQLParams () GraphQLPaginationParams {
249
- // Cap perPage to safe range before converting to int32
250
- perPage := u .PerPage
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
-
249
+ first := int32 (u .PerPage )
259
250
return GraphQLPaginationParams {
260
- First : & first ,
251
+ First : & first , //nolint:gosec // G115: This is safe, we cap perPage to 100 in the toolset
261
252
}
262
253
}
263
254
You can’t perform that action at this time.
0 commit comments