Skip to content

Collection Configuration

Exclude collections and control which CRUD operations are generated.

The collections option in your config lets you fine-tune generation per collection.

Set exclude: true to skip a collection entirely — no types, SDK functions, or plugin output will be generated for it.

collections: {
_superusers: { exclude: true },
logs: { exclude: true },
}

Use the operations object to disable specific operations. All seven are enabled by default.

collections: {
articles: {
operations: {
get: false, // disable getArticle()
getFirst: false, // disable getFirstArticle()
list: false, // disable listArticles()
getFullList: false, // disable getFullListArticles()
create: false, // disable createArticle()
update: false, // disable updateArticle()
delete: false, // disable deleteArticle()
},
},
}
OperationFunction generatedDescription
getgetXxx()Get a single record by ID
getFirstgetFirstXxx()Get the first record matching a filter
listlistXxx()Paginated list
getFullListgetFullListXxx()Get all records
createcreateXxx()Create a new record
updateupdateXxx()Update an existing record
deletedeleteXxx()Delete a record

Generate only read operations, no mutations:

collections: {
analytics: {
operations: {
create: false,
update: false,
delete: false,
},
},
}

The collections config is shared with plugins. Excluding a collection or disabling an operation will also affect plugin output (e.g. TanStack Query options).