-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Labels
Description
It would be great to implement support for subscriptions using websockex. The usage could roughly be:
defmodule SubscriptionExample do
use Neuron.Subscription
@url "https://my.awesome.graphql/endpoint"
@query """
subscription {
user {
name
}
}
"""
def start_link(state) do
Neuron.Subscription.start_link(@url, @query, __MODULE__, state)
end
def handle_update(data, state) do
IO.puts "Received Update - #{inspect data}"
{:ok, state}
end
endWhich would be very similar to how websockex works.
acrogenesis, alde103, smedegaard, johnknott, kouwasi and 10 more