Unable to get composables inside of Pinia to work properly #2392
Unanswered
dtrinh100
asked this question in
Help and Questions
Replies: 1 comment
-
Show the useMutation. |
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.
-
I have several functions within my Pinia store that uses Nuxt Urql's composable to make an API call to my GraphQL API. When I use the store to make the function call, it fails with the error:
Uncaught (in promise) Error: use* functions may only be called during the
setup()or other lifecycle hooks.
even though I believe that the code is within the setup lifecycle.Is there a way that I can restructure my code to make this work?
Code that calls the store:
Sample store code:
Beta Was this translation helpful? Give feedback.
All reactions