Skip to content

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

@freewebwithme

Description

@freewebwithme

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions