observer is not defined
kachkaev opened this issue · comments
Hi Oleg,
Looks like the subscriptions are not working in the latest version. GraphiQLSubscriptionsFetcher.js refers to a variable called observer
, but it is not defined. Getting an exception when trying to subscribe to something.
I'm also wondering if sending subscriptions could be disabled when the ws url is not defined. I forgot to define it today and sent a subscription, but this resulted an odd error, because the query was sent to the HTTP server:
Apollo tried resolving a subscription when there's no event, so the payload was undefined.
Yep @OlegIlyenko broke it with this commit: 6258979
The dependency on subscription-transport-ws
should target 0.8.x, they have deprecated the API the fetcher is using in 0.9.x
I will submit a PR shortly to fix this.
Just published v1.1.4 Sorry for breaking the deps 😰 Thanks again got fixing it, @tlvenn!
Thanks Oleg! Updating to 1.4.4
worked for me in my create-react-app
instance, although I had to switch to yarn
in order to avoid a duplicate graphql
dependency (versions 0.11.*
and 0.10.*
). @tlvenn many thanks for introducing the "resolutions"
section in package.json
– otherwise I'd fiddle with duplicate deps forever 😃