[Question] InputType() decorator additional configuration (name)
Hi! I would like to solve one problem and here is a context.
I am using Apollo Federation and we have multiple subgraphs. Some of them will use Postgres and others will use Mongo. This plugin is wonderful and saved us a lot of time. This time I seek for a solution to this specific problem.
- If the database is Postrgres -> InputType JsonNullableFilter has one definition
- If the database is Mongo -> InputType JsonNullableFilter has another definition
In conclusion -> Supergraph Composition fails because it cannot build two different input types.
Problem:
I have this piece of code that is generated depending on provider
@ InputType() export class JsonNullableFilter { field a, field b }
@ InputType() export class JsonNullableFilter { field c, field d }
Question:
- Is there a possibility to modify @InputType() decorator (via configuration for example) to @InputType('something')
Ideally:
- I want to have
@ InputType('PostgresJsonNullableFilter') export class JsonNullableFilter { field a, field b }
@ InputType('MongoJsonNullableFilter') export class JsonNullableFilter { field c, field d }
JsonNullableFilter is a built-in type, it's possible to add such feature, it requires add new code