* 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
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).
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.
* 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.
An error occurs at compile time:
== Compilation error in file test/support/schema.ex ==
** (MatchError) no match of right hand side value: {:error, "Must provide field type for max"}
lib/resource/resource.ex:2278: AshGraphql.Resource.filterable?/2
(elixir 1.15.4) lib/enum.ex:4265: Enum.filter_list/2
(elixir 1.15.4) lib/enum.ex:4266: Enum.filter_list/2
lib/resource/resource.ex:2229: AshGraphql.Resource.aggregate_filter_fields/2
lib/resource/resource.ex:2195: AshGraphql.Resource.resource_filter_fields/2
lib/resource/resource.ex:1159: AshGraphql.Resource.args/5
lib/resource/resource.ex:425: anonymous fn/6 in AshGraphql.Resource.queries/5
(elixir 1.15.4) lib/enum.ex:1693: Enum."-map/2-lists^map/1-1-"/2
metadata on read actions is merged with the rest of the fields on the query, so must have a name unique from the attributes/calculations/aggregates.
The system will warn you if there is metadata on the underlying action that is being ignored, and will tell you how to fix it.