Using the queryclient directly for a graphql mutation #3186
Unanswered
JessedeJonge
asked this question in
Q&A
Replies: 1 comment
-
I think you can execute a mutation manually, but it won't solve your problem because you would still need provide a |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Im in a situation where I want to run a mutation outside a function component. For general use, I use hooks that are generated by codegen, but for this call I can not use hooks. I tried writing a function that just does a simple fetch with a post body, but I need an ENUM as a parameter for the mutation, and fetch seems to parse it as a string. Tried the following option:
Device_type android is an enum generated by graphql codegen. I have also tried a string.
so, I was thinking; maybe the queryclient can handle this better? If so, how can i use it for post calls?
Beta Was this translation helpful? Give feedback.
All reactions