Ash Weekly: Issue #7
Igniter gets smarter, AshGraphql subscriptions, SDL files, and an AlchemyConf discount code and promo video!
Ash Weekly!
This is a super quick, informal update about the goings on in and around Ash Framework each week. If you find something interesting and think it should make it on this newsletter, drop a message in the #ash-weekly channel in our Discord server.
Shameless Plugs
Check out Ash Premium Support from Alembic.
Sponsor me if you like what I do.
AlchemyConf - Video and 10% off!
Use code ZACHDANIEL for 10% off! Don’t forget to smash that like and subscribe button 😝. In all seriousness, I’m really excited about this conference, and I can’t wait to see you all there! Catch my interview with Zamith from Subvisual if you aren’t tired of hearing me talk yet. We also have our next training at AlchemyConf! Be there or be square!
Ensuring latest igniter version
The installer now checks if you are on the latest version of the archive when creating new projects, and uses `mix deps.update igniter` when installing into existing projects. This should help get ahead of a lot of cases where users face bugs that have been fixed in newer releases.
AshGraphql Subscriptions
AshGraphql has had subscription support for a while now, its really cool, you should check it out! We now include the structure required for subscriptions in the installer automatically!
SDL Files
You’ve been able to configure `AshGraphql` to emit an “SDL file” (your GraphQL schema) whenever you run `mix ash.codegen`, but you can now go one step further and generate the file every time your schema module compiles. This means that you can add your resources to Phoenix’s code reloader and have it automatically regenerate your schema file. Great if you’re working with a GraphQL codegen based front end!
Ash Office Hours
Catch the recording of our February office hours! Come to the next one if you’d like to get your questions answered live 🎉
Releases
Ash: 3.4.65
Improvements
Raise an error if a generic action returns a result, i.e `{:ok, result}` but the action does not specify a return type.
Fixes
fix pattern match when using `:_pkey` in notifier topic
Fix logic for rolling back generic actions that touch multiple resources.
fix case where batch before/after action callbacks could be skipped when running bulk actions
ensure that code interfaces return NotFound error in all the cases that they should
fix case where we were returning records on bulk update/destroys despite not being asked to
ensure actor templates are hydrated for deeply nested aggregates
properly use operator overloads for evaluating operators at runtime
add a missing case clause for bulk update/destroy with `get?: true` in interface (#1806)
always run update filter even on skipped updates
don't change update defaults unless something other than an update default changes
fix `parent/1` expressions when used in calculations inside of relationship filters
Igniter: 0.5.28-0.5.29
Improvements
Add `phx_test_project` for testing generators on top of Phoenix code. Do not use this for anything other than testing, as it is likely to break when phoenix upgrades :D
The installer now checks if you are on the latest version of the archive when creating new projects, and uses `mix deps.update igniter` when installing into existing projects.
Fixes
Fix a case where we were duplicating diffs
Splode 0.2.9
Improvements
Show docs for exception function, and list available keys automatically.
AshGraphql 1.7.0-1.7.2
Improvements
Set up subscriptions in the installer automatically
Add `auto_generate_sdl_file?` option to `use AshGraphql`
Fixes
don’t require setting an object type if there are no actions, relationships, or fields that would require it.
AshAuthentication 4.5.2
Improvements
Use `authorize_with: :error` when bulk updating tokens to expunge them, to surface any authorization errors that affect token expunging.
Add `tenant` option to the new user confirmation sender
Fixes
Ensure that token expunger sets required authorization context
Fix a bunch of places where we were not passing along the `tenant` option
Include the tenant in the generated JWT claims
When checking if tokens are revoked, assume that they *are* if something unrelated goes wrong.
AshAuthenticationPhoenix 2.4.8
Improvements
Add `LiveSession.opts/1` to help with interoperability with other tools (specifically Beacon CMS in this instance).
Fixes
Ensure all forms set the current tenant
Properly stringify lists of atoms in gettext
AshPostgres 2.5.6
Improvements
Support `SKIP LOCKED` in `Ash.Query.lock`
Fixes
Fix cases where query bindings could conflict when performing a lateral join
Ensure primary key migrations use prefix for multitenancy
Don’t rewrite identities in migrations when only the `global?` option has been changed on multitenancy
Don’t add a `modify/2` statement in migrations when an attribute is only being renamed
AshSql 0.2.58-0.2.59
Fixes
Wrap the `strpos(foo) > 0` fragment used for the `contains` expression in parentheses to avoid an ambiguous statement
Various binding index fixes
Use `count()` when no field is provided for the count aggregate, instead of the first primary key field
AshSqlite 1.1.1
Fixes
Rewrite the `in` expression to a series of “or equals” because either SQLite or the SQLite Ecto adapter doesn’t like support list literals
AshAdmin 0.13.1
Improvements
Use AbortSignal in Typeahead hook to remove event listeners
Improvements
Set a default `search_max_items` for searching related records
AshMoney 0.1.17
Fixes
Add a new migration to fix the greater than or equal operator which was using the wrong function (greater than)
AshDoubleEntry 2.1.18
Fixes
Fix an installer bug that would double process transactions
Fix an installer bug that was using the wrong argument type for `balance_as_of`