Commit graph

14 commits

Author SHA1 Message Date
Rebecca Le
261862948b
docs: Add upgrade note about changing api -> domain (#124) 2024-04-05 10:51:56 -04:00
Zach Daniel
180d05545c improvement!: auto? managed_relationships by default
imporovement!: remove deprecated configuration
2024-04-01 16:02:30 -04:00
Zach Daniel
91e163ddfd chore: format markdown 2024-04-01 15:29:19 -04:00
Zach Daniel
349086fbb8 improvement!: No longer automagically derive types 2024-04-01 15:27:43 -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
98baf6f0be
feat: allow providing descriptions for enum values (#117)
* chore: update ash to use Ash.Type.Enum descriptions

Contextually, remove an unreachable clause that caused dyalizer to fail,
see https://github.com/ash-project/ash/pull/873 for the commit that made
it unreachable

* feat: allow providing descriptions for enum values

If the module exports `graphql_describe_enum_value/1`, use that. Otherwise,
fallback to the Ash.Type.Enum value descriptions introduced in
https://github.com/ash-project/ash/pull/940.

Close #116
2024-03-25 23:43:59 -04:00
Zach Daniel
d7a49bc006 docs: add doc for use-subscriptions-with-graphql.md 2023-10-02 16:46:08 -04:00
Zach Daniel
ca2e5342ac fix: fix primary key delimiter verificatoin step
docs: improve docs on unions
2023-09-28 17:31:27 -04:00
Zach Daniel
000809b34f improvement: graphql_rename_value/1 for enums
docs: union guide & improved enum guide
2023-05-23 17:11:58 -04:00
Rebecca Le
5e87c52f9b
docs: Fix minor typos in headings (#53) 2023-01-23 22:42:11 -05:00
Barnabas Jovanovics
cf4dd38e39
docs: Fix constraints example in enum how_to (#51)
The Code Snippet gave me a compile error, telling me that `one_of` was not a valid options
2023-01-17 09:40:33 -05:00
James Harton
57e42cac6b
feat(AshGraphql.Plug): Support standard actor/tenant configuration. (#43) 2022-10-30 17:49:24 -04:00
Zach Daniel
9a3136fd5d improvement: remove stacktraces? option
improvement: add error handler
improvement: translatable error messages
docs: handle errors guide
2022-10-12 00:51:01 -04:00
Zach Daniel
f4cb9213b3 update to latest ash 2022-08-30 19:08:16 -06:00