Invite athletes to a given team
The inviteAthletes
mutation allows you to invite athletes to train on FYTT.
The mutation accepts a single athletes
argument, which should be an array of InviteInput
objects.
For each athlete supplied in the array, an email invitation will be sent from FYTT to the email provided for the athlete. This email contains a unique link that allows the athlete to create their account and join the given team.
Caution
It is possible to send duplicate invite emails, so be careful when using this mutation to avoid spamming your athletes.
InviteInput
InviteInput
The InviteInput
object requires all the following arguments in order to successfully invite an athlete.
email*
[String]
The email
attribute should be a valid email that belongs to the athlete. The email invitation will be sent to this address.
firstName*
[String]
The firstName
attribute is the first name of the athlete to be invited.
lastName*
[String]
The lastName
attribute is the last name of the athlete to be invited.
teamUuid*
[String]
The teamUuid
attribute is the UUID for the team that you want the athlete to join.
* indicates required attribute
Sample Query
Example:
mutation {
inviteAthletes(
athletes:[
{
firstName:"Mike",
lastName:"Jones",
email:"[email protected]",
teamUuid:"d4715ac0-9e89-462d-88b1-991b4a478a72"
},
{
firstName:"Steve",
lastName:"Smith",
email:"[email protected]",
teamUuid:"d4715ac0-9e89-462d-88b1-991b4a478a72"
}
]
) {
status,
errors,
athletes {
email,
}
}
}
Response:
{
"data": {
"inviteAthletes": {
"status": "200",
"errors": [],
"athletes": [
{
"email": "[email protected]"
},
{
"email": "[email protected]"
}
]
}
}
}