LakeQL exports a configured Pothos builder that the generated query schemas build on. Configuring it in one place keeps auth, validation, scalars, and pagination consistent across every endpoint.
Plugins #
The builder enables two Pothos plugins:
-
scope-auth
— enforces the
authorized,readPermission, andwritePermissionscopes on every field. See scope authorization . - validation — validates input arguments with Zod schemas. See input validation .
Registered Types #
On top of the plugins, the builder registers the scalar types, the comparison input types, the SortDirection enum, and the pagination types.
Max Records Per Page #
The builder reads a maximum page size from the environment. Override it at runtime with defineApiConfig's maxRecordsPerPage option, which drives this and defaults to 2000. The perPage paging argument is validated against it.