Aktaeon
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
The obligatory hello world thread!
Who are you and where are you from? :stuck_out_tongue:
New
I want to open this thread for you all to discuss and help those who really like Ash but are still hesitant to use it in a real project. ...
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
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
We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using.
We’re particularly inte...
New
Is there a word for the ~> symbol used in Version strings?
Do you also just call it a Squiggle Arrow™ ?!
New
Other Trending Topics
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
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
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
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
Aludel - LLM Evaluation Workbench
Aludel is an embeddable Phoenix LiveView dashboard for evaluating and comparing LLM prompts across mult...
New
Latest Phoenix Threads
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
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #ai
- #elixirconf-us
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 7- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
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.