UpdateInput type

Input type for updating existing entities.

All fields are optional. Relationship fields accept keyed full or projected objects, or primary-key-only. Array inputs are accepted, but do not guarantee returned relationship fields.

Example

// Update with primary-key-only for relationship
const input: UpdateInput<Todo> = {
  title: 'Updated Title',
  category: { id: 'new-cat-id' },
};
type UpdateInput<T> = Partial<MutationInput<T>>