added queries

This commit is contained in:
jfrye122
2023-05-04 13:47:22 -04:00
parent 71d3b43f20
commit 61a74be0b0
3 changed files with 109 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
import gql from "graphql-tag";
export const QUERY_EMPLOYEES = gql`
query QUERY_EMPLOYEES {
employees(order_by: { employee_number: asc }) {
last_name
id
first_name
flat_rate
employee_number
}
}
`;
export const QUERY_EMPLOYEE_BY_ID = gql`
query QUERY_EMPLOYEE_BY_ID($id: uuid!) {
employees_by_pk(id: $id) {
last_name
id
first_name
employee_number
active
termination_date
hire_date
flat_rate
rates
pin
user_email
external_id
employee_vacations(order_by: { start: desc }) {
id
start
end
}
}
}
`;
export const QUERY_ACTIVE_EMPLOYEES = gql`
query QUERY_ACTIVE_EMPLOYEES {
employees(where: { active: { _eq: true } }) {
last_name
id
first_name
employee_number
active
termination_date
hire_date
flat_rate
rates
pin
user_email
}
}
`;