Hey everyone,
I’m running into a bit of trouble with a mutation and could use some advice. I’m working on a GraphQL setup and I keep getting this error:
Mutation "createUser" requires argument "email" but none was provided.
When I was searching about this I came across these resources Error handling ccsp exam preparation Unsure how to resolve `Missing field while writing result` error when using subscriptions · Issue #8677 · apollographql/apollo-client · GitHub and as per them I have tired the following-
I’ve double-checked the mutation definition, and it does indeed require an email
argument. However, despite passing it in my request, the error persists.
Here’s a snippet of my mutation code:
mutation {
createUser(name: "John Doe") {
id
name
}
}
I’m missing the email argument in the request, but even when I add it like this:
mutation {
createUser(name: "John Doe", email: "john.doe@example.com") {
id
name
}
}
I still get the same error.
Has anyone else run into this issue or have any ideas on what might be going wrong? Any tips or advice would be greatly appreciated!
Thanks a bunch!
Best Regards,