Repository navigation
Document callback.nextQuery in query() #2174
Description
Activity
By default,
nextQueryis not included in the response, which is why we don't include it in the documentation, instead using the example to demonstrate how it is meant to be used. That example for BigQuery is:To control how many API requests are made and page through the results manually, set
autoPaginatetofalse.var callback = function(err, rows, nextQuery, apiResponse) { if (nextQuery) { bigquery.query(nextQuery, callback); } }; bigquery.query({ query: query, autoPaginate: false }, callback);
The key part here is
autoPaginate: false-- that's the argument which istrueby default, and when disabled, will change the signature of the callback.Since it is not the default set of arguments to the function, I think we'd end up confusing more users by stating that their callback will receive the
nextQueryargument.However, I do think we messed up-- we shouldn't show that the callback receives
apiResponse, because that doesn't come by default either.@callmehiphop does all that sound correct?
- addedapi: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.
on Mar 31, 2017 Thank you for the detail response. I am now able to get the apiResponse.
- addedpriority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.
on Apr 4, 2017 - added a commit that references this issue
on Feb 25, 2026 - added a commit that references this issue
on Mar 18, 2026
Can you document the callback.nextQuery parameter for the BigQuery query() function?
https://github.com/GoogleCloudPlatform/google-cloud-node/blob/master/packages/bigquery/src/index.js#L714
Without documenting this parameter, the generated docs are misleading. See https://issuetracker.google.com/36408121.