Properties with type “object” are ignored in the input types in Hotchocolate GraphQL. Is there a workaround to it?

Properties with type “object” are ignored in the input types in Hotchocolate GraphQL. Is there a workaround to it?


0

I have an input class that has a single property with "object" object type as shown below:

public class FilterParameterValue
{
    public object Value = new object();
}

When I start the server, I get the following error:

HotChocolate.SchemaException: 'For more details look at the Errors property.

InputObject FilterParameterValueInput has no fields declared. (HotChocolate.Types.InputObjectType<Data.Filter.FilterParameterValue>)

When I add another property to the class with a different type, I do not get the error. However, when I check the FilterParameterValueInput in Banana Cake Pop, the property with "object" object type does not appear.

I tried BindFieldsExplicitly and declare the Value property but it no luck. Am I missig something? Or is there a workaround to this issue?

Thanks a lot!

I am expecting to see the property with type "object" in the Input object properties.

New contributor

Matthew In is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


Load 7 more related questions


Show fewer related questions

0



Leave a Reply

Your email address will not be published. Required fields are marked *