Skip to content

Commit 9c640ba

Browse files
committed
feat: Propagate renewQuery option from API to orchestrator
Fixes #112
1 parent ca68cd3 commit 9c640ba

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/cubejs-api-gateway/index.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ const querySchema = Joi.object().keys({
121121
order: Joi.object().pattern(id, Joi.valid('asc', 'desc')),
122122
segments: Joi.array().items(id),
123123
timezone: Joi.string(),
124-
limit: Joi.number().integer().min(1).max(50000)
124+
limit: Joi.number().integer().min(1).max(50000),
125+
renewQuery: Joi.boolean()
125126
});
126127

127128
const normalizeQuery = (query) => {
@@ -244,7 +245,11 @@ class ApiGateway {
244245
const annotation = prepareAnnotation(metaConfig, normalizedQuery);
245246
const aliasToMemberNameMap = prepareAliasToMemberNameMap(metaConfig, sqlQuery, normalizedQuery);
246247
const toExecute = {
247-
...sqlQuery, query: sqlQuery.sql[0], values: sqlQuery.sql[1], continueWait: true
248+
...sqlQuery,
249+
query: sqlQuery.sql[0],
250+
values: sqlQuery.sql[1],
251+
continueWait: true,
252+
renewQuery: normalizedQuery.renewQuery
248253
};
249254
const response = await this.getAdapterApi(req).executeQuery(toExecute);
250255
this.log(req, {

0 commit comments

Comments
 (0)