Update a Coach

Use the coachUpdate mutation to update the coach name, email or password within the TeleWellness Portal.

Available argument

Argument Name
Is required?
Type
Description
ID
Yes
ID
Unique Coach ID. Get this ID by executing the coaches query
name
No
String
Coach name
email
No
string
Coach email
password
No
Object that contains the password fields.

UpdatePasswordInput object

Available Fields

Field Name
Type
Description
old
String
Introduce the old password
new
String
Introduce the new password

Available Fields

The following fields will be displayed in the response:
Field Name
Type
Description
success
Boolean
True if the coach information has been updated successfully. Otherwise, False
message
String
Description of the result
coach
Coach
Object that returns the coach information

Example

Update the coach name
Request
Response
mutation {
coachUpdate(
input: { id: "Q29hY2g6ODk2", name: "Liliana Elizabeth Iriarte Sanabria" }
) {
success
message
coach {
id
email
name
isAdmin
isDisabled
createdAt
updatedAt
}
}
}
{
"data": {
"coachUpdate": {
"success": true,
"message": "Coach updated",
"coach": {
"id": "Q29hY2g6ODk2",
"email": "[email protected]",
"name": "Liliana Elizabeth Iriarte Sanabria",
"isAdmin": true,
"isDisabled": false,
"createdAt": "2021-11-24T18:07:29.189670+00:00",
"updatedAt": "2022-01-17T21:27:54.241497+00:00"
}
}
}
}
Verify that the information was updated by accessing the My Account option: