Skip to content

Commit 9f8f4bb

Browse files
committed
Fix pagination bug
1 parent 227dc44 commit 9f8f4bb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

graphql/query_executor.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,12 @@ func executePaginatedQuery(ctx context.Context, query string, inputVariables map
139139
}
140140

141141
// Merge all responses
142-
for i := 1; i < len(allResponses); i++ {
142+
for _, resp := range allResponses {
143143
// Merge the data from each response
144-
finalResponseData = append(finalResponseData, allResponses[i].Data)
144+
finalResponseData = append(finalResponseData, resp.Data)
145145

146146
// Merge any errors
147-
finalResponseErrors = append(finalResponseErrors, allResponses[i].Errors...)
147+
finalResponseErrors = append(finalResponseErrors, resp.Errors...)
148148
}
149149

150150
finalResponse := GqlQueryResponse{

0 commit comments

Comments
 (0)