-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Validate array argument. Something like:
type Mutation {
updateUser(
id: ID!
name: String
emails: [String!]! @constraint(
minItems: 1,
maxItems: 3,
uniqueItems: true,
format: "email" #applies to all items of array?
)
)
}
Validate object argument (useful when argument is an input type). Something like:
type Mutation {
updateUser(
data: UserUpdateInput! @constraint(
name: { minLength: 5, maxLength: 40 },
email: { format: "email" },
age: { min: 18, max: 100 }
)
where: UserWhereUniqueInput!
): User!
}
input UserUpdateInput {
name: String
email: String
age: Int
verified: Boolean
}
ecker00
Metadata
Metadata
Assignees
Labels
No labels