You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi everybody,
We've working on a project with the use of a custom ITypeModule based on a json schema. Our classes have some "static" properties defined on the .cs files and others "dynamic" properties that came from Json Schema (simple or complex objects).
Obviously the automatic filter creation cannot detect the dynamic properties.
We've made a test with the manual creation of the FilterInputTypeDefinition (made during our json schema recursive reading) :
var filterTypeDefinition = new FilterInputTypeDefinition()
{
Name = $"{parentTypeName}{typeName}FilterInput",
EntityType = typeof(K),
RuntimeType = typeof(K),
UseAnd = true,
UseOr = true
};
...
var inputTypeName = $"{jsonType.GetGraphqlType()}OperationFilterInputType";
var inputField = new InputFieldDefinition(
property.Key.ToCamelCase(),
type: TypeReference.Parse(inputTypeName)
);
filterTypeDefinition.Fields.Add(inputField);
But we receive some errors about "base" type registration : Unable to resolve type reference StringOperationFilterInputType. (HotChocolate.Types.InputObjectType).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi everybody,
We've working on a project with the use of a custom ITypeModule based on a json schema. Our classes have some "static" properties defined on the .cs files and others "dynamic" properties that came from Json Schema (simple or complex objects).
Obviously the automatic filter creation cannot detect the dynamic properties.
We've made a test with the manual creation of the FilterInputTypeDefinition (made during our json schema recursive reading) :
But we receive some errors about "base" type registration : Unable to resolve type reference
StringOperationFilterInputType
. (HotChocolate.Types.InputObjectType).Is this approach correct? There are other ways?
Thanks in advance!
Andrea
Beta Was this translation helpful? Give feedback.
All reactions