Aktaeon
Absinthe Subscriptions alternative?
Hi, trying to use elixir/phoenix/absinthe on the backend and nextjs with typescript on the frontend. Everything seems to be well except that Absinthe/graphql subscriptions seem to be abandoned, outdated corejs, etc. If you are doing subscriptions is there another way ?
Trending in Discussions
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
New
@chrismccord : I just saw the Extract AGENTS.md from Phoenix.new into phx.new generator commit to the phoenix project.
My initial shotgu...
New
I was working on an Ecto migration and I needed a timestamp. So, for the nth time, I looked up the different data types for timestamps, a...
New
Just a general thread to post chat/news/info relating to AI/ML stuff that may be relevant for Nx now or in the future. Got anything to sh...
New
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog
It says that Fly is going all-in on sprites, which is a worry ...
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New
There are three potential reasons for members of this forum to have a look at https://vutuv.de
You are tired or annoyed of LinkedIn.
Yo...
New
Latest Phoenix Threads
Chat & Discussions>Discussions
Latest on Elixir Forum
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #performance











First 7 of 7 Posts
thojanssens1
I’ll have to implement GraphQL subscriptions in my codebase soon.
I assume that you refer to the package
absinthe-socket. I didnt look into it yet but can’t we just use the native JS WebSocket object?Aktaeon
The elixir code seems to be up to date, but there are no updates on the JavaScript code needed for the sockets GitHub - absinthe-graphql/absinthe-socket: Core JavaScript support for Absinthe WS-based operations · GitHub no updates for several years and open pull request to update dependencies . But even with upgrading the depencies to newer versions will require more change in the code than just increasing the version number. Not sure how relevant that is but it has been complicating my project slightly
lack of typescript does not help in my case. Probably all solvable but if there is an easier way I am interested in hearing about it 
maartenvanvliet
I recommend GitHub - absinthe-graphql/absinthe_graphql_ws: Add graphql-ws websocket transport for Absinthe · GitHub for absinthe websockets. It uses the graphql_ws protocol instead of absinthe over Phoenix channels that is used by absinthe_socket. It’s well supported by client libraries in JavaScript and other languages.
easco
I have a repo on GitHub which allows you to use the Apollo GraphQL client to talk to Absinthe on the back end. Unfortunately, though, I’ve never used it in production and it may be incomplete or out-of-date. But it’s there if you care to look at it: GitHub - easco/absinthe_apollo_sockets: Use the Apollo Websocket protocol to drive Absinthe GraphQL functionality · GitHub
thojanssens1
Thank you for sharing this lib!
If I understand right, this library allows Absinthe to follow the
graphql-wsprotocol. Two questions:Absinthe by default then doesn’t follow the protocol? Why not, as graphql-ws is becoming the standard from what I read?
This library only seems to handle the server-side implementation of the protocol, right? What should I use client-side? (I do not want to use a specific framework like Apollo).
maartenvanvliet
I think in the future Absinthe might very well use
graphql-wsas the default. Especially as more clients will support it by default.In regards to your second question, a JS client without Apollo et al. is here: GitHub - enisdenjo/graphql-ws: Coherent, zero-dependency, lazy, simple, GraphQL over WebSocket Protocol compliant server and client. · GitHub This is the base client that e.g. Apollo have wrappers for.
thojanssens1
Thank you for your help! I got confused that
graphql-wshas also code for the server. It’s a pity that it is not separated into two packages, as if you don’t run the server on NodeJS, you only need the client-specific code.