ErrorsReads and writes · rule
query.include_result
Result type has no field of the right shape for an include.
Area 6, Reads and writes; not declinable; the next step is usually the agent's.
type Name = Text { max_length: 80}entity Author { id: Uuid name: Name}entity Book { id: Uuid author_id: Author.id { on_delete: OnDelete.cascade } title: Name}type BookCard = Output { pick: [Book.id, Book.title] author: List<Author>}query cards() -> List<BookCard> { from: Book order: [Book.title asc] limit: 20 include: { author: Book.author_id }}
error BookCard.author is List<Author>, which the include author can't fill
--> main.jadpo:28:9
|28 | author: Book.author_id | ^^^^^^ needs `Author`
- reason
authorfollows a required reference, so the one record it points at is always there. Its field isAuthor, whereAuthormay also be an object type derived from it.- next
- Declare
author: AuthorinBookCard(agent) - rule
- query.
include_ result - help
- https://jadpo.
dev/docs/errors/query. include_ result
Markdown for agents: /docs/errors/query.include_result.md.Built from Jadpo main at aee2e8f.