Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Update to accept promise returned from subscribe with graphql 0.11.x #259

Closed
Trakkasure opened this issue Aug 29, 2017 · 3 comments
Closed

Comments

@Trakkasure
Copy link

Trakkasure commented Aug 29, 2017

The subscribe function from graphql returns a promise that resolves to an AsyncIterator.
This is different than was in 0.10.5, and thus breaks with an exception in server.ts line 431 with and exception: Cannot read property 'then' of undefined

Normally, this wouldn't be an issue, but the dependencies allow for 0.11.1 to be installed.
"graphql": "^0.10.1"

When I cloned and installed this repo, it only installed 0.10.5. But, since I added subscriptions to my library after the fact, graphql didn't get downgraded or a warning to that effect didn't occur, this became a serious pain.

How to reproduce:
Take any existing example and run with graphql 0.11.x and it will fail.

Also, the tests fail in 0.11.1

@Trakkasure
Copy link
Author

Trakkasure commented Aug 29, 2017

If i would have seen this: https://github.com/graphql/graphql-js/releases/tag/v0.11.0
I would not have spend hours on this problem. :)

rationale for the change: graphql/graphql-js#895

@Trakkasure Trakkasure changed the title Incompatible with graphql 0.11.x Update to accept promise returned from subscribe with graphql 0.11.x Aug 29, 2017
@groundmuffin
Copy link

Why the package doesn't require the right version of subscribe/execute functions itself?

@zackify
Copy link

zackify commented Sep 8, 2017

Ohhhh sounds like the issue i made is from this too!!! #269

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants