barnabasJ
Ash Core Team
You can now add subscriptions using the DSL.
subscriptions do
pubsub YourAppWeb.Endpoint
subscribe :something_changed do
action_types [:create, :update, :destroy]
end
end
Right now, you still need to add the dependency from github. A release will follow soon.
I created a small demo video showing the setup.
Trending in News & Updates
Popcorn, the library that runs Elixir code in the browser, is now stable :popcorn:
This is possible because it now builds on a very stab...
New
Hologram UI is in the works - the official component library for Hologram - and the waiting list is now open.
A common reaction when I m...
New
This thread is for updates on the Hologram website (docs, new pages, roadmap, feature status, etc.).
You can watch this thread to get no...
New
Stampede 1.2 is out, and I finally got to try it at a bigger scale.
What’s new
--find-limit: instead of a fixed number of users, it add...
New
Hey Elixir folks,
I’ve been working on Xenia 0.2.0, and it’s nearly ready.
This release focuses on performance, easier integration, and...
New
Hi all,
I’ve just released Sake 0.5.0, and I want to explain better what it’s for, because I think many Phoenix apps can use it now.
Wh...
New
I’m working to make Potions the easiest way to deploy Elixir applications, and the next step in that journey is live: you can now bring y...
New
Other Trending Topics
Hey there,
I haven’t seen a list of useful Elixir specific skills for the popular AI tools yet so I’m starting one here with my first.
...
New
Hi everyone :waving_hand:
I wanted to share something I’ve been building — NowBlind, a random chat app designed to help people discover ...
New
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly)
AI dream has many faces, but general...
New
Localize is the next generation localisation library for Elixir. Think of it as ex_cldr version 3.0. The first version will be released ...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #code-sync
- #discussion
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #ai
- #elixirconf-us
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #blog-post
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #elixirconf-eu
- #processes
- #security
- #api
- #forms
- #performance










Showing Posts 1 to 5- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
sezaru
Amazing work! I will try it out asap!
Off-topic: I noticed that around 6:10 of the video, you saved a Ash resource and the formatter changed the resource code blocks order. How did you do that?
sezaru
Also, another question.
Can you somehow add logic to filter out data based on some criteria?
For example, let’s say I have a resource that contains data for multiple organizations, I want to subscribe to that resource actions, but I don’t want it to allow an me to subscribe to all data from all organizations for that resource, only for the ones that are from my own organization.
zachdaniel
What you subscribe to is a query built for a read action, so that read action can contain filters. Additionally, if you have policies that filter the data, they will be applied to all data before a notification is sent.
zachdaniel
That is the
Spark.Formatterplugin. You can configure it to set a section order for any Spark DSL includingAsh.Resource.bastiW
Minimal Reproduction example
Including
https://github.com/bastiW/my_subscription_app_sqlite
In the meanwhile you can skip most steps shown in the Video. As the CLI is doing that for you. You just need to run some cli commands and then modify the resource
If you want to start from scratch you can run:
Setup new project (I think the commands provide on the ash-hq site would also work)
Create a resource
Modify the post resource:
https://github.com/bastiW/my_subscription_app_sqlite/blob/main/lib/my_subscription_app/posts/post.ex
Switch from simple GraphQL interface to playground - as the simple seem to not support the subscriptions:
https://github.com/bastiW/my_subscription_app_sqlite/commit/5542ffc7770475b4443a60792ba886fbeb2a7b86