Skip to content

Commit e354975

Browse files
committed
docs(objectql): the unknown-field callout says a projection of only unknown entries is refused
Claude-Session: https://claude.ai/code/session_01L6bhgXcN9HaZYSEUdJWEjw Co-authored-by: Claude <noreply@anthropic.com>
1 parent 68ff239 commit e354975

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,10 @@ This object form of a field node isn't wired up for top-level `fields` projectio
322322
object's schema is registered, the engine's unknown-field filter compares each entry against
323323
the schema's field names via `String(f)`, so an object entry never matches and is silently
324324
dropped from the projection — the aliased field is simply missing from results, no error.
325+
That holds only while some other entry is known: when **every** top-level `fields` entry is
326+
unknown (object-form entries included), `engine.find()` / `findOne()` refuse the read with
327+
`400 VALIDATION_ERROR` naming the requested columns, instead of reading every column. A mix of
328+
known and unknown entries still drops the unknown ones and projects the rest.
325329

326330
Dotted relationship paths (`'owner.name'`) fare no better: the unknown-field filter validates
327331
only the **head** segment and keeps the path, but there is no populate step anywhere in the

0 commit comments

Comments
 (0)