Finish the majority of work on vendors page to add/delete/edit.
This commit is contained in:
@@ -24,9 +24,9 @@ export const QUERY_VENDOR_BY_ID = gql`
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_VEHICLE = gql`
|
||||
mutation UPDATE_VEHICLE($vehId: uuid!, $vehicle: vehicles_set_input!) {
|
||||
update_vehicles(where: { id: { _eq: $vehId } }, _set: $vehicle) {
|
||||
export const UPDATE_VENDOR = gql`
|
||||
mutation UPDATE_VENDOR($id: uuid!, $vendor: vendors_set_input!) {
|
||||
update_vendors(where: { id: { _eq: $id } }, _set: $vendor) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
@@ -46,3 +46,23 @@ export const QUERY_ALL_VENDORS = gql`
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const INSERT_NEW_VENDOR = gql`
|
||||
mutation INSERT_NEW_VENDOR($vendorInput: [vendors_insert_input!]!) {
|
||||
insert_vendors(objects: $vendorInput) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const DELETE_VENDOR = gql`
|
||||
mutation DELETE_VENDOR($id: uuid!) {
|
||||
delete_vendors(where: { id: { _eq: $id } }) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user