Enitan
04/20/2019, 12:24 PMsiddhant
04/21/2019, 11:45 AMpermissions is a list in your datamodel. The set will actually replace the field’s content with what you provide, so it should look something like:
mutation CreateLocal {
createLocalUser(
data: {
email: "<mailto:example@mail.com|example@mail.com>"
password: "Welcome1"
user: { create: { firstName: "John", permissions: { set: [USER] } } }
}
) {
id
}
}
Notice I wrapped the permissions.set in square bracketsEnitan
04/23/2019, 4:09 PM