Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login/Register Page #16

Open
dkuc opened this issue Nov 5, 2020 · 0 comments
Open

Login/Register Page #16

dkuc opened this issue Nov 5, 2020 · 0 comments
Assignees

Comments

@dkuc
Copy link
Owner

dkuc commented Nov 5, 2020

The API will be graphql. There will be both register and log in calls.

Register page needs to ask for username, email, and password.
Login page just needs username/password.

Register Call

mutation RegisterUser {
  register(input: {username: "dan", email: "[email protected]", password: "p@ss"}) {
    user {
      id
    }
  }
}

Login Call

mutation LogIn {
  login(input: {username: "dan", password: "p@ss"}) {
    user {
      id
    }
  }
}

See an example of this API live here:
https://graphile-starter.herokuapp.com/

May be useful to use this code, but maybe not.
https://github.com/graphile/starter/blob/main/%40app/client/src/pages/login.tsx
https://github.com/graphile/starter/blob/main/%40app/client/src/pages/register.tsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants