feature/IO-3497-Ant-Design-v5-to-v6 - Signed off Files (Checkpoint)
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import { onError } from "@apollo/client/link/error";
|
||||
//https://stackoverflow.com/questions/57163454/refreshing-a-token-with-apollo-client-firebase-auth
|
||||
|
||||
const errorLink = onError(({ graphQLErrors, networkError, operation, forward }) => {
|
||||
if (graphQLErrors) {
|
||||
graphQLErrors.forEach(({ message, locations, path }) => {
|
||||
const errorLink = onError(({ error, operation, forward }) => {
|
||||
if (error?.graphQLErrors) {
|
||||
error.graphQLErrors.forEach(({ message, locations, path }) => {
|
||||
console.log(`[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`);
|
||||
});
|
||||
}
|
||||
if (networkError) console.log(`[Network error]: ${JSON.stringify(networkError)}`);
|
||||
if (error?.networkError) console.log(`[Network error]: ${JSON.stringify(error.networkError)}`);
|
||||
console.log(operation.getContext());
|
||||
return forward(operation);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user