Commit graph

653 commits

Author SHA1 Message Date
Riccardo Binetti
8826c9ec35
fix: enforce multitenancy on aggregates (#952)
The multitenancy attribute was already considered as a filter in
aggregates, but the presence of the tenant was not enforced
2024-03-27 10:07:53 -04:00
Zach Daniel
88d0b46dec improvement: detect loaded-through types 2024-03-24 23:25:28 -04:00
Zach Daniel
ac0ff0e2e4 improvement: restore old behavior of leveraging in memory values for calculations 2024-03-24 19:25:13 -04:00
Minsub Kim
75b2d2eb00
feat: add less_than, greater_than constraints to float, decimal (#936) 2024-03-22 02:39:59 -04:00
Riccardo Binetti
23055f0a18
feat: allow providing descriptions to Ash.Type.Enum values (#940)
As discussed in https://github.com/ash-project/ash_graphql/issues/116, this
allows extensions to use the description to use the provided descriptions.

The documentation assumes that if a user provides a description, it does so for
all values (since this seems to be a reasonable assumption and allows the nicer
keyword list syntax). However tests also cover an enum with some missing
descriptions.
2024-03-22 02:38:59 -04:00
Zach Daniel
5a338206b7 fix: fully expand calculation and aggregate references for applying authorization 2024-03-22 01:10:15 -04:00
Hannes Wüthrich
00b1ef3bee
fix: batch_change/3 is never called for updates (#938)
* fix: bulk updates for streams ignore :batch_size
2024-03-21 08:40:18 -04:00
Dmitry Maganov
ed4655cd83
improvement: add matches built-in policy check (#937) 2024-03-21 08:39:21 -04:00
Hannes Wüthrich
b398107ca3
fix: don't double-encode vector data (#934) 2024-03-20 16:32:45 -04:00
Tun Cham Roeun
7d7bcaa3d7
fi: fetch_count/4 use the query after applying before_action hooks (#922)
---------

Co-authored-by: Zach Daniel <zachary.s.daniel@gmail.com>
2024-03-12 20:28:52 -04:00
e5f01bbd59
improvement(Ash.Reactor): Backport improvements from 3.0 branch. 2024-03-08 10:51:40 +13:00
Zach Daniel
18cc9c9b26 fix: ensure that message is honored in atomic validations
fix: don't require actor when constructing aggregate query
2024-03-07 10:47:43 -05:00
9b88628b07
improvement: Make undo actions for update and destroy actions more explicit. (#920)
* chore(Ash.Reactor): Follow on from `get` -> `read_one` rename.

* improvement(Ash.Reactor): Make undo actions for `update` and `destroy` more explicit.
2024-03-05 11:30:35 +13:00
Zach Daniel
7f0e2d8037 improvement: rename get to read_one in Ash.Reactor 2024-03-02 16:51:00 -05:00
86d74ed789
feat(Ash.Reactor): Add a Reactor extension that makes working with resources easy. (#683)
* feat: Add `Ash.Reactor` with create support.

* improvement: Add `Ash.Reactor` update support.

* improvement: Add `Ash.Reactor` destroy support.

* improvement(Ash.Reactor): Support for transactional handling of notifications.

* improvement(Ash.Reactor): Add `read` and `get` steps.

* docs: Add the beginnings of a Reactor topic.

* improvement(Ash.Reactor): add support for generic actions.

* improvement: Add `undo` capability to `create` step.

* improvement: transaction and undo working.

* docs: Start documenting undo behaviour.

* chore: Update to Reactor 0.6.

* improvement: Automatically thread Ash tracers through Reactor.

* improvement(Ash.Reactor): Add undo to generic actions.

* docs: Improve reactor documentation.

* fix: Mimic copying `Ash.Notifier` seems to break the compiler for some reason.
2024-03-02 10:26:25 +13:00
Zach Daniel
650205a9bc fix: ensure calculation arguments are not ignored when parsing filters
fixes #917
2024-02-29 00:41:24 -05:00
Zach Daniel
1a99098f52 fix: ensure that policies are applied to aggregates referenced in calculations 2024-02-26 13:00:12 -05:00
Zach Daniel
0e1fe24f46 fix: ensure actor context is set in filter 2024-02-25 08:24:19 -05:00
Zach Daniel
eab194fac5 fix: properly handle limit/offset for aggregates 2024-02-24 20:21:13 -05:00
Zach Daniel
0fd4e36b2e add test for read_one and limit 2024-02-23 08:46:17 -05:00
Zach Daniel
701f9b4cc6 fix: honor soft destroys for atomic bulk destroys 2024-02-22 08:02:01 -05:00
Zach Daniel
3027afe5fc fix: pass correct options into Api.stream! for bulk_destroy 2024-02-21 08:09:20 -05:00
Robert Graff
8fd0106528
test: add test for bulk_destroy with policy and query (#908) 2024-02-21 08:00:20 -05:00
Zach Daniel
944f69b16e fix: properly annotate run_flow's recursive DSL tag
docs: update spark & docs
2024-02-16 21:25:18 -05:00
Jechol Lee
3a353c2fa0
test: Reproduce run_flow is not counted as step inside map, branch (#902) 2024-02-16 20:21:22 -05:00
Zach Daniel
a06912f9b0 fix: honor not_found_error? in read_one
improvement: pass `tenant` to context in custom changes
improvement: `Ash.context_to_opts` now checks for a `tenant`
2024-02-16 17:56:23 -05:00
Jechol Lee
b4ade107cd
test: Reproduce flow custom step has no tenant in context (#901) 2024-02-16 17:47:54 -05:00
Zach Daniel
f847f0d971 test: update test w/ not_found_error? fix 2024-02-15 23:38:52 -05:00
Zach Daniel
ba2ab31f8d test: correct flow tests 2024-02-15 23:30:09 -05:00
Jechol Lee
aa7278fe79
test: Reproducing a bug where the flow does not honor tenant (#900) 2024-02-15 23:26:44 -05:00
Jechol Lee
e214043218
chore: Rename test/flow_test to test/flow (#899) 2024-02-15 23:23:57 -05:00
Jechol Lee
896725597b
test: Reproducing a bug where Flow ignores the authorization setup. (#895) 2024-02-15 08:57:11 -05:00
Zach Daniel
3d30fd848f fix: ensure we retain the sort order of embedded resources
fixes #883
2024-02-13 13:55:07 -05:00
Dmitry Kulakov
5846b70315 feat: allow using custom delimiters for pubsub topics 2024-02-11 16:45:05 -04:00
Zach Daniel
45999cac07 chore: test fix for after transaction hooks 2024-02-11 11:44:11 -05:00
Zach Daniel
2b7a99905c improvement: support policies requiring original data 2024-02-09 17:19:45 -05:00
Zach Daniel
0893518f39 improvement: change atomicity requirements when datalayers don't support it
test: make tests pass on 3.0
2024-02-08 15:17:32 -05:00
Dmitry Maganov
5eccdcd7f8
improvement: add on_match: :update_join to manage_relationship (#875) 2024-02-08 11:18:32 -05:00
Dmitry Maganov
d47eb086a2
fix: continue cleanup in ManagedRelationshipHelpers (#873) 2024-02-07 14:56:04 -05:00
Zach Daniel
2cd6360379 fix: fix pattern match error on certain policy conditions
improvement: various policy behavior cleanups
2024-02-06 19:30:18 -05:00
Zach Daniel
e707758c93 fix: retain metadata on updates, atomic and otherwise
fix: properly load expression -> runtime calculation deps
2024-02-01 10:21:22 -05:00
Zach Daniel
fc3cbc4e2c improvement: change nested field filtering to be done with at_path 2024-01-31 15:41:10 -05:00
Zach Daniel
f7716c5222 improvement: support referencing non-array embeds in input filters 2024-01-31 12:11:36 -05:00
Zach Daniel
6602ae63e6 fix: support expression calculations referencing runtime calculations 2024-01-30 16:34:17 -05:00
Zach Daniel
550a9c1424 chore: fix file name 2024-01-30 15:23:04 -05:00
Zach Daniel
9f748b5c55 test: update authorizer tests
fix: properly handle the case where all valid scenarios are pruned
2024-01-30 13:11:47 -05:00
Barnabas Jovanovics
406a076ef1
test: add test that shows expr condition does not work with access_type :strict (#858) 2024-01-30 12:53:23 -05:00
Zach Daniel
9e02b0d0c7 improvement: introduce require_atomic?, which defaults to false in 2.0, true in 3.0
fix: properly prevent the atomic handling of manual update actions
improvement: better support around the mixing of atomic and non atomic changes/validations
2024-01-30 12:32:41 -05:00
Zach Daniel
c02bced508 improvement: support loading and selecting in bulk operations 2024-01-29 14:29:50 -05:00
Dmitry Maganov
c40f762eee
fix: use correct option for relationship in atomic relate_actor (#855)
---------

Co-authored-by: Zach Daniel <zachary.s.daniel@gmail.com>
2024-01-27 09:53:03 -05:00