Skip to main content

Core Mutations

Mutations greatly follow the format of queries (see fetching data with resolved).

Example#

import { resolved, mutation } from '../gqless';
resolved(() => {
const { email, name } = mutation.createUser({
email: 'xx@xx.com',
name: 'XX',
});
return {
email,
name,
};
})
.then((data) => {
console.log('User created!', data);
})
.catch((err) => {
console.error(err);
});

See also#

Last updated on by github-actions[bot]