apollo-link-performance
Version:
Easily log and report on the performance of your GraphQL queries.
10 lines (8 loc) • 437 B
TypeScript
import { ApolloLink, type Operation } from '@apollo/client'
export declare const performanceLink: (options?: {
debug?: boolean
targetDuration?: number
verbose?: boolean
onRequestStart?: ({ operation, startTime }: { operation: Operation, startTime: number }) => void
onRequestComplete?: ({ data, dataSize, duration, operation }: { data: any, dataSize: number, duration: number, operation: Operation }) => void
}) => ApolloLink