Here is my definition for Client and ClientInput for GraphQL
type Client {
_id: String
short_name: String
full_name: String
address: String
contact_name: String
contact_email: String
contract_currency: String
location: String
}
input ClientInput {
short_name: String
full_name: String
address: String
contact_name: String
contact_email: String
contract_currency: String
location: String
}
They are more or less the same. Why do they choose to invent an input type?
Here is what I found from their official document:
input is another special type in graphql, because in graphql you can't mix input and output types in your schema.
I am still not fully clear why. Why in graphql, I can't mix input and output type?