Changes a preference of the signed-in user, read with useUserPreference. A value shows
at once and goes back if the API refuses it. undefined removes the user's value, so the key's
default applies again. A function gets the value on screen and returns the next one, like a
toggle.
The options say where the value is stored, and only take the places the key is stored in.
shared: true changes the value everyone in the project or organization shares, where the key
has one. resourceType names the kind of resource, which a key stored in both projects and
organizations needs. Without a projectId, it uses the project of the nearest resource; without
an organizationId, the Dashboard's organization.
The mutation envelope {mutate, isPending, error, data, reset}. mutate resolves with
the stored preference, or rejects with a PreferenceError when the API refuses the change.
Changes a preference of the signed-in user, read with useUserPreference. A value shows at once and goes back if the API refuses it.
undefinedremoves the user's value, so the key's default applies again. A function gets the value on screen and returns the next one, like a toggle.The options say where the value is stored, and only take the places the key is stored in.
shared: truechanges the value everyone in the project or organization shares, where the key has one.resourceTypenames the kind of resource, which a key stored in both projects and organizations needs. Without aprojectId, it uses the project of the nearest resource; without anorganizationId, the Dashboard's organization.