- Clone this repository.
- Create an environment file named '.env' in the root directory and set the value of the variables 'SECRET_KEY' and 'PORT'.
- Run 'npm install' from the root directory to install the dependencies.
- Run 'npm start' from the root directory and the server starts on the specified port.
The server supports the following queries:
- user(id) => returns the user details with the passed id
- users() => returns a list of all the registered users
The server supports the following mutations:
- login(email, password) => makes a login attempt and returns the user instance with an authorization token, if successful.
- create(...user_details) => creates and registers an user and returns the instance if successful.
- logout() => logs the user out if logged in.
- delete(email, phone_number, password) => deletes the user from the record if the auth matching was successful.
- updatePassword(email, current_password, new_password) => updates the password if the entered password and email match.
- updatePhoneNumber(email, password, phone_number) => updates the phone number if the entered password and email match.