[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [local‑first/Schema](https://evolu.dev/docs/api-reference/common/local-first/Schema) › MutationOptions

Defined in: [packages/common/src/local-first/Schema.ts:202](https://github.com/evoluhq/evolu/blob/e7144e2bbe9069362b62dec1b64a8aa922b8f1b0/packages/common/src/local-first/Schema.ts#L202)

## Properties

<a id="oncomplete"></a>

### onComplete?

```ts
readonly optional onComplete?: () => void;
```

Defined in: [packages/common/src/local-first/Schema.ts:208](https://github.com/evoluhq/evolu/blob/e7144e2bbe9069362b62dec1b64a8aa922b8f1b0/packages/common/src/local-first/Schema.ts#L208)

Called after the mutation is completed and the local state is updated.
Useful for triggering side effects (e.g., notifications, UI updates) after
insert, update, or upsert.

### ownerId?

```ts
readonly optional ownerId?: string & Brand<"Id"> & Brand<"OwnerId">;
```

Defined in: [packages/common/src/local-first/Schema.ts:241](https://github.com/evoluhq/evolu/blob/e7144e2bbe9069362b62dec1b64a8aa922b8f1b0/packages/common/src/local-first/Schema.ts#L241)

Specifies the owner ID for this mutation. If omitted, the default
[AppOwner](https://evolu.dev/docs/api-reference/common/local-first/Owner/interfaces/AppOwner) is used.

The owner must be used with `evolu.useOwner()` to enable sync. Mutations
with unused owners are stored locally but not synced until the owner is
used.

### Example

```ts
// Partition your own data by project (derived from your AppOwner)
const projectOwner = deriveShardOwner(appOwner, ["project", projectId]);
evolu.insert("task", { title: "Task 1" }, { ownerId: projectOwner.id });

// Collaborative data (independent owner shared with others)
const sharedOwner = createSharedOwner(sharedSecret);
evolu.insert("comment", { text: "Hello" }, { ownerId: sharedOwner.id });
```