Commit graph

611 commits

Author SHA1 Message Date
Barnabas Jovanovics
3526f87d7e test the arguments for the function predicats, allow type if the field has the right type 2024-02-08 13:39:08 +01:00
Barnabas Jovanovics
ed6f584429 create filter fields for predicate functions 2024-02-07 09:21:39 +01:00
Zach Daniel
3b77a40667 improvement: support data layer functions (ilike, like) 2024-02-06 09:26:13 +01:00
Zach Daniel
d00ae4e315 fix: define map input types w/ nested input types 2024-02-05 13:48:22 -05:00
Zach Daniel
099540c79e fix: handle nested constraint derivation in union/map types 2024-02-04 10:36:23 -05:00
Riccardo Binetti
6b09e7309e
improvement: make the items of fields and errors non-null (#112)
Last point left from the discussion on #105
2024-01-31 17:52:33 -05: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
Riccardo Binetti
af4193feca
improvement: make mutation results non-nullable (#110)
Adjust rool level error tests: since result is now non-nullable, if the content
of the result is nil, the whole result becomes nil. Note that this is not a
breaking change since GraphQL always allows a field nullability to propagate
upwards in case of a field error (see October 2021 spec, section 6.4.4).
2024-01-31 15:59:07 -05:00
Riccardo Binetti
afa4ae66a0
improvement: return a map from decode_relay_id/1 (#107)
Slight API improvement over #106.

This makes it more ergonomic to partially match on the return value (and it also
makes it more explicit by explicitly labeling the two parts).

Also add tests for relay id encoding/decoding.
2024-01-25 10:47:15 -05: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
7225d5fd28 test: test loading through w/ nil values 2024-01-21 12:06:48 -05:00
Zach Daniel
67fe4d64ec improvement: support latest ash 2024-01-19 00:13:39 -05:00
Zach Daniel
10d3d940cb chore: simplify docs generation 2024-01-12 14:53:43 -05:00
Zach Daniel
840230c110 chore: release version v0.26.9 2024-01-12 14:34:33 -05:00
Zach Daniel
067057b4db chore: update ex_doc 2024-01-12 14:34:15 -05:00
Zach Daniel
88aff4369d fix: properly transform not found errors 2023-12-05 16:44:21 -05:00
Zach Daniel
f83c447267 fix: respond with proper error on not found for get 2023-12-05 16:07:07 -05:00
Zach Daniel
51428483ef chore: raise error to help debugging 2023-12-05 15:32:47 -05:00
Zach Daniel
e16592f592 improvement: handle nil parent 2023-12-05 12:46:38 -05:00
Zach Daniel
896d5c8df3 chore: release version v0.26.8 2023-12-04 18:29:53 -05:00
Zach Daniel
c5163d4019 fix: fix dialyzer types for AshGraphql.Type 2023-12-04 18:29:30 -05:00
infinitis
4517a27f5f
fix: corrects spec for graphql_unnested_unions/1 (#103)
Co-authored-by: Alex Joss <alex.joss@coinbits.app>
2023-11-30 14:19:50 -05:00
Zach Daniel
e95c95282a fix: properly generate type for Ash.Type.DateTime 2023-11-28 17:32:31 -05:00
Barnabas Jovanovics
772e3851ce
test: add better regression test (#101) 2023-11-24 07:24:27 -05:00
Zach Daniel
a5583ff8dc chore: release version v0.26.7 2023-11-24 05:39:03 -05:00
Barnabas Jovanovics
b9a3051e88
fix: make sure generic actions are authorized (#100) 2023-11-24 05:29:01 -05:00
Zach Daniel
c1845b2225 chore: cheat sheets 2023-11-13 23:23:54 -05:00
Zach Daniel
cb87e6f4f6 chore: format/credo 2023-11-13 23:23:27 -05:00
Zach Daniel
e66a3ef4b8 fix: properly generate first aggregates with correct destination type 2023-11-13 23:02:57 -05:00
Zach Daniel
2cf5b60f63 improvement: support latest ash aggregate constraints 2023-11-13 16:53:21 -05:00
Zach Daniel
1401de6727 fix: pass context into loading and generate related query with it 2023-10-27 00:29:03 -04:00
Zach Daniel
a33e4f5b77 improvement: support define_relay_types?: false 2023-10-15 21:12:13 -04:00
Jake Demarest-Mays
0e4ac7130c
docs: Removed mention of Context and Dataloader in Getting Started with Graphql (#96) 2023-10-12 11:24:47 -04:00
Zach Daniel
65778a1e1f chore: release version v0.26.6 2023-10-06 13:52:54 -04:00
Barnabas Jovanovics
34fd313901
improvement: make the node in relay edges non-null (#95)
* make the node in relay edges non-null

* make the edge non-null too

* fix edge type
2023-10-03 13:48:27 -04:00
Zach Daniel
58a038e609 fix: generic action mutations need to use the input object 2023-10-02 19:44:19 -04:00
Zach Daniel
d7a49bc006 docs: add doc for use-subscriptions-with-graphql.md 2023-10-02 16:46:08 -04:00
Zach Daniel
d485f5378f chore: release version v0.26.5 2023-10-02 14:52:51 -04:00
Zach Daniel
cdb8cf7b7f fix: don't access .pagination on generic action 2023-10-02 14:47:31 -04:00
Zach Daniel
a67462c07f chore: only gather analytics on hexdocs.pm 2023-10-02 10:57:29 -04:00
Zach Daniel
b3ac663cfe chore: analytics in hexdocs 2023-10-02 08:35:53 -04:00
Zach Daniel
07296a5ef5 chore: release version v0.26.4 2023-10-01 09:53:27 -04:00
Tun Cham Roeun
4c86d31885
improvement: Add a top-level NOT filter, along with AND and OR filters. (#94) 2023-10-01 09:51:42 -04:00
Zach Daniel
46cd22db0d chore: release version v0.26.3 2023-09-28 17:31:54 -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
c6db0fce48 improvement: add AshGraphql.Type 2023-09-28 15:47:03 -04:00
Zach Daniel
b58503322b docs: update spark/ash for docs improvements 2023-09-26 23:21:57 -04:00
Zach Daniel
fc3423b45a improvement: optimize union type resolver compile time logic 2023-09-20 09:21:44 -04:00
Zach Daniel
842e433f9f fix: don't include related fields in managed relationship inputs 2023-09-19 12:49:05 -04:00
Zach Daniel
ec3b747667 chore: release version v0.26.2 2023-09-17 19:34:56 -04:00