1 | import { GraphQLError, DocumentNode } from 'graphql';
|
2 | import { GraphQLRequestContextDidResolveOperation, Logger, GraphQLRequestContext, GraphQLRequestContextWillSendResponse } from 'apollo-server-types';
|
3 | import type { fetch, RequestAgent } from 'apollo-server-env';
|
4 | import type { Trace } from 'apollo-reporting-protobuf';
|
5 | export interface ApolloServerPluginUsageReportingOptions<TContext> {
|
6 | sendVariableValues?: VariableValueOptions;
|
7 | sendHeaders?: SendValuesBaseOptions;
|
8 | rewriteError?: (err: GraphQLError) => GraphQLError | null;
|
9 | includeRequest?: (request: GraphQLRequestContextDidResolveOperation<TContext> | GraphQLRequestContextWillSendResponse<TContext>) => Promise<boolean>;
|
10 | generateClientInfo?: GenerateClientInfo<TContext>;
|
11 | overrideReportedSchema?: string;
|
12 | sendUnexecutableOperationDocuments?: boolean;
|
13 | experimental_sendOperationAsTrace?: (trace: Trace, statsReportKey: string) => boolean;
|
14 | sendReportsImmediately?: boolean;
|
15 | requestAgent?: RequestAgent | false;
|
16 | fetcher?: typeof fetch;
|
17 | reportIntervalMs?: number;
|
18 | maxUncompressedReportSize?: number;
|
19 | maxAttempts?: number;
|
20 | minimumRetryDelayMs?: number;
|
21 | logger?: Logger;
|
22 | reportErrorFunction?: (err: Error) => void;
|
23 | endpointUrl?: string;
|
24 | debugPrintReports?: boolean;
|
25 | calculateSignature?: (ast: DocumentNode, operationName: string) => string;
|
26 | internal_includeTracesContributingToStats?: boolean;
|
27 | }
|
28 | export declare type SendValuesBaseOptions = {
|
29 | onlyNames: Array<String>;
|
30 | } | {
|
31 | exceptNames: Array<String>;
|
32 | } | {
|
33 | all: true;
|
34 | } | {
|
35 | none: true;
|
36 | };
|
37 | declare type VariableValueTransformOptions = {
|
38 | variables: Record<string, any>;
|
39 | operationString?: string;
|
40 | };
|
41 | export declare type VariableValueOptions = {
|
42 | transform: (options: VariableValueTransformOptions) => Record<string, any>;
|
43 | } | SendValuesBaseOptions;
|
44 | export interface ClientInfo {
|
45 | clientName?: string;
|
46 | clientVersion?: string;
|
47 | clientReferenceId?: string;
|
48 | }
|
49 | export declare type GenerateClientInfo<TContext> = (requestContext: GraphQLRequestContext<TContext>) => ClientInfo;
|
50 | export {};
|
51 |
|
\ | No newline at end of file |