-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
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).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels