Minor adjustments and fixes

This commit is contained in:
Patrick Fic
2020-02-19 13:26:50 -08:00
parent 0b47fb166e
commit faed2c32b6
10 changed files with 95 additions and 52 deletions

View File

@@ -33,13 +33,14 @@ const errorLink = onError(
console.log("Got the new token.", token);
window.localStorage.setItem("token", token);
// const oldHeaders = operation.getContext().headers;
// operation.setContext({
// headers: {
// ...oldHeaders,
// authorization: token ? `Bearer ${token}` : ""
// }
// });
const oldHeaders = operation.getContext().headers;
operation.setContext({
headers: {
...oldHeaders,
authorization: token ? `Bearer ${token}` : ""
}
});
console.log(operation.getContext());
// console.log("forward", forward);
// console.log("operation", operation);
return forward(operation);

View File

@@ -44,7 +44,6 @@ export const QUERY_ALL_OPEN_JOBS = gql`
scheduled_delivery
status
updated_at
clm_total
ded_amt
vehicle {
id
@@ -108,6 +107,7 @@ export const GET_JOB_BY_PK = gql`
converted
est_number
ro_number
clm_total
vehicle {
id
plate_no