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,
I am trying to merge two schema in one following this example but keep getting this error:
The name `IntOperationFilterInput` was already registered by another type. (HotChocolate.Data.IntOperationFilterInputType).
TypeModule dynamically creates types from database a Query is as follows:
[ExtendObjectType("Query")]
public class Query
{
[GraphQLName("objectSets")]
[UseFiltering(typeof(ObjectSetFilterType))]
public IEnumerable<ObjectSet> GetObjectSets([Service] EasyIDMDbContext context) => context.ObjectSets.ToList();
}
public class ObjectSetFilterType : FilterInputType<ObjectSet>
{
protected override void Configure(IFilterInputTypeDescriptor<ObjectSet> descriptor)
{
// descriptor.BindFieldsExplicitly();
// causes The object type `FilterDefinition` has to at least define one field in order to be valid
descriptor.AllowAnd(false).AllowOr(false);
descriptor.Field(f => f.IdmObjectTypeId); // single field filtering is intended
}
}
When I remove the UseFiltering attribute, I get different error:
1. The object type `FilterDefinition` has to at least define one field in order to be valid.
(HotChocolate.Types.ObjectType<EasyIDM.Model.Filtering.FilterDefinition>)
HotChocolate.SchemaException: For more details look at the `Errors` property.
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
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am trying to merge two schema in one following this example but keep getting this error:
TypeModuledynamically creates types from database aQueryis as follows:Configuration
When I remove the
UseFilteringattribute, I get different error:The
FilterConventionis pretty standardQuestions are
I guess I am missing something ...
Can you help me?
Thanks,
Karel
Beta Was this translation helpful? Give feedback.
All reactions