added queries
This commit is contained in:
52
graphql/timetickets.queries.js
Normal file
52
graphql/timetickets.queries.js
Normal file
@@ -0,0 +1,52 @@
|
||||
import gql from "graphql-tag";
|
||||
|
||||
|
||||
|
||||
export const INSERT_NEW_TIME_TICKET = gql`
|
||||
mutation INSERT_NEW_TIME_TICKET(
|
||||
$timeTicketInput: [timetickets_insert_input!]!
|
||||
) {
|
||||
insert_timetickets(objects: $timeTicketInput) {
|
||||
returning {
|
||||
id
|
||||
clockon
|
||||
clockoff
|
||||
employeeid
|
||||
productivehrs
|
||||
actualhrs
|
||||
ciecacode
|
||||
date
|
||||
memo
|
||||
flat_rate
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_TIME_TICKET = gql`
|
||||
mutation UPDATE_TIME_TICKET(
|
||||
$timeticketId: uuid!
|
||||
$timeticket: timetickets_set_input!
|
||||
) {
|
||||
update_timetickets(
|
||||
where: { id: { _eq: $timeticketId } }
|
||||
_set: $timeticket
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
clockon
|
||||
clockoff
|
||||
employeeid
|
||||
productivehrs
|
||||
actualhrs
|
||||
ciecacode
|
||||
created_at
|
||||
updated_at
|
||||
jobid
|
||||
date
|
||||
flat_rate
|
||||
memo
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
Reference in New Issue
Block a user