Open vojtechkacmarik opened 2 years ago
Currently I'm using MySQL as database engine using Pomelo.EntityFrameworkCore.MySql 6.0.1.
Also all properties are expanded in mapping configuration in Profile class.
CreateMap<Gateway, GatewayDto>()
.ForAllMembers(opt => opt.ExplicitExpansion());
Please take a look on it and give me a feedback if there is some missing registrations, for example some TypeConverter or Serializer for long IDs (maybe some conversion or database serialization from long to string (IdType). Probably there should be some QueryableProjectionScalarHandler for concrete type conversion (mapping), right?
It looks like a very similar issue like https://github.com/ChilliCream/hotchocolate/issues/5054
Is there an existing issue for this?
Describe the bug
I'm using HotChocolate and AutoMapper projections to provide DTOs from EF entities. (EF entity => DTO => GraphQL API object type). The EF entities have own IDs of type long, the same in DTOs
In the API layer I'm using Relay style (IDs) and Node approach as you can see below.
Services registrations is using Projections, AutoMapper and also GlobalObjectIdentification support. The rest of code omitted for brevity.
Also I have
[UseProjection]
on Query level and projections is done using extension methodProjectTo
But this approach doesn't work. I am getting error 'Property 'Int64 Id' is not defined for type 'System.Int64' Arg_ParamName_Name'. Not sure what is wrong.
Steps to reproduce
Relevant log output
Additional Context?
HotChocolate.Data.AutoMapper 12.9.0 AutoMapper.Extensions.Microsoft.DependencyInjection 11.0.0
Product
Hot Chocolate
Version
12.9.0