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

Can I use this package with graphql package to connect to phoenix backend? #4

Open
freewebwithme opened this issue Oct 29, 2020 · 1 comment

Comments

@freewebwithme
Copy link

Hi
I am using graphql and graphql-flutter packages in my flutter project.
And phoenix framework using absinthe for backend server.

I am trying to use subscription in graphql but having trouble with it.
I think graphql-flutter package doesn't initialize websocket for specifically phoenix.
I got this error In my server log

[info] CONNECTED TO JaangWeb.UserSocket in 116µs
  Transport: :websocket
  Serializer: Phoenix.Socket.V1.JSONSerializer
  Parameters: %{}
[error] Ranch listener JaangWeb.Endpoint.HTTP had connection process started with :cowboy_clear:start_link/4 at #PID<0.935.0> exit with reason: {%Phoenix.Socket.InvalidMessageError{message: "missing key \"topic\""}, [{Phoenix.Socket.Message, :from_map!, 1, [file: 'lib/phoenix/socket/message.ex', line: 35]}, {Phoenix.Socket, :__in__, 2, [file: 'lib/phoenix/socket.ex', line: 466]}, {Phoenix.Endpoint.Cowboy2Handler, :websocket_handle, 2, [file: 'lib/phoenix/endpoint/cowboy2_handler.ex', line: 175]}, {:cowboy_websocket, :handler_call, 6, [file: '/home/taedori/elixir-project/jaang/deps/cowboy/src/cowboy_websocket.erl', line: 528]}, {:cowboy_http, :loop, 1, [file: '/home/taedori/elixir-project/jaang/deps/cowboy/src/cowboy_http.erl', line: 254]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 226]}]}

Is this package helps with this problem?

@redDwarf03
Copy link

@freewebwithme hello. have you find a solution ?

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

No branches or pull requests

2 participants