Vue-apollo: export 'onServerPrefetch' was not found in 'vue-demi'

Created on 19 Nov 2020  路  14Comments  路  Source: vuejs/vue-apollo

Describe the bug
@vue/apollo-composable doesn't work with vue 3 since vue-demi cant resolve onServerPrefetch. Seems it's only provided by @vue/composition-api

To Reproduce
Steps to reproduce the behavior:

  1. Create a new vue 3 project
  2. Install graphql graphql-tag @apollo/client as described here
  3. Install and configure @vue/apollo-composable as described here
  4. See warning in terminal:
 warning  in ./node_modules/@vue/apollo-composable/dist/useQuery.js

"export 'onServerPrefetch' was not found in 'vue-demi'

Expected behavior
One should be able to import onServerPrefetch from @vue/apollo-composable (or directly from vue?)

Versions
vue: 3.0.2
@vue/apollo-composable: 4.0.0-apha.12
@apollo/client: 3.2.7

Additional context
Trying to import onServerPrefetch from @vue/composition-api leads to another warning on the terminal:

 warning  in ./node_modules/@vue/composition-api/dist/vue-composition-api.esm.js

"export 'default' (imported as 'Vue') was not found in 'vue'

Most helpful comment

Can you please provide an update on this issue?

All 14 comments

Any update on this?

Can you please provide an update on this issue?

Any updates anywhere on this issue yet?

Anything on this yet?

Updates please?

have the same issue

I am working with this hack for now killix@1dbb4bf

@killix does this break prefetching?

Should not as vue-demi doesn't export the function.

Same problem here

Very nice work btw but I'm having the same issue, any updates?

Check this out, i alread tested with Vue, Vite.js and Node. Astrid-Client

Same issue.

Same problem here.

Was this page helpful?
0 / 5 - 0 ratings