You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using useMutation within <script setup> causes Error: Apollo client with id default not found. Use provideApolloClient() if you are outside of a component setup. with nuxt 3. Example:
Have been able to find a work around using this issue #444, but this seems like a hack. Would expect not to have to explicitly add apollo-composable and and this plugin file.
Environment
Darwin
v16.19.1
3.2.2
2.2.3
[email protected]
vite
ssr
,modules
,alias
,security
,apollo
,css
,vite
,devServer
nuxt-security@^0.13.0
,@nuxtjs/apollo@^5.0.0-alpha.6
-
Describe the bug
Using useMutation within
<script setup>
causesError: Apollo client with id default not found. Use provideApolloClient() if you are outside of a component setup.
with nuxt 3. Example:Expected behaviour
Would expect it to work the same as setup() {}. NOTE: 8/3 setup() didn't work either.
Reproduction
This is just a pretty basic setup with
package.json
andnuxt.config
as followedThen just use component with <script setup> with
mutate
within another method.Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: