import { gql } from '@apollo/client'

export const SIGN_IN_MUTATION = gql`
  mutation SignIn($username: String!, $password: String!) {
    signIn(username: $username, password: $password) {
      id
      role
    }
  }
`

export const REFRESH_SESSION_MUTATION = gql`
  mutation RefreshSession {
    refreshSession {
      id
      firstName
      lastName
      middleName
      orgId
      role
      org {
        id
        name
      }
    }
  }
`

export const CURRENT_USER_QUERY = gql`
  query CurrentUser {
    currentUser {
      avatarUrl
      id
      role
      firstName
      middleName
      lastName
      username
      org {
        id
        name
      }
    }
  }
`