Commit graph

16 commits

Author SHA1 Message Date
Col
7ec1cfe84e
improvement: Implement AshGraphql.Error for Ash.Error.Query.ReadActionRequiresActor (#154) 2024-05-23 08:58:58 -04:00
Zach Daniel
78c5b6a3bb chore: update errors and deps 2024-04-01 14:13:48 -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
365b3aedc6
feat: Relay refetching support (#106)
* feat: add support for relay global IDs

* improvement: use the GraphQL type when projecting fields

This allows picking also up fields coming from fragments in queries returning an
interface

* feat: add relay node query

Allow retrieving a resource implementing the Node interface given its Relay
global id.
2024-01-24 14:59:12 -05:00
Zach Daniel
fe85aab53a fix: properly display forbidden field errors
fixes #84
2023-07-13 09:23:17 -04:00
Zach Daniel
e7f7cfc133 fix: ensure forbidden errors always use forbidden code 2023-06-05 17:19:49 -04:00
Zach Daniel
839bdcb126 improvement: unwrap forbidden errors, instead of reporting on the whole 2023-01-27 17:11:36 -05:00
Yousef Janajri
1985bfc497
improvement: Add Ash.Error.Changes.InvalidChanges AshGraphql implementation (#46) 2022-11-01 22:08:35 -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
Maxim Martynov
e40e7c573c
improvement: Implement GraphQL Relay support (#36) 2022-09-20 23:07:30 -04:00
Zach Daniel
598e9c5616 improvement: handle Page.InvalidKeyset error 2022-05-30 16:46:20 -04:00
Frank Dugan III
13c2abe11a
feat: add policy breakdowns option (#35) 2022-05-24 16:42:40 -04:00
Zach Daniel
dffe4de9f5 improvement: update to latest rc
improvement: add `short_message` and `vars` to errors
2021-06-28 13:33:01 -04:00
Zach Daniel
6be5c593cd fix: proper not found errors 2021-04-16 13:49:51 -04:00
Zach Daniel
6b84bf0f46 fix: detect all embeddable types in arguments and nested
fix: detect enums in embeddable types and arguments
fix: error messages for `InvalidArgument`
improvement: log on unrenderable error messages
fix: store refs in graphql blueprint to fix error messages
improvement: update to latest ash
2021-04-13 17:49:10 -04:00
Zach Daniel
9151b712f1 improvement: start on error messaging groundwork
fix: properly handle relationship changes on updates
2021-03-15 15:51:17 -04:00