You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"message": "Property 'eShop.Catalog.Models.ProductType Type' is not defined for type 'eShop.Catalog.Models.Brand' (Parameter 'property')"
What is expected?
Sorting by a nested member object property followed by a parent object property, and/or by properties from a nested member object works.
What is actually happening?
Sorting by a nested member object property followed by a parent object property, and/or by properties from a nested member object throws error.
However, if sorting by starts with the parent object property and followed by nested member object property, it works fine.
Example query:
query products {
products(order: { name: ASC type: {name: ASC} }) {
edges {
node {
id
name
productType {
id
name
}...
}
Relevant log output
at System.Linq.Expressions.Expression.Property(Expression expression, PropertyInfo property)\r\n at HotChocolate.Data.Sorting.SortingContext.SortDefinitionFormatter.Enter(ObjectFieldNode node, Context context)\r\n at HotChocolate.Language.Visitors.SyntaxWalker`1.Enter(ISyntaxNode node, TContext context)\r\n at HotChocolate.Language.Visitors.SyntaxVisitor`1.Visit[TNode,TParent](TNode node, TParent parent, TContext context)\r\n at HotChocolate.Language.Visitors.SyntaxVisitor`1.VisitChildren(ObjectValueNode node, TContext context)\r\n at HotChocolate.Language.Visitors.SyntaxVisitor`1.VisitChildren(ISyntaxNode node, TContext context)\r\n at HotChocolate.Language.Visitors.SyntaxVisitor`1.Visit[TNode,TParent](TNode node, TParent parent, TContext context)\r\n at HotChocolate.Language.Visitors.SyntaxVisitor`1.VisitChildren(ListValueNode node, TContext context)\r\n at HotChocolate.Language.Visitors.SyntaxVisitor`1.VisitChildren(ISyntaxNode node, TContext context)\r\n at HotChocolate.Language.Visitors.SyntaxVisitor`1.Visit[TNode,TParent](TNode node, TParent parent, TContext context)\r\n at HotChocolate.Language.Visitors.SyntaxVisitor`1.Visit(ISyntaxNode node, TContext context)\r\n at HotChocolate.Data.Sorting.SortingContext.SortDefinitionFormatter.Rewrite[T](IValueNode node, IType type, Expression parameter)\r\n at HotChocolate.Data.Sorting.SortingContext.AsSortDefinition[T]()\r\n at HotChocolate.Data.QueryContextParameterExpressionBuilder.CreateQueryContext[T](IResolverContext context)\r\n at lambda_method13(Closure, IResolverContext)\r\n at HotChocolate.Types.Helpers.FieldMiddlewareCompiler.<>c__DisplayClass9_0.<<CreateResolverMiddleware>b__0>d.MoveNext()\r\n--- End of stack trace from previous location ---\r\n at HotChocolate.Types.UnwrapFieldMiddlewareHelper.<>c__DisplayClass0_1.<<CreateDataMiddleware>b__1>d.MoveNext()\r\n--- End of stack trace from previous location ---\r\n at HotChocolate.Types.UnwrapFieldMiddlewareHelper.<>c__DisplayClass0_1.<<CreateDataMiddleware>b__1>d.MoveNext()\r\n--- End of stack trace from previous location ---\r\n at HotChocolate.Types.Pagination.PagingMiddleware.InvokeAsync(IMiddlewareContext context)\r\n at HotChocolate.Execution.Processing.Tasks.ResolverTask.ExecuteResolverPipelineAsync(CancellationToken cancellationToken)\r\n at HotChocolate.Execution.Processing.Tasks.ResolverTask.TryExecuteAsync(CancellationToken cancellationToken)
Additional context
The same issue is reproduceable in v15.1.2-p.1
The text was updated successfully, but these errors were encountered:
Product
Hot Chocolate
Version
15.1.1
Link to minimal reproduction
https://github.com/alvinm84/HC-005
Steps to reproduce
Example resolver:
Example query with nested property of a member object and a parent object's property:
Error message:
Example query with nested property from different member objects, also throws similar error:
Error message:
What is expected?
Sorting by a nested member object property followed by a parent object property, and/or by properties from a nested member object works.
What is actually happening?
Sorting by a nested member object property followed by a parent object property, and/or by properties from a nested member object throws error.
However, if sorting by starts with the parent object property and followed by nested member object property, it works fine.
Example query:
Relevant log output
Additional context
The same issue is reproduceable in v15.1.2-p.1
The text was updated successfully, but these errors were encountered: