GraphQL Cookbook

Signing up

6min

Signing up a user through the Parse GraphQL API

Problem

You want to sign up a new user in your backend through the Parse GraphQL API.

Solution

Using the Parse GraphQL API, you can sign up a new user just by sending the user’s data through the signUp mutation. The username and password fields are mandatory. The mutation will return back not only the objectId and createdAt fields (that are returned by default when creating an object), but also the sessionToken.

After signing up a new user, you can use the authenticating a user recipe to send the sessionToken in the following operations so they will be executed in the behavior of this user. You can also use the logging in recipe to log in the user by using the defined credentials and the logging out recipe to destroy the sessionToken.

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.2.0 and later

Request
Response


Older Parse Server Versions