Awaiting for mutation promise makes error and data undefined. #12242
Labels
🏓 awaiting-contributor-response
requires input from a contributor
ℹ needs-more-info
Needs more information to determine root cause
If we have
const [mutate, { data, error }] = useMutation()
, and callmutate()
alone,data
, anderror
are populated as expected.However, when awaiting the result of mutate like
mutate().then(() => {})
,data
, anderror
areundefined
.I wouldn't expect this behaviour, and cannot seem to find it documented anywhere.
The text was updated successfully, but these errors were encountered: