Interface Instrumentation

All Known Implementing Classes:
ChainedInstrumentation, FieldValidationInstrumentation, MaxQueryComplexityInstrumentation, MaxQueryDepthInstrumentation, NoContextChainedInstrumentation, SimpleInstrumentation, SimplePerformantInstrumentation, TracingInstrumentation

@PublicSpi public interface Instrumentation
Provides the capability to instrument the execution steps of a GraphQL query.

For example you might want to track which fields are taking the most time to fetch from the backing database or log what fields are being asked for.

Remember that graphql calls can cross threads so make sure you think about the thread safety of any instrumentation code when you are writing it.

Each step gives back an InstrumentationContext object. This has two callbacks on it, one for the step is `dispatched` and one for when the step has `completed`. This is done because many of the "steps" are asynchronous operations such as fetching data and resolving it into objects.