Interface: MutationFactory()<TSchemaIO>

Function to create a GraphQL mutation.

Type Parameters

TSchemaIO extends AbstractSchemaIO

MutationFactory<TOutput, TInput>(output, resolveOrOptions): FieldOrOperation<undefined, SchemaToSilk<TSchemaIO, TOutput>, InputSchemaToSilk<TSchemaIO, TInput>, "mutation">

Function to create a GraphQL mutation.

Type Parameters

TOutput extends object

TInput extends undefined | object | Record<string, TSchemaIO[0]> = undefined

Parameters

output: TOutput

resolveOrOptions: QueryMutationOptions<TSchemaIO, TOutput, TInput> | () => MayPromise<InferPropertyType<TOutput, TSchemaIO[2]>>

Returns

FieldOrOperation<undefined, SchemaToSilk<TSchemaIO, TOutput>, InputSchemaToSilk<TSchemaIO, TInput>, "mutation">

Defined in

packages/core/src/resolver/types.ts:191