Summary
Enforce or explicitly define selectAll() exclusivity in the TypeScript SDK query builder.
selectAll() currently preserves previously selected columns, and select() preserves the selectAll state. As a result, these chains have inconsistent behavior:
select('page').selectAll() changes the projection to all readable columns.
selectAll().select('page') can send incompatible selection state.
selectAll().count() and similar aggregation chains reach the server and fail with HTTP 400.
Rationale
The SDK documentation states that selectAll() is mutually exclusive with explicit .select(...) calls and aggregations. The SDK should enforce this contract before a request is sent, or the documentation must describe the actual supported behavior consistently.
Affected areas
clients/ts/src/query-builder.ts
- TypeScript SDK query-builder tests
docs/src/content/docs/sdk/queries.md
Acceptance criteria
- Define the supported behavior when
.selectAll() is combined with .select(...) or aggregation methods.
- Enforce the behavior in the TypeScript SDK before sending an invalid request, or revise the SDK documentation to match the intentional behavior.
- Add test coverage for both method orders.
- Keep
docs/src/content/docs/sdk/queries.md consistent with the SDK behavior.
Backlinks
Summary
Enforce or explicitly define
selectAll()exclusivity in the TypeScript SDK query builder.selectAll()currently preserves previously selected columns, andselect()preserves theselectAllstate. As a result, these chains have inconsistent behavior:select('page').selectAll()changes the projection to all readable columns.selectAll().select('page')can send incompatible selection state.selectAll().count()and similar aggregation chains reach the server and fail with HTTP 400.Rationale
The SDK documentation states that
selectAll()is mutually exclusive with explicit.select(...)calls and aggregations. The SDK should enforce this contract before a request is sent, or the documentation must describe the actual supported behavior consistently.Affected areas
clients/ts/src/query-builder.tsdocs/src/content/docs/sdk/queries.mdAcceptance criteria
.selectAll()is combined with.select(...)or aggregation methods.docs/src/content/docs/sdk/queries.mdconsistent with the SDK behavior.Backlinks