ErrorsReads and writes · rule
query.result_type
Query result is not the entity or a type derived from it.
Area 6, Reads and writes; not declinable; the next step is usually the agent's.
type Title = Text { max_length: 80}entity Book { id: Uuid title: Title subtitle: Title? available: Bool}query titles(title: Book.title) -> List<Title> { from: Book where: Book.title == title order: [Book.id asc] limit: 20}
error titles reads Book records but returns List<Title>
--> main.jadpo:12:36
|12 | query titles(title: Book.title) -> List<Title> { | ^^^^^^^^^^^ not records of the entity
- reason
- A query's result is
Bookor an object type its fields fill (type BookView = Output { pick: [...] }), asTfor exactly one record,T?for at most one,List<T>orPage<T>, or a map layer,FeatureCollection<G, P>. - next
- Return
Book, or anOutputtype that picks the fields you need (agent) - rule
- query.
result_ type - help
- https://jadpo.
dev/docs/errors/query. result_ type
Markdown for agents: /docs/errors/query.result_type.md.Built from Jadpo main at aee2e8f.