The builder enables Pothos's validation plugin. Input arguments are validated with Zod schemas before a resolver runs. A failing validation becomes a GraphQL error rather than reaching the data source.
Built-In Validation #
The perPage paging argument is validated out of the box. It must be at least 1 and no more than the configured maximum. A request asking for more rows than allowed is rejected with a clear message instead of silently capping.
Adding Validation #
When you define custom queries or mutations, attach a Zod schema to an argument through the field's validate option. This is the same way the built-in paging input works. Validation errors are collected and surfaced as a single GraphQL error through LakeQL's error handling.