Trying to setup subscriptions using the Apollo cli...
# prisma-whats-new
s
Trying to setup subscriptions using the Apollo client in an Angular 4 project. I’m getting a
Invalid message type! at SubscriptionClient.processReceivedData
error. I’ve set things up in the same exact way as the Apollo example app for subscriptions using subscriptions-transport-ws. I’m not sure if this a problem that’s related to Graphcool or Apollo. Otherwise without subsciptions my client works perfectly. The error originates from this part of the setup:
Copy code
const wsClient = new SubscriptionClient('<wss://subscriptions.graph.cool/v1/...>', {
  reconnect: true
});
Wondering if somebody has run into anything similar.
n
@sebastien hey 👋 can you try using version
0.5.4
of
subscriptions-transport-ws
for now?
does that help?
s
Awesome, thanks so much, it looks like it works! Sorry for the delayed answer, I had to leave for a bit.
Now I’m facing a “The provided query doesn’t include any known model name.” error, but it looks like I may be doing something wrong in my subscription query.
And I’ve figured out the proper syntax for my subscription query 🎉😃
n
awesome! 🙂 could we improve the docs somehow to make that easier in the future?
s
Hey there @nilan, no I think its basically just me being totally new to subscriptions and I was trying to query
allPurchases(filter: …
instead of
Purchase(filter: ...