Given a collection like this:
const Pages: CollectionConfig = {
slug: 'pages',
fields: [
{ type: 'text', label: 'Name', name: 'name' },
{ type: 'textarea', label: 'Description', name: 'description' },
{
type: 'row',
fields: [
{
type: 'text',
name: 'about',
label: 'About',
},
],
},
],
};
The generated types for Page collection are (stripped for brevity):
"Page": {
"type": "object",
"title": "Page",
"properties": {
"id": { "type": "string" },
"name": { "type": ["string", "null"] },
"description": { "type": ["string", "null"] },
"about": { "type": ["string", "null"] },
"updatedAt": { "type": "string" },
"createdAt": { "type": "string" }
},
"required": ["id", "updatedAt", "createdAt"]
}
PageQueryOperations schema
Notice how about (the field inside the row) shows up fine in the main Page schema, but it’s completely missing from PageQueryOperations.
Same with textarea fields, they don’t show up in query ops either, though that one looks like an easy fix.
(There are probably few more field types that are missing, like tabs for example.)
Given a collection like this:
The generated types for
Pagecollection are (stripped for brevity):PageschemaPageQueryOperationsschemaNotice how
about(the field inside the row) shows up fine in the mainPageschema, but it’s completely missing fromPageQueryOperations.Same with
textareafields, they don’t show up in query ops either, though that one looks like an easy fix.(There are probably few more field types that are missing, like
tabsfor example.)