Skip to main content

Login

Attempts to login the user. The mutation will perform a number of checks such as password validity and email verification status. If successful, the user will be logged in and an authentication token returned. If not, an appropriate error will be provided. This authToken can then be provided in the header of a call to authenticate the user. Example: authToken: {authTokenValue}. The results of this mutation can be affected by providing an authToken header to set a user for the operation.

Login(
email: String!
password: String!
): String!

Arguments

Login.email ● String! non-null scalar

The email of the Current User attempting to log in.

Login.password ● String! non-null scalar

The password of the Current User attempting to log in.

Type

String scalar

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

Examples

Run in Postman

Query:

Login(
$email: String!,
$password: String!
) {
Login(
email: $email,
password: $password
)
}

Variables:

{
"email": "abc123",
"password": "abc123"
}

Response:

{
"data": {
"Login": "abc123"
}
}