tmy03T
tRPC3y ago
4 replies
tmy03

TypeError: queryClient.getMutationDefaults is not a function (it is undefined)

Hi!

There's not much code to show here, as I'm really not sure where the error actually occurs.

In my React component I have:
const { mutate } = api.story.create.useMutation();

This gives the following error:
ERROR TypeError: queryClient.getMutationDefaults is not a function (it is undefined)

Has anyone experienced the same? I can't find any good results on Google, so I guess it's not a typical issue.

The is the first mutation I've tried to do. GET queries are working just fine.
Was this page helpful?