Files
bodyshop/client/src/graphql/bodyshop.queries.js
2020-06-24 11:20:27 -07:00

112 lines
2.1 KiB
JavaScript

import gql from "graphql-tag";
export const QUERY_BODYSHOP = gql`
query QUERY_BODYSHOP {
bodyshops(where: { associations: { active: { _eq: true } } }) {
address1
address2
city
country
created_at
email
federal_tax_id
id
insurance_vendor_id
logo_img_path
md_ro_statuses
md_order_statuses
shopname
state
state_tax_id
updated_at
zip_post
shoprates
region_config
md_responsibility_centers
messagingservicesid
template_header
textid
production_config
invoice_tax_rates
inhousevendorid
accountingconfig
appt_length
stripe_acct_id
ssbuckets
employees {
id
first_name
last_name
employee_number
cost_center
}
}
}
`;
export const QUERY_SHOP_ID = gql`
query QUERY_SHOP_ID {
bodyshops(where: { associations: { active: { _eq: true } } }) {
id
}
}
`;
export const UPDATE_SHOP = gql`
mutation UPDATE_SHOP($id: uuid, $shop: bodyshops_set_input!) {
update_bodyshops(where: { id: { _eq: $id } }, _set: $shop) {
returning {
address1
address2
city
country
created_at
email
federal_tax_id
id
insurance_vendor_id
logo_img_path
md_ro_statuses
md_order_statuses
shopname
state
state_tax_id
updated_at
zip_post
shoprates
region_config
md_responsibility_centers
messagingservicesid
template_header
textid
production_config
invoice_tax_rates
appt_length
stripe_acct_id
employees {
id
first_name
last_name
employee_number
cost_center
}
}
}
}
`;
export const QUERY_INTAKE_CHECKLIST = gql`
query QUERY_INTAKE_CHECKLIST($shopId: uuid!) {
bodyshops_by_pk(id: $shopId) {
id
intakechecklist
}
}
`;
export const QUERY_STRIPE_ID = gql`
query QUERY_STRIPE_ID {
bodyshops {
stripe_acct_id
}
}
`;