Commit graph

44 commits

Author SHA1 Message Date
Zach Daniel
01ca76da70 improvement: add igniter-backed installer 2024-07-15 14:25:40 -04:00
Barnabas Jovanovics
8089164d74
feat: argument_input_types (#176)
* feat: argument_input_types

* use mix task to update formatter.exs

* update CheatSheet
2024-06-10 13:32:37 -04:00
Riccardo Binetti
62940c31ec
feat: relationship pagination (#166) 2024-05-26 09:50:54 -04:00
Zach Daniel
a6ca7fea67 feat: support queries/mutations on the domain 2024-05-24 15:51:19 -04:00
Riccardo Binetti
833c1d5143
feat: allow passing custom descriptions to queries and mutations (#138)
Close #137
2024-04-29 15:01:26 -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
Dmitry Maganov
234f2d6d61
fix: add show_fields to spark_locals_without_parens in formatter (#122) 2024-03-28 10:54:28 -04:00
Riccardo Binetti
1c47c79081
chore: fix CI failures (#118)
* chore: regenerate formatter and cheatsheets for paginate_with

* chore: fix credo errors

Use pattern matching to remove an if level and invert the logic on the
if Credo was complaining about
2024-03-22 12:59:21 -04:00
Zach Daniel
d2343e5c54 chore: credo/remove inspects 2024-03-11 10:48:44 -04:00
Riccardo Binetti
66d2f44443
feat: add Relay ID translation in mutation and queries (#109)
Adds a new option for queries and mutations that defines which arguments or
attributes will use a global Relay ID and their type. This allows automatically
decoding them before hitting their action.

This paves the way to automatic translation derived from the arguments, which
will be implemented subsequently.

---------

Co-authored-by: Zach Daniel <zachary.s.daniel@gmail.com>
2024-02-06 09:46:09 -05:00
Zach Daniel
49c6534d73 improvement: generic action support
docs: better docs
2023-09-15 13:45:12 -04:00
bcksl
8223797dd6
feat: add filterable_fields to limit generated filters (#69) 2023-04-28 10:04:30 -04:00
Zach Daniel
79a7145c44 improvement: support hiding fields 2023-04-26 23:40:41 -04:00
Zach Daniel
e78a9f7926 improvement: add auto? true option for managed_relationships 2023-04-16 16:52:37 -04:00
Zach Daniel
d83dacae54 improvement: make filter & sort generation optional 2023-02-08 15:16:40 -05:00
Zach Daniel
4b90308173 chore: CI/dialyzer 2023-01-28 13:02:21 -05:00
Zach Daniel
1b3f43391d improvement: support ash tracers and telemetry in graphql 2022-11-22 13:27:53 -05:00
Zach Daniel
07e0c6170c improvement: split keyset_page_of and page_of types
improvement: add `start_keyset` and `end_keyset` to `keyset_page_of` type
improvement: add `count` to relay fields if there exists a countable relay query
2022-10-20 17:57:27 -04:00
Zach Daniel
3a11d988ab improvement: support encode_primary_key? false, and set single managed relationship primary keys do :id type when its true
closes #28
2022-10-12 19:02:04 -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
056e457522 improvement: support only exposing a subset of public relationships 2022-10-11 15:37:19 -04:00
Zach Daniel
7de4207de4 improvement: add upsert_identity option 2022-10-09 21:05:58 -04:00
Zach Daniel
92631f91b6 improvement: add options for remapping field/argument names
fix: use the dataloader for loading calculations, to allow for aliases
2022-09-26 00:12:10 -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
Michael St Clair
6fb99a3ab0
improvement: setup generate_object? setting on resource (#32) 2022-05-09 21:53:01 -04:00
Zach Daniel
f9b1b75edc feat: more configurable error behavior
added `root_level_errors?` and `show_raised_errors?`
2021-09-09 11:49:36 -04:00
Zach Daniel
d8a3e1b155 improvement: add groundwork for relay support 2021-08-03 18:56:08 -04:00
Zach Daniel
3a0b0c3f83 improvement: add as_mutation for queries
improvement: support `modify_resolution` for queries
2021-06-29 12:17:33 -04:00
Zach Daniel
020ad849ea improvement: add modify_resolution for mutations 2021-06-14 12:08:26 -04:00
Zach Daniel
77bf8788f5 improvement: log error stacktraces 2021-05-14 12:31:12 -04:00
Zach Daniel
5ecf8bf838 improvement: allow customizing identity/pkey on_lookup 2021-05-11 12:12:28 -04:00
Zach Daniel
019697578b feat: derived input objects for managed_relationships
fix: various input fixes (sorts)
improvement: support new style enums
2021-04-23 18:45:31 -04:00
Zach Daniel
4f71d69c5d improvement: support read_action config for updates and destroys
improvement: support `identity: false` for udpates and destroys
2021-04-19 15:26:20 -04:00
Zach Daniel
6ae8715a13 improvement: support upsert?: true flag on create 2021-04-05 14:41:16 -04:00
Zach Daniel
781ee4df19 chore: update formatter.exs 2021-04-05 10:37:50 -04:00
Michael St Clair
596dc90381
feat: add read_one query (#13) 2021-04-04 03:10:50 -04:00
Zach Daniel
7bde13efaf fix: fix .formatter.exs 2021-02-23 12:35:27 -05:00
Zach Daniel
a820beb474 feat: support embedded resources 2021-01-12 15:14:35 -05:00
Zach Daniel
37d0b6534d
feat: Support configuring identities (#8)
* feat: support using identities for gets
2020-11-18 02:14:33 -05:00
Zach Daniel
d5cf6ee3a0
feat: overhaul, better type support, pagination 2020-11-05 20:59:06 -05:00
Zach Daniel
2fc65976a7
chore: release version v0.1.0 2020-08-13 18:55:34 -04:00
Zach Daniel
705bbdd4ec
First stab at a schema 2020-05-01 18:35:12 -04:00
Zach Daniel
369f098cef
init 2020-05-01 12:32:56 -04:00