import type { Observable } from '@apollo/client'; import { ApolloLink } from '@apollo/client'; import type { FetchResult, NextLink, Operation } from '@apollo/client/core'; import type { GraphQLErrors, NetworkError } from '@apollo/client/errors'; import type { ExecutionResult } from 'graphql'; export interface ErrorResponse { graphQLErrors?: GraphQLErrors; networkError?: NetworkError; response?: ExecutionResult; operation: Operation; forward: NextLink; } export type ErrorHandler = (error: ErrorResponse) => Observable | null; export declare function onTrack(): ApolloLink; /** * GraphQL接口调用追踪的自定义link */ export declare class CallLink extends ApolloLink { private link; constructor(); request(operation: Operation, forward: NextLink): Observable | null; }