Writes go through a data source's writing. A mutation resolver builds the records to write. It then runs them through the runtime's write strategy for the target source, choosing a load strategy (full_load, full_load_append, or append).
Write Strategy Availability #
A write strategy is only available when the adapter reports the capabilities it needs. For the strategies themselves and how they compare, see write strategies. For how a write combines with existing data, see load strategies.
A data source configured without a writeConfig has no write strategy. In that case, runtime.getWriteStrategy(name) throws WriteStrategyNotConfiguredError.
For the full step-by-step, see Set Up a Trino Mutation. It covers writeConfig, the endpoint definition, generation, and permission.
Permissions #
Writes are authorized by the writePermission scope. It is backed by your permission rules under Mutation. A caller without write access to the target table is denied before the write runs.
Custom Mutation Fields #
Define mutation fields on the shared builder, the same way as custom resolvers. Validate input with a Zod schema and declare the required write scope.