I am trying to create a graphql to create a user and trying this in the playground:
mutation(
$email: String!
$password: String!
$username: String!
) {
createUser(
data: {
email: $email
password: $password
username: $username
}
)
{
id
username
email
}
}
and pass variables:
{ "email": "email@email.com", "password": "1234567", "username": "username" }
but I get this error:
{
"errors": [
{
"message": "Cannot read properties of undefined (reading 'includes')",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"createUser"
],
"extensions": {
"name": "TypeError"
}
}
],
"data": {
"createUser": null
}
}
what is causing this error and where can I start debugging?
it was because of a hook mistake
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.