payload-operations — Optimization
Keep outputs encodable
Section titled “Keep outputs encodable”Use a codec or overwrite for output and declared error data that need conversion. A one-way transform cannot be encoded by the server.
Preserve access control
Section titled “Preserve access control”Pass overrideAccess: false and req when a handler calls a Payload Local API on behalf of the caller.
Bound request bodies
Section titled “Bound request bodies”Requests over 1 MiB return 413 PAYLOAD_TOO_LARGE by default. Set maxBodyBytes when the operation needs a larger body.
Separate server and universal imports
Section titled “Separate server and universal imports”The ./server subpath requires Node.js 20.9 or newer. The root, contract, errors, client, CMS, and timeout plugin subpaths are universal.