BOD-17 Basic creation of a contract functioning.
This commit is contained in:
11
client/src/graphql/cccontracts.queries.js
Normal file
11
client/src/graphql/cccontracts.queries.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import { gql } from "apollo-boost";
|
||||
|
||||
export const INSERT_NEW_CONTRACT = gql`
|
||||
mutation INSERT_NEW_CONTRACT($contract: [cccontracts_insert_input!]!) {
|
||||
insert_cccontracts(objects: $contract) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -12,6 +12,24 @@ export const INSERT_NEW_COURTESY_CAR = gql`
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_AVAILABLE_CC = gql`
|
||||
query QUERY_AVAILABLE_CC {
|
||||
courtesycars(where: {serviceenddate: {_is_null: true}}) {
|
||||
color
|
||||
dailycost
|
||||
damage
|
||||
fleetnumber
|
||||
fuel
|
||||
id
|
||||
make
|
||||
model
|
||||
plate
|
||||
status
|
||||
year
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_ALL_CC = gql`
|
||||
query QUERY_ALL_CC {
|
||||
courtesycars {
|
||||
|
||||
Reference in New Issue
Block a user