@PublicApi public class SimpleInstrumentation extends java.lang.Object implements Instrumentation
Instrumentation that does nothing. It can be used
as a base for derived classes where you only implement the methods you want to| Modifier and Type | Field and Description |
|---|---|
static SimpleInstrumentation |
INSTANCE
A singleton instance of a
Instrumentation that does nothing |
| Constructor and Description |
|---|
SimpleInstrumentation() |
| Modifier and Type | Method and Description |
|---|---|
DeferredFieldInstrumentationContext |
beginDeferredField(InstrumentationDeferredFieldParameters parameters)
This is called just before a deferred field is resolved into a value.
|
InstrumentationContext<ExecutionResult> |
beginExecuteOperation(InstrumentationExecuteOperationParameters parameters)
This is called just before the execution of the query operation is started.
|
InstrumentationContext<ExecutionResult> |
beginExecution(InstrumentationExecutionParameters parameters)
This is called right at the start of query execution and its the first step in the instrumentation chain.
|
ExecutionStrategyInstrumentationContext |
beginExecutionStrategy(InstrumentationExecutionStrategyParameters parameters)
This is called each time an
ExecutionStrategy is invoked, which may be multiple times
per query as the engine recursively descends down over the query. |
InstrumentationContext<ExecutionResult> |
beginField(InstrumentationFieldParameters parameters)
This is called just before a field is resolved into a value.
|
InstrumentationContext<ExecutionResult> |
beginFieldComplete(InstrumentationFieldCompleteParameters parameters)
This is called just before the complete field is started.
|
InstrumentationContext<java.lang.Object> |
beginFieldFetch(InstrumentationFieldFetchParameters parameters)
This is called just before a field
DataFetcher is invoked. |
InstrumentationContext<ExecutionResult> |
beginFieldListComplete(InstrumentationFieldCompleteParameters parameters)
This is called just before the complete field list is started.
|
InstrumentationContext<Document> |
beginParse(InstrumentationExecutionParameters parameters)
This is called just before a query is parsed.
|
InstrumentationContext<java.util.List<ValidationError>> |
beginValidation(InstrumentationValidationParameters parameters)
This is called just before the parsed query document is validated.
|
InstrumentationState |
createState()
This will be called just before execution to create an object that is given back to all instrumentation methods
to allow them to have per execution request state
|
DataFetcher<?> |
instrumentDataFetcher(DataFetcher<?> dataFetcher,
InstrumentationFieldFetchParameters parameters)
This is called to instrument a
DataFetcher just before it is used to fetch a field, allowing you
to adjust what information is passed back or record information about specific data fetches. |
ExecutionContext |
instrumentExecutionContext(ExecutionContext executionContext,
InstrumentationExecutionParameters parameters)
This is called to instrument a
ExecutionContext before it is used to execute a query,
allowing you to adjust the base data used. |
java.util.concurrent.CompletableFuture<ExecutionResult> |
instrumentExecutionResult(ExecutionResult executionResult,
InstrumentationExecutionParameters parameters)
This is called to allow instrumentation to instrument the execution result in some way
|
GraphQLSchema |
instrumentSchema(GraphQLSchema schema,
InstrumentationExecutionParameters parameters)
This is called to instrument a
GraphQLSchema before it is used to parse, validate
and execute a query, allowing you to adjust what types are used. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateState, instrumentExecutionInputpublic static final SimpleInstrumentation INSTANCE
Instrumentation that does nothingpublic InstrumentationState createState()
InstrumentationcreateState in interface Instrumentationpublic InstrumentationContext<ExecutionResult> beginExecution(InstrumentationExecutionParameters parameters)
InstrumentationbeginExecution in interface Instrumentationparameters - the parameters to this stepInstrumentationContext object that will be called back when the step endspublic InstrumentationContext<Document> beginParse(InstrumentationExecutionParameters parameters)
InstrumentationbeginParse in interface Instrumentationparameters - the parameters to this stepInstrumentationContext object that will be called back when the step endspublic InstrumentationContext<java.util.List<ValidationError>> beginValidation(InstrumentationValidationParameters parameters)
InstrumentationbeginValidation in interface Instrumentationparameters - the parameters to this stepInstrumentationContext object that will be called back when the step endspublic ExecutionStrategyInstrumentationContext beginExecutionStrategy(InstrumentationExecutionStrategyParameters parameters)
InstrumentationExecutionStrategy is invoked, which may be multiple times
per query as the engine recursively descends down over the query.beginExecutionStrategy in interface Instrumentationparameters - the parameters to this stepInstrumentationContext object that will be called back when the step endspublic DeferredFieldInstrumentationContext beginDeferredField(InstrumentationDeferredFieldParameters parameters)
InstrumentationbeginDeferredField in interface Instrumentationparameters - the parameters to this stepInstrumentationContext object that will be called back when the step endspublic InstrumentationContext<ExecutionResult> beginExecuteOperation(InstrumentationExecuteOperationParameters parameters)
InstrumentationbeginExecuteOperation in interface Instrumentationparameters - the parameters to this stepInstrumentationContext object that will be called back when the step endspublic InstrumentationContext<ExecutionResult> beginField(InstrumentationFieldParameters parameters)
InstrumentationbeginField in interface Instrumentationparameters - the parameters to this stepInstrumentationContext object that will be called back when the step endspublic InstrumentationContext<java.lang.Object> beginFieldFetch(InstrumentationFieldFetchParameters parameters)
InstrumentationDataFetcher is invoked.beginFieldFetch in interface Instrumentationparameters - the parameters to this stepInstrumentationContext object that will be called back when the step endspublic InstrumentationContext<ExecutionResult> beginFieldComplete(InstrumentationFieldCompleteParameters parameters)
InstrumentationbeginFieldComplete in interface Instrumentationparameters - the parameters to this stepInstrumentationContext object that will be called back when the step endspublic InstrumentationContext<ExecutionResult> beginFieldListComplete(InstrumentationFieldCompleteParameters parameters)
InstrumentationbeginFieldListComplete in interface Instrumentationparameters - the parameters to this stepInstrumentationContext object that will be called back when the step endspublic GraphQLSchema instrumentSchema(GraphQLSchema schema, InstrumentationExecutionParameters parameters)
InstrumentationGraphQLSchema before it is used to parse, validate
and execute a query, allowing you to adjust what types are used.instrumentSchema in interface Instrumentationschema - the schema to be usedparameters - the parameters describing the field to be fetchedpublic ExecutionContext instrumentExecutionContext(ExecutionContext executionContext, InstrumentationExecutionParameters parameters)
InstrumentationExecutionContext before it is used to execute a query,
allowing you to adjust the base data used.instrumentExecutionContext in interface InstrumentationexecutionContext - the execution context to be usedparameters - the parameters describing the field to be fetchedpublic DataFetcher<?> instrumentDataFetcher(DataFetcher<?> dataFetcher, InstrumentationFieldFetchParameters parameters)
InstrumentationDataFetcher just before it is used to fetch a field, allowing you
to adjust what information is passed back or record information about specific data fetches. Note
the same data fetcher instance maybe presented to you many times and that data fetcher
implementations widely vary.instrumentDataFetcher in interface InstrumentationdataFetcher - the data fetcher about to be usedparameters - the parameters describing the field to be fetchedpublic java.util.concurrent.CompletableFuture<ExecutionResult> instrumentExecutionResult(ExecutionResult executionResult, InstrumentationExecutionParameters parameters)
InstrumentationinstrumentExecutionResult in interface InstrumentationexecutionResult - CompletableFuture of the result to instrumentparameters - the parameters to this step