-
-
Notifications
You must be signed in to change notification settings - Fork 789
Open
Labels
Area: FusionIssue is related to Hot Chocolate FusionIssue is related to Hot Chocolate Fusion๐ถ๏ธ hot chocolate
Description
Is there an existing issue for this?
- I have searched the existing issues
Product
Hot Chocolate
Describe the bug
Fusion will try to resolve data from the first subgraph that has all (or the most of) the requested data in its schema, regardless of whether that subgraph has a top-level resolver for the type in question.
This leads to an error during execution plan creation.
It appears that the query plan generator iterates over all subgraphs in order, i.e. alphabetically, meaning the names of the subgraphs impact the reproducability of this issue.
Steps to reproduce
- Set up a Fusion gateway server with the attached gateway package.
gateway.fgp.zip - Start the gateway server.
- Send the query
query { foos { id name nameReversed } }
to the gateway. - Confirm that the gateway is able to create a query plan fetching additional data from Subgraph3.
- Now send the query
query { foos { id name } }
to the gateway. - Notice that the gateway is not able to create a query plan.
Relevant log output
{
"errors": [
{
"message": "Unexpected Execution Error",
"extensions": {
"message": "There must be a field resolver definition in this context!",
"stackTrace": " at HotChocolate.Fusion.Planning.Pipeline.ExecutionStepDiscoveryMiddleware.CreateExecutionSteps(QueryPlanContext context, Queue`1 backlog, ObjectTypeMetadata selectionSetTypeMetadata, IReadOnlyList`1 selections, ISelection parentSelection, SelectionPath parentSelectionPath, Boolean preferBatching)\r\n at HotChocolate.Fusion.Planning.Pipeline.ExecutionStepDiscoveryMiddleware.Invoke(QueryPlanContext context, QueryPlanDelegate next)\r\n at HotChocolate.Fusion.Planning.QueryPlanPipelineBuilder.<>c__DisplayClass5_1`1.<Use>b__1(QueryPlanContext context)\r\n at HotChocolate.Fusion.Planning.QueryPlanner.Plan(IOperation operation)\r\n at HotChocolate.Fusion.Execution.Pipeline.OperationQueryPlanCompiler.OptimizeOperation(OperationOptimizerContext context)\r\n at HotChocolate.Execution.Processing.OperationCompiler.CreateOperation(String operationId, OperationDefinitionNode operationDefinition, ObjectType operationType, DocumentNode document, ISchema schema)\r\n at HotChocolate.Execution.Processing.OperationCompiler.Compile(String operationId, OperationDefinitionNode operationDefinition, ObjectType operationType, DocumentNode document, ISchema schema, IReadOnlyList`1 optimizers, Boolean enableNullBubbling)\r\n at HotChocolate.Execution.Pipeline.OperationResolverMiddleware.CompileOperation(IRequestContext context, String operationId, OperationDefinitionNode operationDefinition, ObjectType operationType)\r\n at HotChocolate.Execution.Pipeline.OperationResolverMiddleware.InvokeAsync(IRequestContext context)\r\n at HotChocolate.Execution.Pipeline.OperationComplexityMiddleware.InvokeAsync(IRequestContext context)\r\n at HotChocolate.Execution.Pipeline.OperationCacheMiddleware.InvokeAsync(IRequestContext context)\r\n at HotChocolate.Execution.Pipeline.DocumentValidationMiddleware.InvokeAsync(IRequestContext context)\r\n at HotChocolate.Execution.Pipeline.DocumentParserMiddleware.InvokeAsync(IRequestContext context)\r\n at HotChocolate.Execution.Pipeline.DocumentCacheMiddleware.InvokeAsync(IRequestContext context)\r\n at HotChocolate.Execution.Pipeline.TimeoutMiddleware.InvokeAsync(IRequestContext context)\r\n at HotChocolate.Execution.Pipeline.ExceptionMiddleware.InvokeAsync(IRequestContext context)"
}
}
]
}
Additional Context?
No response
Version
13.7.0
bbrandt and dawust
Metadata
Metadata
Assignees
Labels
Area: FusionIssue is related to Hot Chocolate FusionIssue is related to Hot Chocolate Fusion๐ถ๏ธ hot chocolate