Hotchocolate does not appear to have mapped one of my models properly. I have this product search model:
public class ProductSearchResponseModel : ISearchResult<SimpleProductViewModel>
{
public string Identifier { get; set; }
public Dictionary<string, List<FacetModel>> Facets { get; set; }
public bool HasMoreResults { get; set; }
public long Total { get; set; }
public List<SimpleProductViewModel> Items { get; set; }
}
As you can see there, it has a FacetModel which looks like this:
public class FacetModel
{
public object Value { get; set; }
public object From { get; set; }
public object To { get; set; }
public long? Count { get; set; }
}
For some reason, this is not being mapped properly by hotchololate:
I have created a type and registered it like this:
public class FacetType: ObjectType<FacetModel>
{
}
public static void AddGraphQLServices(this IServiceCollection services)
{
services
.AddGraphQLServer()
.AddType<FacetType>()
.AddQueryType<Query>();
}
But if I look at the docs, it looks like this:
Does anyone know what is happening with this?