-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Currently, @constraint
supports only ARGUMENT_DEFINITION
directive location.
Problem: e.g. Prisma extracts all query/mutation arguments to separate input types when generates schema from datamodel.
Please add support of INPUT_FIELD_DEFINITION
location to be able to apply @constraint
to input type fields. E.g.:
type User {
name: String
phone: String
email: String
...
}
...
type Mutation {
createUser(data: UserCreateInput!): User!
updateUser(data: UserUpdateInput!, where: UserWhereUniqueInput!): User!
deleteUser(where: UserWhereUniqueInput!): User
...
}
...
input UserUpdateInput {
name: String
phone: String
email: String @constraint(format:"email")
...
}
ecker00
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request