Interface ApolloServerPluginInlineTraceOptions

This plugin is based on the ApolloServerPluginInlineTrace plugin from apollo-server-core.

see: https://www.apollographql.com/docs/apollo-server/v3/api/plugin/inline-trace

The original generates a base64'd Trace protobuf, and only displays the start and end times and not the indvidual durations.

This plugin is a modified version of the original, and it generates a json object with the duration in milliseconds.

Hierarchy

  • ApolloServerPluginInlineTraceOptions

Properties

__onlyIfSchemaIsFederated?: boolean

This option is for internal use by apollo-server-core only.

By default we want to enable this plugin for federated schemas only, but we need to come up with our list of plugins before we have necessarily loaded the schema. So (unless the user installs this plugin or ApolloServerPluginInlineTraceDisabled themselves), apollo-server-core always installs this plugin and uses this option to make sure traces are only included if the schema appears to be federated.

rewriteError?: ((err: GraphQLError) => null | GraphQLError)

Type declaration

    • (err: GraphQLError): null | GraphQLError
    • By default, all errors from this service get included in the trace. You can specify a filter function to exclude specific errors from being reported by returning an explicit null, or you can mask certain details of the error by modifying it and returning the modified error.

      Parameters

      • err: GraphQLError

      Returns null | GraphQLError

Generated using TypeDoc