cuyu / simple-login-demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

simple-login-demo

A simple website that allow:

  • register new user
  • login with registered user
  • add todo item in current user
  • mark todo item as finished in current user

Tech stacks

API

Add a user:

mutation AddUser($name: String!, $password: String!) {
  addUser(name: $name, password: $password) {
    name
  }
}

name and password are variables.

Add a todo:

Mark a todo as done:

Some thinkings

  1. Why not put /login and /register endpoints into /graphql?

Because /graphql needs authenticated session while /login and /register are used with no authentication yet.

About

License:MIT License


Languages

Language:JavaScript 84.9%Language:CSS 15.1%