11package graphql .execution .instrumentation ;
22
3+ import graphql .ExecutionInput ;
34import graphql .ExecutionResult ;
45import graphql .execution .ExecutionContext ;
56import graphql .execution .instrumentation .parameters .InstrumentationDataFetchParameters ;
@@ -171,14 +172,27 @@ default InstrumentationContext<CompletableFuture<ExecutionResult>> beginComplete
171172 };
172173 }
173174
175+ /**
176+ * This is called to instrument a {@link graphql.ExecutionInput} before it is used to parse, validate
177+ * and execute a query, allowing you to adjust what query input parameters are used
178+ *
179+ * @param executionInput the execution input to be used
180+ * @param parameters the parameters describing the field to be fetched
181+ *
182+ * @return a non null instrumented ExecutionInput, the default is to return to the same object
183+ */
184+ default ExecutionInput instrumentExecutionInput (ExecutionInput executionInput , InstrumentationExecutionParameters parameters ) {
185+ return executionInput ;
186+ }
187+
174188 /**
175189 * This is called to instrument a {@link graphql.schema.GraphQLSchema} before it is used to parse, validate
176190 * and execute a query, allowing you to adjust what types are used.
177191 *
178192 * @param schema the schema to be used
179193 * @param parameters the parameters describing the field to be fetched
180194 *
181- * @return a non null instrumented data fetcher , the default is to return to the same object
195+ * @return a non null instrumented GraphQLSchema , the default is to return to the same object
182196 */
183197 default GraphQLSchema instrumentSchema (GraphQLSchema schema , InstrumentationExecutionParameters parameters ) {
184198 return schema ;
@@ -191,7 +205,7 @@ default GraphQLSchema instrumentSchema(GraphQLSchema schema, InstrumentationExec
191205 * @param executionContext the execution context to be used
192206 * @param parameters the parameters describing the field to be fetched
193207 *
194- * @return a non null instrumented data fetcher , the default is to return to the same object
208+ * @return a non null instrumented ExecutionContext , the default is to return to the same object
195209 */
196210 default ExecutionContext instrumentExecutionContext (ExecutionContext executionContext , InstrumentationExecutionParameters parameters ) {
197211 return executionContext ;
@@ -207,7 +221,7 @@ default ExecutionContext instrumentExecutionContext(ExecutionContext executionCo
207221 * @param dataFetcher the data fetcher about to be used
208222 * @param parameters the parameters describing the field to be fetched
209223 *
210- * @return a non null instrumented data fetcher , the default is to return to the same object
224+ * @return a non null instrumented DataFetcher , the default is to return to the same object
211225 */
212226 default DataFetcher <?> instrumentDataFetcher (DataFetcher <?> dataFetcher , InstrumentationFieldFetchParameters parameters ) {
213227 return dataFetcher ;
0 commit comments