nest-profiler-graphql
Types and API of the GraphQL collector.
GraphQLCollectorModuleOptions
Options passed to GraphQLCollectorModule.forRoot() / forRootAsync().
Prop
Type
GraphQLInfo
GraphQL metadata attached to profile.entrypoint.data.graphql for every profiled GraphQL operation.
Prop
Type
GraphQLEntrypointData
Payload of the graphql entrypoint (profile.entrypoint.data). GraphQL runs over HTTP but is its own entrypoint kind, so this extends HttpRequestData with a guaranteed graphql. Registering GraphQLCollectorModule installs the graphql type (GRAPHQL_ENTRYPOINT_TYPE) via GRAPHQL_ENTRYPOINT_TYPE_DEF, giving operations their own list table, detail tab and an Operation filter above the GraphQL list.
Prop
Type
ProfilerFilterRequest
Request context passed to ignoreRequest predicates and pre-built filter functions. Matches the underlying Express / Fastify request without exposing framework-specific types.
Prop
Type
IContextAdapter
Interface to implement when profiling a non-HTTP protocol (gRPC, Kafka, WebSockets…). Register the implementation from your modules onModuleInitviaProfilerCoreService.registerContextAdapter()soProfilerInterceptor` picks it up.
Prop
Type
Pre-built filters
These are re-exported from @eleven-labs/nest-profiler-graphql and consumed via the ignoreRequest option of ProfilerModule.
ignoreGraphQLPlayground
const ignoreGraphQLPlayground: ProfilerRequestFilter;Skips GET /graphql requests that serve the Apollo Sandbox UI (Accept: text/html). These requests are browser page loads and carry no meaningful GraphQL data.
ignoreGraphQLIntrospection
const ignoreGraphQLIntrospection: ProfilerRequestFilter;Skips GraphQL introspection queries sent by the playground and other tooling to load the schema. Matches:
operationName === 'IntrospectionQuery'(all major clients), or- a POST body query containing
__schemaor__type(anonymous introspection).
combineFilters (from @eleven-labs/nest-profiler)
function combineFilters(...filters: ProfilerRequestFilter[]): ProfilerRequestFilter;Combines multiple filter predicates with an OR - the request is skipped when any filter returns true.
import { ProfilerModule, combineFilters } from '@eleven-labs/nest-profiler';
import {
ignoreGraphQLPlayground,
ignoreGraphQLIntrospection,
} from '@eleven-labs/nest-profiler-graphql';
ProfilerModule.forRoot({
ignoreRequest: combineFilters(ignoreGraphQLPlayground, ignoreGraphQLIntrospection),
});Public exports
import { GraphQLCollectorModule } from '@eleven-labs/nest-profiler-graphql';
import { GraphQLContextAdapter } from '@eleven-labs/nest-profiler-graphql';
import {
ignoreGraphQLPlayground,
ignoreGraphQLIntrospection,
} from '@eleven-labs/nest-profiler-graphql';
import type { GraphQLCollectorModuleOptions } from '@eleven-labs/nest-profiler-graphql';Drive the options from ConfigService (or any provider) with forRootAsync(), gated per environment with ConditionalModule (recommended). It resolves option values only — for the enabled flag and when to prefer forRoot, see Enabling and disabling the profiler.
Types used by the filters and adapter (ProfilerFilterRequest, ProfilerRequestFilter, IContextAdapter, GraphQLInfo, PROFILER_REQ_KEY, combineFilters) are exported from @eleven-labs/nest-profiler.