Vue-apollo: @vue/apollo-composable currently only works with @vue/composition-api <= 0.5.0

Created on 3 Jul 2020  路  8Comments  路  Source: vuejs/vue-apollo

Describe the bug
I was trying to follow the setup instruction and I noticed that the last release from @vue/apollo-composable was 3 months ago. When trying to use it it was impossible to use the composition function. it was not returning anything neither any error.

To Reproduce
Steps to reproduce the behavior:

  1. Follow the @vue/apollo-composable setup instruction(using latest version)
  2. try to use a query
  3. nothing will happen

Expected behavior
The graphql query should be executed.

Versions
vue: 2.6.11
vue-apollo: 3.0.3
apollo-client: 2.6.10
@vue/apollo-composable: 4.0.0-alpha.8

@vue/composition-api: 1.0.0-beta.1 (latest, do not work)
@vue/composition-api: >= 0.6.x (do not work)
@vue/composition-api: <= 0.5.x (works, no bug)

Additional context
No error is triggered, it just does not execute the query.

pending triage

Most helpful comment

I think #1000 should be fixing this, but not accepted yet :/ @Akryum

All 8 comments

Exact same problem here, downgraded to @vue/[email protected] for now :/

I think #1000 should be fixing this, but not accepted yet :/ @Akryum

Confirm. It's an issue. Any updates on merging related PR @Akryum?

I'm so glad I found this workaround. Lost a whole day on tinkering with my setup thinking it was me.

Thanks for the workaround, downgrade @vue/composition-api has some side effects, but it's warning ... it should be OK.

vue.runtime.esm.js?2b0e:619 [Vue warn]: Error in data(): "TypeError: Cannot convert undefined or null to object"

edit: The watch in 0.5.x is immediate by default. It is not in the 0.6.0. Just to be care full :)

This pull request is awesome!
I need it!

Exact same problem here, found this workaround. Lost a whole day

I am closing this issue because I just verified that the latest version of @vue/apollo-composable 4.0.0-alpha.10 with the latest version of @vue/composition-api 1.0.0-beta.6 is working nicely. So, this bug is not happening anymore.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dsbert picture dsbert  路  4Comments

AruXc picture AruXc  路  4Comments

mathe42 picture mathe42  路  4Comments

jsrkstr picture jsrkstr  路  3Comments

danthareja picture danthareja  路  4Comments