traceTreeBuilder.d.ts 928 B

1234567891011121314151617181920212223242526
  1. import { GraphQLError, GraphQLResolveInfo } from 'graphql';
  2. import { Trace, google } from 'apollo-reporting-protobuf';
  3. import { Logger } from 'apollo-server-types';
  4. export declare class TraceTreeBuilder {
  5. private rootNode;
  6. private logger;
  7. trace: Trace;
  8. startHrTime?: [number, number];
  9. private stopped;
  10. private nodes;
  11. private readonly rewriteError?;
  12. constructor(options: {
  13. logger?: Logger;
  14. rewriteError?: (err: GraphQLError) => GraphQLError | null;
  15. });
  16. startTiming(): void;
  17. stopTiming(): void;
  18. willResolveField(info: GraphQLResolveInfo): () => void;
  19. didEncounterErrors(errors: readonly GraphQLError[]): void;
  20. private addProtobufError;
  21. private newNode;
  22. private ensureParentNode;
  23. private rewriteAndNormalizeError;
  24. }
  25. export declare function dateToProtoTimestamp(date: Date): google.protobuf.Timestamp;
  26. //# sourceMappingURL=traceTreeBuilder.d.ts.map