Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
GraphQL Sign In Challenge 💫

Sign In Challenge

React Native Sign In with GraphQL

Challenge

Steps:

  1. Use the Getting Started guide to launch your first app.
  2. Create a sign in form using Formik with email and password, make sure to valid the fields.
  3. Add Apollo Client to the app, check out the guide Integrating with React Native.
https://recruitment-signin-endpoint.now.sh
  1. Submit your form values to the signInQuery
query signInQuery($email: String! $password: String!) {
  signIn(email: $email password: $password) {
    id
    firstName
    lastName
    auth {
      token
    }
  }
}
  1. Sign In using these credentials 🕵️‍♀️
{
	"email": "holgerballweg@mail.com",
	"password": "agent007"
}
  1. Retrieve and store auth.token 🔐
{
  "data": {
    "signIn": {
      "id": "5e81132169df12c084d23703",
      "firstName": "Holger",
      "lastName": "Ballweg",
      "auth": {
        "token": "XXXXXXXXXXXXXXXXXXXXXXX"
      }
    }
  }
}
  1. Demo it to us! 🎉 (May the demo Gods be with you)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment