ash_graphql/lib/resource/helpers.ex
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

19 lines
494 B
Elixir

defmodule AshGraphql.Resource.Helpers do
@moduledoc "Imported helpers for the graphql DSL section"
@doc """
A list of a given type, idiomatic for those used to `absinthe` notation.
"""
@spec list_of(v) :: {:array, v} when v: term()
def list_of(value) do
{:array, value}
end
@doc """
A non nullable type, idiomatic for those used to `absinthe` notation.
"""
@spec non_null(v) :: {:non_null, v} when v: term()
def non_null(value) do
{:non_null, value}
end
end