Commit graph

12 commits

Author SHA1 Message Date
Zach Daniel
8f04ef2e1e chore: set log level in dev 2024-05-13 12:43:13 -04:00
Zach Daniel
180d05545c improvement!: auto? managed_relationships by default
imporovement!: remove deprecated configuration
2024-04-01 16:02:30 -04:00
Riccardo Binetti
513c1ac68f
improvement!: port AshGraphql to Ash 3.0 (#123)
Step 1: update Ash

Step 2: mass rename Api to Domain

Step 3: Ash.Query.expr -> Ash.Expr.expr

Also change ref interpolation

Step 4: remove all warnings

Step 5: remove registries from tests

Step 6: fix filter

Step 7: private? -> !public?

Step 8: Ash.Calculation -> Ash.Resource.Calculation

Step 9: use depend_on_resources/1 -> resources/1

Step 10: add Domain to all resources

Step 11: use Ash module for all actions

Step 12: add public? true all around

Step 13: remove verbose? from options passed during Domain calls

Step 14: add simple_sat

Step 15: Ash.ErrorKind is no more, so remove code from errors

Step 16: sprinkle default_accept :* around tests

Step 17: replace Ash.Changeset.new/2 with Ash.Changeset.for_*

Step 18: calculation fixups

- Context is now a struct and arguments go under the arguments key
- Function based calculations receive a list of records
- Add a select to query-based loads
- select -> load

Step 19: pass the correct name to pass the policy in tests

Step 20: Ash.Query.new/2 is no more

Step 21: add AshGraphql.Resource.embedded? utility function

Use that instead of Ash.Type.embedded_type?(resource_or_type) since resources
are not types anymore

Step 22: handle struct + instance_of: Resource in unions

Resources are not type anymore so they need to be passed this way in unions

Step 23: ensure we only check GraphQL actions for pagination

All reads are now paginated by default, so this triggered a compilation error

Step 24: swap arguments for sort on calculations

Step 25: remove unused debug? option
2024-04-01 14:03:06 -04:00
Riccardo Binetti
8fff0d361d
improvement: make mutation arguments non-null (#111)
* improvement: make mutation arguments non-null

As discussed in #105 and #110, put this behind an opt-in configuration to avoid
breaking existing code.
The ID in update mutations is always non-null if non-null mutation arguments are
allowed, while input is non-null if it's allowed _and_ there is at least a
non-null field in the input.

Document the newly added config variable in the getting started guide.

* chore: enable non-null mutation arguments in tests
2024-01-31 17:52:01 -05:00
Zach Daniel
df989855ba chore: update test config 2023-07-13 08:49:34 -04:00
Zach Daniel
41e354e2d3 chore: update test config 2023-07-13 01:45:43 -04:00
Zach Daniel
1bea680af3 feat: change type name generation for managed relationships.
The current type name generation could result in clashes.
We now show a warning explaining how to fix these.
2023-03-21 21:17:53 -04:00
Zach Daniel
2a9baf8164 docs: update getting started guide to be clearer
We also properly link to and continue from the Ash getting started guide
2023-01-29 19:03:59 -05:00
Zach Daniel
9b27adb178 chore: add disable_async? in tests 2022-09-28 02:37:16 -04:00
Zach Daniel
9095a5ae45 improvement: add attribute_types and attribute_input_types
improvement: require configuration of datetime types
2022-09-22 13:31:40 -04:00
Maxim Martynov
cc5f3a31f2
fix: Handle error if multitenant resource was fetched without tenant being set (#33) 2022-05-11 12:45:49 -04:00
Zach Daniel
3a22d9d106
fix: include initial files 2020-08-13 18:58:03 -04:00