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
Hologram v0.12 is out! This one is for the big apps. Evo Store, Hologram’s Performance Sponsor, has an app with over 9,000 Elixir modules...
New
Your standard application generally only tracks what is true right now. Updates overwrite previous data, and asking questions about the p...
New
ReqLLM v1.28.0 has been released.
Features:
add StepFun chat and audio providers (#1087) by mikehostetler
openai: honour image deta...
New
Nerves v2.0.0-pre.4 and v2.0.0-pre.3 has been released.
Changes
Fix typo preventing SOURCE_DATE_EPOCH from propogating through the
fi...
New
Mob 0.9.17, 0.9.16 and 0.9.15 has been released.
Added
Async work in screens, the LiveView way. Mob.Socket.start_async/3 runs
a functi...
New
Doggo 0.18.3 has been released.
Added
tabs: Add a disabled attribute to the :panel slot. A disabled tab can be focused with the arrow k...
New
Finitomata v1.0.0-rc.0 and v0.43.0 has been released.
Published to Hex.pm: finitomata | Hex
Documentation: Finitomata v1.0.0-rc.0 — Doc...
New
Other Trending Topics
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
New
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
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
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
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
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with.
But I don’t use it anymore.
Serverless was the promis...
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
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #ai
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixirconf-us
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #security
- #metaprogramming










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