Skip to content
This repository has been archived by the owner on Sep 18, 2022. It is now read-only.

AlexanderMint/upment-hanami

Repository files navigation

Upment hanami

CircleCI codecov Maintainability

Examples:

Users

query {
  users(limit: 3, order: desc) {
    id
    firstName
    lastName
    email
  }
}  

User

query {
  user(id: 1){
    id
    firstName
    lastName
    email
  }
}

User update

mutation updateUser($id: Int!, $firstName: String!, $lastName: String!) {
  updateUser(id: $id, firstName: $firstName, lastName: $lastName) {
    id
    firstName
    lastName
    email
  }
}

Sign In

mutation SignIn($email: String!, $password: String!) {
  signIn(email: $email, password: $password) {
    id
    firstName
    lastName
    email
    refreshToken
    accessToken
  }
}

Sign Up

mutation SignUp($email: String!, $password: String!) {
  signUp(email: $email, password: $password) {
    id
    firstName
    lastName
    email
    refreshToken
    accessToken
  }
}

Current user

query currentUser{
  currentUser{
    id
    firstName
    lastName
    email
    refreshTokens{
      id
      browserName
      deviceName
      osName
      userAgent
      token
      createdAt
    }
  }
}

Destroy refresh token

mutation destroyRefreshToken($id: Int!) {
  destroyRefreshToken(id: $id) {
    id
  }
}