Closed villander closed 3 years ago
Hi @villander. I think the docs might have confused you because the name of the mutation and the property in the component is the same. The docs are correct, they just use the same name.
Looking at your mutation, I would expect that insert_users
to be the key after data
, so data.insert_users
.
Feel free to open a PR to the docs to clarify that.
The documentation says that we should use the name of the mutation property if you're using
createNode = useMutation
, you must useresult.data.createNote
to add a new record, but the proper way is to call the mutation name defined on the mutation file.I have a mutation like that:
The unique key inside the
result.data
is theinsert_users
object. We have to update the docs to explain how it works properly.cc: @josemarluedke