Currently it's possible to specify custom directives for fields. They are propagated to the final schema, but only for type fields. We need a way how to specify custom directives that need to be used for input fields (eg. for validation purposes).
Example:
// model.graphql
type User {
email: String! @validation(email: true)
age: Int @validation(min: 0)
}
// gen/schema.graphql
input UserCreateInput {
id: ID
email: String! @validation(email: true)
age: Int @validation(min: 0)
}
input UserUpdateInput {
email: String @validation(email: true)
age: Int @validation(min: 0)
}
The question is how to choose which directives propagate to type fields and which to create/update input fields (I'm not sure if it's ok to propagate them all).
Currently it's possible to specify custom directives for fields. They are propagated to the final schema, but only for type fields. We need a way how to specify custom directives that need to be used for input fields (eg. for validation purposes).
Example:
The question is how to choose which directives propagate to type fields and which to create/update input fields (I'm not sure if it's ok to propagate them all).