@commercetools-frontend/application-shell-connectors
Version:
Contains complementary tools for @commercetools-frontend/application-shell
11 lines (10 loc) • 841 B
TypeScript
import type { ServerError, ServerParseError } from '@apollo/client';
import type { ErrorResponse } from '@apollo/client/link/error';
import type { GraphQLError } from 'graphql';
import type { TApolloContext } from '../utils/apollo-context';
declare const getSkipTokenRetry: (context: TApolloContext) => boolean;
declare const forwardTokenRetryHeader: (headers: TApolloContext['headers']) => TApolloContext['headers'];
declare const getDoesGraphQLTargetSupportTokenRetry: (context: TApolloContext) => boolean;
declare const isHttpError: (error: ErrorResponse['networkError']) => error is ServerParseError | ServerError;
declare const isGraphQLError: (error: ErrorResponse['graphQLErrors']) => error is GraphQLError[];
export { getSkipTokenRetry, forwardTokenRetryHeader, getDoesGraphQLTargetSupportTokenRetry, isHttpError, isGraphQLError, };