GraphQL Cookbook

Logging out

6min

Logging out a logged user through the Parse GraphQL API

Problem

You want to log out a logged user in your backend through the Parse GraphQL API.

Solution

Using the Parse GraphQL API, you can log out a logged user just by sending the user’s sessionToken through the X-Parse-Session-Token header (as described in the authenticating a user recipe) and calling the logOut mutation. Parse Server will destroy the sessionToken and it will not be accepted for any other future request.

Version Information

Depending on the version of Parse you choose to run, the GraphQL queries, mutations and results will be slightly different. Please choose the correct example along with the Parse version you are running.

Parse Server 4.4.0 and later

Request
Response


Older Parse Server Versions



Updated 08 Mar 2024
Did this page help you?