login
Overview
This mutation takes the required inputs and logs in to borderless. It automatically logs you into your first account, but you can use switchAccounts mutation to switch.
Special Considerations
- Mutation automatically logins to the first account you made with the given login
Inputs
loginArgs
Required Data
email: string
password: string
extendExpirationSecret (optional): string
Returns
Promise<AuthPayload>
A promise containing the following object / data:
user: {
loginId: ID,
person: PrivatePerson,
account: PrivateAccount,
numAccounts: int,
}
Example
Running this mutation:
mutation {
login(data: {
email: "docexample@getborderless.com"
password: "stRONgPassW0Rdh3r3"
}) {
user {
loginId
person {
email
}
account {
accountType
}
}
}
}
Gives us:
{
"data": {
"login": {
"user": {
"loginId": "5edff09a6661440013be972e",
"person": {
"email": "docexample@getborderless.com"
},
"account": {
"accountType": "BUSINESS",
}
}
}
}
}
Common Errors
When running this mutation some of the common errors encountered include:
- Invalid email or password. Please try again. (E-7006)
- Please input a different password or email