felicity-lims/frontend/vite/src/graphql/clients.queries.ts

87 lines
1.5 KiB
TypeScript
Raw Normal View History

2021-03-26 04:22:59 +08:00
import gql from 'graphql-tag'
export const GET_ALL_CLIENTS = gql`
query getAllClients {
clientAll {
2021-09-27 23:45:22 +08:00
totalCount
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
items {
2021-03-26 04:22:59 +08:00
uid
name
code
district {
uid
name
province {
uid
name
country{
uid
name
}
}
}
}
}
}`;
export const SEARCH_CLIENTS = gql`
query searchClients($queryString: String!) {
clientSearch(queryString: $queryString){
uid
name
code
district {
uid
name
province {
uid
name
country{
uid
name
}
}
}
}
}`;
export const GET_CLIENT_CONTACTS_BY_CLIENT_UID = gql`
2021-09-27 23:45:22 +08:00
query getClientContactsByClientUid($clientUid: Int!) {
2021-03-26 04:22:59 +08:00
clientContactByClientUid(clientUid: $clientUid){
uid
firstName
lastName
email
mobilePhone
consentSms
}
2021-05-07 01:32:14 +08:00
}`;
export const GET_CLIENT_BY_UID = gql`
2021-09-27 23:45:22 +08:00
query getClientByUid($uid: Int!) {
2021-05-07 01:32:14 +08:00
clientByUid(uid: $uid){
uid
name
code
district {
uid
name
province {
uid
name
country{
uid
name
}
}
}
}
}`;