Skip to content

Conversation

@benwilson512
Copy link
Owner

No description provided.

@@ -0,0 +1,97 @@
defmodule Absinthe.Phoenix.Channel do
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note, this file will be extracted to the Absinthe.Phoenix project here shortly.


chan.on("new:msg", msg => {
$messages.append(this.messageTemplate(msg))
chan.on("subscription:data", msg => {
Copy link

@vic vic Apr 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @benwilson512

I'm trying to adapt this example project for testing subscription-support on apollo-phoenix-websocket but I was wondering why on this line, we listen for subscription:data topic, looking at the absinthe subscription branch looks like its currently hardcoded so I guess it's a temporary thing you had just for getting the example work. I was thinking perhaps the response from thesubscription resolution should to the client the topic to listen for new data coming from that subscription.

So I suppose the subscriptions branch on absinthe is still missing something to be completed ?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@benwilson512

Today I got the example chat application working with apollo subscriptions, the only change worth of mentioning is this one so that updates get sent (and most importantly, the client subscribes to) different events per gql subscription, instead of always getting them on a single subscription:data event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants