|
14 | 14 | import graphql.execution.incremental.IncrementalCallState; |
15 | 15 | import graphql.execution.instrumentation.Instrumentation; |
16 | 16 | import graphql.execution.instrumentation.InstrumentationState; |
| 17 | +import graphql.execution.instrumentation.parameters.InstrumentationParseExecutableNormalizedOperation; |
17 | 18 | import graphql.language.Document; |
18 | 19 | import graphql.language.FragmentDefinition; |
19 | 20 | import graphql.language.OperationDefinition; |
@@ -100,7 +101,7 @@ public class ExecutionContext { |
100 | 101 | this.localContext = builder.localContext; |
101 | 102 | this.executionInput = builder.executionInput; |
102 | 103 | this.dataLoaderDispatcherStrategy = builder.dataLoaderDispatcherStrategy; |
103 | | - this.queryTree = FpKit.interThreadMemoize(() -> ExecutableNormalizedOperationFactory.createExecutableNormalizedOperation(graphQLSchema, operationDefinition, fragmentsByName, coercedVariables)); |
| 104 | + this.queryTree = FpKit.interThreadMemoize(this::createExecutableNormalizedOperation); |
104 | 105 | this.propagateErrorsOnNonNullContractFailure = builder.propagateErrorsOnNonNullContractFailure; |
105 | 106 | this.engineRunningState = builder.engineRunningState; |
106 | 107 | } |
@@ -368,6 +369,15 @@ public ResultNodesInfo getResultNodesInfo() { |
368 | 369 | return resultNodesInfo; |
369 | 370 | } |
370 | 371 |
|
| 372 | + private ExecutableNormalizedOperation createExecutableNormalizedOperation() { |
| 373 | + var instrument = instrumentation.beginParseExecutableNormalizedOperation(new InstrumentationParseExecutableNormalizedOperation(executionInput, graphQLSchema), instrumentationState); |
| 374 | + var result = ExecutableNormalizedOperationFactory.createExecutableNormalizedOperation(graphQLSchema, operationDefinition, fragmentsByName, coercedVariables); |
| 375 | + if (instrument != null) { |
| 376 | + instrument.onCompleted(result, null); |
| 377 | + } |
| 378 | + return result; |
| 379 | + } |
| 380 | + |
371 | 381 | @Internal |
372 | 382 | public boolean hasIncrementalSupport() { |
373 | 383 | GraphQLContext graphqlContext = getGraphQLContext(); |
|
0 commit comments