CRUD Mutators (Deprecated)

Overview

Zero generates basic CRUD mutators for every table you sync. To enable, set the enableLegacyMutators option to true in your schema:

const schema = createSchema({
  // ...
  enableLegacyMutators: true
})

Once enabled, mutators are available at z.mutate.<tablename>:

const zero = new Zero(...);
zero.mutate.user.insert({
	id: nanoid(),
	username: 'abby',
	language: 'en-us',
});

See Writing Data with Mutators for more information. z.mutate contains the same methods as tx.mutate but is available on the Zero instance instead of the Transaction instance.