revokeSession
Requires an authenticated session.
Ends one of the signed-in user's own sessions. Fails if the session is not theirs.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation RevokeSession($sessionId: String!) {
revokeSession(sessionId: $sessionId)
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation RevokeSession($sessionId: String!) {\n revokeSession(sessionId: $sessionId)\n}",
"variables": {
"sessionId": "string"
}
}
EOF
Variables:
{
"sessionId": "string"
}
Response:
{
"data": {
"revokeSession": true
}
}
revokeSession(
sessionId: String!
): Boolean!
Arguments
revokeSession.sessionId ● String! non-null scalar
The ID of the session.
Type
Boolean scalar
The Boolean scalar type represents true or false.