"Cannot determine GraphQL input type" on filter using RelationshipField,...
Turn multiple data sources into a single GraphQL API.
Brought to you by:
skeep
Originally created by: kyelewis
Describe the bug
When decorating a field with RelationshipField, if the target of the relationship has a different name in its type-graphql ObjectType decorator from its .name property, the backend will fail with:
**To Reproduce**
Create two entities in this form:
@ObjectType("One")
class EntityOne {
...
}
@ObjectType()
class EntityTwo {
@RelationshipField(() => EntityOne, { id: 'entityOneId' })
entityOne!: EntityOne;
}
The base resolver will create a filter `OnesFilter` using the name from the ObjectType decorator.
The RelationshipField decorator will attempt to create a filter field using the type name `EntityOnesFilter` from the class name.