data mutation

Any operation that changes stored data, such as creating a user, liking a post or updating stock.

In more detail

Reads can be cached and repeated safely; mutations cannot, so they usually go through POST requests and need access checks. After a mutation, any cached copies of the changed data must be refreshed.

Example

In the App Router mutations usually run in Server Actions followed by revalidatePath or revalidateTag.

Related terms

Taught in

References