Make companies employees type a number (#130)

Make companies employees type a number to be consistent with api
This commit is contained in:
Charles Bochet
2023-05-19 11:53:50 +02:00
committed by GitHub
parent 20bf89ab1e
commit 192b89a7b7
13 changed files with 368 additions and 45 deletions
+3 -3
View File
@@ -13,7 +13,7 @@ export const UPDATE_COMPANY = gql`
$account_owner_id: uuid
$created_at: timestamptz
$address: String
$employees: Int
$employees: numeric
) {
update_companies(
where: { id: { _eq: $id } }
@@ -52,7 +52,7 @@ export const INSERT_COMPANY = gql`
$account_owner_id: uuid
$created_at: timestamptz
$address: String
$employees: Int
$employees: numeric
) {
insert_companies(
objects: {
@@ -79,7 +79,7 @@ export const INSERT_COMPANY = gql`
`;
export const DELETE_COMPANIES = gql`
mutation DeleteCompanies($ids: [uuid]) {
mutation DeleteCompanies($ids: [uuid!]) {
delete_companies(where: { id: { _in: $ids } }) {
returning {
address
+1 -1
View File
@@ -90,7 +90,7 @@ export const INSERT_PERSON = gql`
`;
export const DELETE_PEOPLE = gql`
mutation DeletePeople($ids: [uuid]) {
mutation DeletePeople($ids: [uuid!]) {
delete_people(where: { id: { _in: $ids } }) {
returning {
city
+6 -4
View File
@@ -4,7 +4,7 @@ import { SearchConfigType } from '../../../interfaces/search/interface';
import { AnyEntity } from '../../../interfaces/entities/generic.interface';
export const SEARCH_PEOPLE_QUERY = gql`
query SearchQuery($where: people_bool_exp, $limit: Int) {
query SearchPeopleQuery($where: people_bool_exp, $limit: Int) {
searchResults: people(where: $where, limit: $limit) {
id
phone
@@ -18,7 +18,7 @@ export const SEARCH_PEOPLE_QUERY = gql`
`;
export const SEARCH_USER_QUERY = gql`
query SearchQuery($where: users_bool_exp, $limit: Int) {
query SearchUserQuery($where: users_bool_exp, $limit: Int) {
searchResults: users(where: $where, limit: $limit) {
id
email
@@ -26,10 +26,12 @@ export const SEARCH_USER_QUERY = gql`
}
}
`;
// TODO: remove this query
export const EMPTY_QUERY = gql`
query EmptyQuery {
_
users {
id
}
}
`;