Skip to main content

Interface: Mutate<GeneratedSchema>#

Type parameters#

NameType
GeneratedSchemaobject
GeneratedSchema.mutationobject
GeneratedSchema.queryobject

Callable#

â–¸ Mutate<T>(fn: (mutation: GeneratedSchema[mutation]) => T, opts?: { onComplete?: (data: T, helpers: MutateHelpers<GeneratedSchema>) => void ; onError?: (error: gqlessError, helpers: MutateHelpers<GeneratedSchema>) => void }): Promise<T>

Type parameters:#

NameDefault
Tany

Parameters:#

NameType
fn(mutation: GeneratedSchema[mutation]) => T
opts?object
opts.onComplete?(data: T, helpers: MutateHelpers<GeneratedSchema>) => void
opts.onError?(error: gqlessError, helpers: MutateHelpers<GeneratedSchema>) => void

Returns: Promise<T>

Defined in: packages/gqless/src/Client/client.ts:140

Last updated on by Sam Denty