Skip to main content

updateUserPreferences

Requires an authenticated session.

Saves the signed-in user's own preferences: language, currency, region, time zone and date, time and number formats. Available to customer apps too.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation UpdateUserPreferences($input: UpdateUserPreferencesInput!) {
updateUserPreferences(input: $input) {
id
createdAt
currencyId
dateFormat
languageId
numberFormat
language {
id
code
name
nativeName
createdAt
direction
}
}
}

Variables:

{
"input": {}
}

Response:

{
"data": {
"updateUserPreferences": {
"id": "id",
"createdAt": "2025-01-15T00:00:00Z",
"currencyId": "string",
"dateFormat": "string",
"languageId": "string",
"numberFormat": "string",
"language": {
"id": "id",
"code": "string",
"name": "string",
"nativeName": "string",
"createdAt": "2025-01-15T00:00:00Z",
"direction": "LTR"
}
}
}
}
updateUserPreferences(
input: UpdateUserPreferencesInput!
): UserPreference!

Arguments​

updateUserPreferences.input ● UpdateUserPreferencesInput! non-null input​

The preferences to save.

Type​

UserPreference object​

A user's preferences.