The revokeSession() GraphQL mutation is used to revoke a specified session. It can revoke a single session, all sessions for a user, or all sessions in an organization.

For information on session management, see the Session Management documentation page. You may also want to look at session().

Syntax

Below is the syntax for the revokeSession() mutation field:

graphql
revokeSession(
     input: RevokeSessionInput!
   ): boolean!

Given Datatypes

For the given datatype, RevokeSessionInput, there are several parameters that may be given. Below is a list of them along with their datatypes and a description of each:

Table: RevokeSessionInput

ParameterTypeRequiredDefaultDescription
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column.
Table last updated: Sep 19, 2024
idstringyes The unique identifier of the session.
revocationTypeSessionRevocation__Typeyes The type of revocation. This is an enumerated list: Organization, User, or Session. See SessionRevocation__Type.