Skip to main content
Solid Relay

Function: createMutation()

createMutation<TMutation>(mutation): [(config) => Disposable, Accessor<boolean>]

Defined in: index.d.mts:147

Creates a mutation commit function and an in-flight state accessor.

The returned commit function forwards to Relay's commitMutation and keeps isMutationInFlight updated while one or more commits are active.

Type Parameters

TMutation

TMutation extends MutationParameters

Parameters

mutation

GraphQLTaggedNode

GraphQL mutation document.

Returns

[(config) => Disposable, Accessor<boolean>]

A tuple of [commitMutation, isMutationInFlight].

Last updated: 3/5/26, 7:43 PM

Edit this page on GitHub
Solid RelaySolidJS Bindings for Relay
Community
github