Open thojanssens opened 2 years ago
I think that SSE would need to be handled entirely differently from the way this library works, because SSE does not use UPGRADE requests to open websockets.
My quick read on this is that an absinthe SSE library could be a separate cowboy dispatcher. I see that there are some examples of how to implement SSE in cowboy, and a custom dispatcher can be registered.
In any case, I think that it would be a different library.
Would you know why the example code you referred to https://hexdocs.pm/phoenix/Phoenix.Endpoint.Cowboy2Adapter.html#module-custom-dispatch-options is not to be found in this lib https://github.com/mustafaturan/sse/blob/9edc7bc2397fb618861f15edb0a9ffd9ff8bb59e/README.md#phoenix-framework ?
How is it running without the dispatcher?
It looks like that readme is written more around running plug directly in Cowboy, without Phoenix involved at all. I was assuming that since you were using absinthe_graphql_ws
that you were using Phoenix, which is why I thought the custom dispatcher docs might be relevant.
It seems that Absinthe.Plug uses SSE here: https://github.com/absinthe-graphql/absinthe_plug/blob/v1.5.8/lib/absinthe/plug.ex#L359 Would you have any idea what this is about?
https://github.com/enisdenjo/graphql-sse/blob/master/PROTOCOL.md
https://www.the-guild.dev/blog/graphql-over-sse