Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relay Guid Identifier Unable to convert type from Object to Guid #7110

Open
PHILLIPS71 opened this issue May 20, 2024 · 2 comments
Open

Relay Guid Identifier Unable to convert type from Object to Guid #7110

PHILLIPS71 opened this issue May 20, 2024 · 2 comments
Assignees
Labels
🐛 bug Something isn't working 🌶️ hot chocolate Next Next up on the backlog. repro-validated
Milestone

Comments

@PHILLIPS71
Copy link
Contributor

PHILLIPS71 commented May 20, 2024

Product

Hot Chocolate

Version

14.0.0-p.100

Link to minimal reproduction

https://github.com/PHILLIPS71/HC-7110

Steps to reproduce

I've previously used Guid identifiers in relay without any issues, though after upgrading to version 14 it doesn't seem to work anymore.

What is expected?

The relay identifiers can be converted into a GUID

What is actually happening?

{
  library(where: { id: { eq: "TGlicmFyeTq+UuauxXXqSp5/h9rbTMR0" } }) {
    id
    name
    slug
  }
}
{
  "errors": [
    {
      "message": "Unexpected Execution Error",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "library"
      ],
      "extensions": {
        "message": "Unable to convert type from `Object` to `Guid`",
        "stackTrace": "   at HotChocolate.Utilities.DefaultTypeConverter.Convert(Type from, Type to, Object source)\r\n   at HotChocolate.Data.Filters.Expressions.QueryableComparableOperationHandler.ParseValue(IValueNode node, Object parsedValue, IType type, QueryableFilterContext context)\r\n   at HotChocolate.Data.Filters.Expressions.QueryableComparableEqualsHandler.HandleOperation(QueryableFilterContext context, IFilterOperationField field, IValueNode value, Object parsedValue)\r\n   at HotChocolate.Data.Filters.Expressions.QueryableOperationHandlerBase.TryHandleOperation(QueryableFilterContext context, IFilterOperationField field, ObjectFieldNode node, Expression& result)\r\n   at HotChocolate.Data.Filters.FilterOperationHandler`2.TryHandleEnter(TContext context, IFilterField field, ObjectFieldNode node, ISyntaxVisitorAction& action)\r\n   at HotChocolate.Data.Filters.FilterVisitor`2.OnFieldEnter(TContext context, IFilterField field, ObjectFieldNode node)\r\n   at HotChocolate.Data.Filters.FilterVisitorBase`2.Enter(ObjectFieldNode node, TContext 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(ObjectFieldNode 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(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.Visit(ISyntaxNode node, TContext context)\r\n   at HotChocolate.Data.Filters.Expressions.QueryableFilterProvider.<ConfigureField>g__VisitFilterArgumentExecutor|11_0(IValueNode valueNode, IFilterInputType filterInput, Boolean inMemory)\r\n   at HotChocolate.Data.Filters.Expressions.QueryableFilterProvider.<>c__DisplayClass15_0`1.<CreateApplicator>b__0(IResolverContext context, Object input)\r\n   at HotChocolate.Data.Filters.Expressions.QueryableFilterProvider.QueryableQueryBuilder.Apply(IMiddlewareContext context)\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.Data.Projections.FirstOrDefaultMiddleware`1.InvokeAsync(IMiddlewareContext context)\r\n   at HotChocolate.Utilities.MiddlewareCompiler`1.ExpressionHelper.AwaitTaskHelper(Task task)\r\n   at HotChocolate.Execution.Processing.Tasks.ResolverTask.ExecuteResolverPipelineAsync(CancellationToken cancellationToken)\r\n   at HotChocolate.Execution.Processing.Tasks.ResolverTask.TryExecuteAsync(CancellationToken cancellationToken)"
      }
    }
  ],
  "data": {
    "library": null
  }
}

Relevant log output

No response

Additional context

If you decode TGlicmFyeTq+UuauxXXqSp5/h9rbTMR0 it looks invalid (Library:RuJ�Lt)

@PHILLIPS71 PHILLIPS71 added the 🐛 bug Something isn't working label May 20, 2024
@michaelstaib michaelstaib added the Next Next up on the backlog. label May 28, 2024
@michaelstaib michaelstaib added this to the HC-14.0.0 milestone May 28, 2024
@michaelstaib
Copy link
Member

Thanks for the repro ... we will have a look at this.

@Hanskrogh
Copy link

Is there any status on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 🌶️ hot chocolate Next Next up on the backlog. repro-validated
Projects
None yet
Development

No branches or pull requests

3 participants