Actions15
User → Update
AI-generatedSummary
Update a user identified by its ID
Inputs
- userId (required) — The ID of the user
- customQuery — Custom GraphQL mutation. Leave empty to use default templates.
- variables — GraphQL variables as JSON object
Output shape
a JSON object representing the updated user
Returns the updated user data; may include error details if the mutation fails.
Examples
Example 1: Update a user with a default mutation
userId: "123", customQuery: "", variables: "{}"
Example 2: Update a user's role using a custom mutation
userId: "123", customQuery: "mutation { updateUser(id: $id, input: { roleId: $roleId } ) { id roleId } }", variables: "{"id":"123","roleId":"admin"}"
Example 3: Update a user with name and email via custom mutation
userId: "123", customQuery: "mutation { updateUser(id: $id, input: { name: $name, email: $email } ) { id name email } }", variables: "{"id":"123","name":"John Doe","email":"john@example.com"}"