In HotChocolate I have a query type like so
// QueryType.cs
public Task<ContentCategory> FilterContentAsync(string categoryCode, ICollection<Filter> filters, CancellationToken cancellationToken = default)
=> ...;
// Filter.cs
public abstract class Filter
{
public string Type { get;set; }
}
// BooleanFilter.cs
public class BooleanFilter : Filter
{
public bool IsTrue { get; set; }
}
// NumberRangeFilter.cs
public class NumberRangeFilter : Filter
{
public int Min { get; set; }
public int Max { get; set; }
}
when I run the application I get the following error
1. Unable to infer or resolve a schema type from the type reference `Input: Filter`.
Is the following query supported:
filterContent (categoryCode: "All", filters: [{type: "boolean", isTrue: true}, {type: "numberrange", min: 10, max: 60}]) {
id
}