Closed skanderm closed 10 months ago
I believe you're looking for :list_of
, not :array
, since its absinthe terminology. With that said, you can also mark the calculation as allow_nil?: false
to get the type you're looking for I believe.
I believe you're looking for
:list_of
, not:array
, since its absinthe terminology. With that said, you can also mark the calculation asallow_nil?: false
to get the type you're looking for I believe.
Oh oops, that was a complete oversight. The allow_nil?: false
worked just fine, thank you!
Is your feature request related to a problem? Please describe. Hello! This may either be a bug or a feature request, but it seems I'm unable to update a calculation's graphql type through
attribute_types
.Describe the solution you'd like I'd like to wrap a calculation's type in a
non_null
. More specifically, I have a calculation with type{:array, {:array, {:array, :integer}}}
which translates to[[[Int!]!]!]
but I'd like one more non-null on the end there viaattribute_types {:non_null, {:array, {:array, {:array, :integer}}}}
.Describe alternatives you've considered I've tried creating a new Ash type using
use Ash.Type.NewType
but I ran into errors trying out a subtype of{:array, ...}
. Ditto with a fulluse Ash.Type
, where for some reason even the simplifieddef graphql_type(_), do: {:array, :integer}
even gave me this error:Express the feature either with a change to resource syntax, or with a change to the resource interface
For example