MDM/mdm-front/src/features/auth/api/auth.graphql.ts

36 lines
564 B
TypeScript

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 {
id
role
}
}
`