I've created a model that has a field which takes multiple values of an ENUM
. How can I write a mutation which will allow me to add multiple values at once?
For example, I have a sign up mutation:
export const signUp = gql`
mutation signUp(
$email: String!,
$name: String!,
$password: String!,
$attended: [USER_ATTENDED!]!,
$role: [USER_ROLE!]!,
) {
createUser(
authProvider: {
email: {
email: $email,
password: $password,
},
},
name: $name,
attended: $attended,
role: $role,
) {
id,
createdAt,
name,
email,
}
}
`;
I would expect $attended
and $role
to accept multiple values.