/user-session-backend

A Spring backend that exposes a GraphQL interface that allows user-management.

Primary LanguageJavaMIT LicenseMIT

License

user-session-backend

A Spring backend that exposes a GraphQL interface that allows user-management.

Setup

  • pull this project
  • navigate into docu/docker and run docker-compose up -d to create and start all required containers for this project (DB, ...)

Example queries:

register a user:
query register {
    registerUser(userDto: {
        firstName: "first",
        lastName: "last",
        username: "username",
        email: "user@mail.com"
    }, password: "pw")
}
login:
query login {
    authenticateUser(email: "user@mail.com", password: "pw")
}
update user information:
query updateUser {
    updateUser(sessionToken: "0PDuouskqkS9G0mwqd4Pd", password: "pw", userDto: {
        firstName: "newFirst",
        username: "newUsername"
    })
}
find user by id:
query findUser {
    findUserById(userId: 1) {
        username,
        email
    }
}