Skip to content

Commit 4dbe788

Browse files
committed
docs(data-modeling): say where each spelling of an empty projection is refused
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzfMG4xAptDoRoz9kyT
1 parent 939accc commit 4dbe788

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

‎content/docs/data-modeling/queries.mdx‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,13 @@ retired, read them with the operator-only
296296
them before `os migrate apply --allow-destructive` drops the column. No runtime door serves
297297
them.
298298

299-
`fields` names at least one column. An empty list (`fields: []`, `$select=`) is refused with
300-
`400 VALIDATION_ERROR` — on the data API, and by `engine.find()` / `findOne()` for an in-process
301-
caller (a plugin, a hook, a flow), the top-level `fields` and an `expand` entry's alike — rather
302-
than read as "every column". Leave `fields` out to read every column.
299+
`fields` names at least one column. An empty list, or a list with a blank name, is refused
300+
rather than read as "every column", the top-level `fields` and an `expand` entry's alike: by the
301+
query schema itself (`QuerySchema`), so a `POST /data/:object/query` body with `fields: []` answers
302+
`400 VALIDATION_FAILED` naming `query.fields`; on the querystring (`?fields=`, `$select=`) with
303+
`400 VALIDATION_ERROR`; and by `engine.find()` / `findOne()` for an in-process caller (a plugin, a
304+
hook). A flow `get_record` node with `fields: []` is refused when the flow is saved. Leave
305+
`fields` out to read every column.
303306

304307
### Nested / Related Fields
305308

0 commit comments

Comments
 (0)