Skip to content

Cannot use newer version of apollo-client #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bgentry opened this issue Jan 27, 2017 · 1 comment
Closed

Cannot use newer version of apollo-client #10

bgentry opened this issue Jan 27, 2017 · 1 comment

Comments

@bgentry
Copy link
Member

bgentry commented Jan 27, 2017

I attempted to upgrade the addon's core dependencies here: https://github.com/bgentry/ember-apollo-client/compare/upgrade-apollo-client

Unfortunately, that breaks the tests, resulting in the following console errors:

apollo-client.amd.js:47Uncaught SyntaxError: Unexpected token import
index.js:1Uncaught ReferenceError: define is not defined
    at index.js:1
app.js:1Uncaught ReferenceError: define is not defined
    at app.js:1
query-and-unsubscribe-test.js:1Uncaught ReferenceError: define is not defined
    at query-and-unsubscribe-test.js:1
tests?hidepassed:39 Uncaught ReferenceError: Ember is not defined
    at tests?hidepassed:39
test-loader.js:21Uncaught ReferenceError: require is not defined
    at HTMLDocument.<anonymous> (test-loader.js:21)

To upgrade, I ran:

yarn upgrade apollo-client graphql-tag graphql-tools graphql

I was able to narrow it down to the fact that it breaks as soon as apollo-client is upgraded beyond v0.6.0 (to v0.7.x or beyond).

My assumption is that this is due to the Apollo Client changes to use UMD and ES6 modules, which were released literally the day after this addon was first published.

I don't have time to dig into this any further right now, but if anybody feels inclined to take a crack at it, be my guest 😃

@bgentry
Copy link
Member Author

bgentry commented Mar 5, 2017

This was resolved by #12. I'll be releasing a new version of this addon with apollo-client v0.10.1 shortly.

@bgentry bgentry closed this as completed Mar 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant