ember-graphql / ember-apollo-client

🚀 An ember-cli addon for Apollo Client and GraphQL
MIT License
279 stars 72 forks source link

V4 service extension / v4 fails on ember 3.28 #434

Closed radru1 closed 6 months ago

radru1 commented 1 year ago

I couldn't make addon work when using ember-apollo-client v4, at least not when extending a service which is my use case.

I was not able to access apollo client there (I use it in few places), it was undefined in my extended service despite being set in addon's service init.

Using last 3.x version of ember-apollo-client works and allows me to access client property on service. From releases it seemed to me that there were no changes to client accessibility and bump to ember 4.0 was internal only. Is minimal Ember v4.x for v4.x of ember-apollo-client or did client property accessibility change?

radru1 commented 6 months ago

Gave it another go, I was adding type to client in my extension of the service which made client undefined. It did not cause the issue before v4 but it makes sense. Change in behaviour probably had to do with changes in addon's apollo service constructor between v3 and v4.