mirror of
https://github.com/ash-project/ash_graphql.git
synced 2024-09-20 13:24:14 +12:00
20 lines
494 B
Elixir
20 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
|