mirror of
https://github.com/ash-project/ash_graphql.git
synced 2024-09-20 05:13:33 +12:00
9095a5ae45
improvement: require configuration of datetime types
19 lines
494 B
Elixir
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
|