1 | import { GraphQLResolveInfo } from "graphql";
|
2 | declare type HighResolutionTime = [number, number];
|
3 | declare const traceHRStartTime: unique symbol;
|
4 | declare const traceWallStartTime: unique symbol;
|
5 | export declare const apolloTracingContext: unique symbol;
|
6 | export interface ApolloTracingContext {
|
7 | [traceHRStartTime]: HighResolutionTime;
|
8 | [traceWallStartTime]: Date;
|
9 | version: 1;
|
10 | startTime: string;
|
11 | endTime: string;
|
12 | duration: number;
|
13 | execution: {
|
14 | parsing?: {
|
15 | startOffset: number;
|
16 | duration: number;
|
17 | };
|
18 | validation?: {
|
19 | startOffset: number;
|
20 | duration: number;
|
21 | };
|
22 | resolvers: ApolloTracingResolverStats[];
|
23 | };
|
24 | }
|
25 | export interface ApolloTracingResolverStats {
|
26 | path: (string | number)[];
|
27 | parentType: string;
|
28 | fieldName: string;
|
29 | returnType: string;
|
30 | startOffset: number;
|
31 | duration: number;
|
32 | }
|
33 | export declare function apolloTracingGraphQLMiddleware(resolve: Function, parent: any, args: any, context: {
|
34 | [apolloTracingContext]: ApolloTracingContext;
|
35 | }, info: GraphQLResolveInfo): Promise<any>;
|
36 | export declare function startTracingContext(): ApolloTracingContext;
|
37 | export declare function endTracingContext(context: ApolloTracingContext): void;
|
38 | export {};
|