Added bodyshop querying before starting application. Basic job query and list view.
This commit is contained in:
@@ -1,65 +1,16 @@
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const QUERY_BODYSHOP = gql`
|
||||
subscription QUERY_BODYSHOP {
|
||||
query QUERY_BODYSHOP {
|
||||
bodyshops(where: { associations: { active: { _eq: true } } }) {
|
||||
associations {
|
||||
authlevel
|
||||
useremail
|
||||
user {
|
||||
authid
|
||||
email
|
||||
dashboardlayout
|
||||
employee {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
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
|
||||
scoreboard_target
|
||||
md_referral_sources
|
||||
md_messaging_presets
|
||||
intakechecklist
|
||||
speedprint
|
||||
md_parts_locations
|
||||
md_notes_presets
|
||||
md_rbac
|
||||
employees {
|
||||
id
|
||||
first_name
|
||||
last_name
|
||||
employee_number
|
||||
cost_center
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -8,7 +8,6 @@ import {
|
||||
from,
|
||||
} from "@apollo/client";
|
||||
import { setContext } from "@apollo/client/link/context";
|
||||
import apolloLogger from "apollo-link-logger";
|
||||
import { RetryLink } from "@apollo/client/link/retry";
|
||||
import { WebSocketLink } from "@apollo/client/link/ws";
|
||||
import { SubscriptionClient } from "subscriptions-transport-ws";
|
||||
@@ -116,17 +115,18 @@ const retryLink = new RetryLink({
|
||||
},
|
||||
});
|
||||
|
||||
const middlewares = [];
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
middlewares.push(apolloLogger);
|
||||
}
|
||||
// const middlewares = [];
|
||||
// if (process.env.NODE_ENV === "development") {
|
||||
// middlewares.push(apolloLogger);
|
||||
// }
|
||||
|
||||
middlewares.push(retryLink.concat(errorLink.concat(authLink.concat(link))));
|
||||
// middlewares.push(retryLink.concat(errorLink.concat(authLink.concat(link))));
|
||||
|
||||
const cache = new InMemoryCache({});
|
||||
|
||||
export const client = new ApolloClient({
|
||||
//link: ApolloLink.from(middlewares),
|
||||
//link: from([apolloLogger, errorLink, authLink, link]),
|
||||
link: from([authLink, link]),
|
||||
cache,
|
||||
// connectToDevTools: process.env.NODE_ENV !== "production",
|
||||
|
||||
Reference in New Issue
Block a user