Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support subscriptions #33

Open
uesteibar opened this issue May 6, 2019 · 2 comments
Open

Support subscriptions #33

uesteibar opened this issue May 6, 2019 · 2 comments

Comments

@uesteibar
Copy link
Owner

uesteibar commented May 6, 2019

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
end

Which would be very similar to how websockex works.

@churcho
Copy link

churcho commented Mar 18, 2021

Any update on this feature request?

@uesteibar
Copy link
Owner Author

@churcho not really, I haven't gotten the time to get on this myself, although contributions are always welcome. I'll otherwise eventually build it, but I can't promise when 😄

karlosmid added a commit to karlosmid/neuron that referenced this issue Dec 10, 2021
…rt is Phoenix Channel

Implementation is based on abshinte_websocket library.

fix uesteibar#33
karlosmid added a commit to karlosmid/neuron that referenced this issue Dec 15, 2021
Abshinthe subscriptions implementation based on elixir library abshinthe websocket.

uesteibar#33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants