Images upload as resized images. Added location hash for jobs detail page.
This commit is contained in:
@@ -9,15 +9,12 @@ const errorLink = onError(
|
||||
console.log("networkError", networkError);
|
||||
console.log("operation", operation);
|
||||
console.log("forward", forward);
|
||||
if (graphQLErrors) {
|
||||
if (graphQLErrors[0]?.message.includes("JWTExpired") || networkError?.message.includes("JWTExpired")) {
|
||||
//User access token has expired
|
||||
console.log("graphQLErrors", graphQLErrors);
|
||||
}
|
||||
|
||||
if (networkError) {
|
||||
console.log(`[Network error]: ${networkError}`);
|
||||
//props.history.push("/network-error");
|
||||
if (networkError.message.includes("JWTExpired")) {
|
||||
if (networkError?.message?.includes("JWTExpired")) {
|
||||
console.log("Got to the error check.");
|
||||
if (access_token && access_token !== "undefined") {
|
||||
// Let's refresh token through async request
|
||||
|
||||
@@ -22,3 +22,11 @@ export const QUERY_BODYSHOP = gql`
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_SHOP_ID = gql`
|
||||
query QUERY_SHOP_ID {
|
||||
bodyshops(where: { associations: { active: { _eq: true } } }) {
|
||||
id
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
22
client/src/graphql/documents.queries.js
Normal file
22
client/src/graphql/documents.queries.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import { gql } from "apollo-boost";
|
||||
|
||||
export const GET_DOCUMENTS_BY_JOB = gql`
|
||||
query GET_DOCUMENTS_BY_JOB($jobId: uuid!) {
|
||||
documents(where: { jobid: { _eq: $jobId } }) {
|
||||
id
|
||||
url
|
||||
thumb_url
|
||||
name
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const INSERT_NEW_DOCUMENT = gql`
|
||||
mutation INSERT_NEW_DOCUMENT($docInput: [documents_insert_input!]!) {
|
||||
insert_ducments(objects: $docInput) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
Reference in New Issue
Block a user