matchUpdate

See also, limitations of getAccessor

Updates the value for a given accessor, by performing a pattern match against all other values of same type. See Matchers for more.

Example

Set query.me to a User in the cache, with a name of bob:

import { matchUpdate } from 'gqless'
const updated = matchUpdate(query.me, { name: 'bob' })
if (!updated) {
throw new Error('bad match')
}
Last updated on by Sam Denty