feat(api-gateway): expose query limit settings on /v1/meta#10813
feat(api-gateway): expose query limit settings on /v1/meta#10813
Conversation
Add a `settings` object to the `/v1/meta` response containing `defaultLimit` (CUBEJS_DB_QUERY_DEFAULT_LIMIT) and `maxLimit` (CUBEJS_DB_QUERY_LIMIT) so clients can render correct UI defaults and validate queries client-side without knowing about Cube env vars. `defaultLimit` is clamped to `maxLimit` to mirror the runtime behaviour in query.js#normalizeQuery. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Claude finished @keydunov's task in 1m 24s —— View job PR Review: expose query limit settings on /v1/meta
Overall this is a clean, well-scoped PR. The implementation mirrors the existing clamping logic in Issues1. 2. 3. Minor / Nits4. Comment is verbose for this codebase 5. Tests could assert specific default values 6. Inline type repeated in gateway.ts import { MetaResponseSettings } from './types/request';SecurityNo concerns. The exposed values ( SummaryClean feature addition. The main actionable items are (1) deciding whether the |
Mirror the `extended` query parameter pattern: the new `settings` object on `/v1/meta` is now opt-in and only returned when the `includeSettings` query parameter is present. Keeps the default response minimal and avoids leaking server config to clients that don't ask for it. Co-authored-by: Cursor <cursoragent@cursor.com>
Clarify in the getMetaSettings JSDoc that this object only carries non-sensitive deployment settings (operational knobs like query limits) and is safe to expose to API clients. Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## master #10813 +/- ##
===========================================
- Coverage 78.79% 58.11% -20.68%
===========================================
Files 470 216 -254
Lines 92135 16906 -75229
Branches 3424 3428 +4
===========================================
- Hits 72597 9825 -62772
+ Misses 19035 6578 -12457
Partials 503 503
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Add a
settingsobject to the/v1/metaresponse containingdefaultLimit(CUBEJS_DB_QUERY_DEFAULT_LIMIT) andmaxLimit(CUBEJS_DB_QUERY_LIMIT) so clients can render correct UI defaults and validate queries client-side without knowing about Cube env vars.defaultLimitis clamped tomaxLimitto mirror the runtime behaviour in query.js#normalizeQuery.Check List