tRPCttRPC
Powered by
tmy03T
tRPC•3y 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();
const { mutate } = api.story.create.useMutation();


This gives the following error:
ERROR  TypeError: queryClient.getMutationDefaults is not a function (it is undefined)
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.
message.txt9.18KB
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

ERROR TypeError: queryClient.getMutationDefaults is not a function (it is undefined)
2035Builder22035Builder / ❓-help
2y ago
TypeError: cache is not a function
danyDdany / ❓-help
2y ago
TypeError: client[procedureType] is not a function
emilEemil / ❓-help
3y ago