I have an input type that I want to use across multiple mutations. The only difference between its use from one mutation to another is the mandatory property of its fields.
Let's say for example that I have the following input type that I use in a create mutation:
input ObjectInput {
name: String!
description: String!
}
The name
and description
fields are both mandatory.
What if I want to use the same input type in another mutation where the description
is optional? Do I really have to create another input type just to eliminate the mandatory property of the field?