Core Mutations#
Mutations greatly follow the format of queries (see fetching data with resolved
).
Example#
import { resolved, mutation } from '../gqty';
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);
});