ash_graphql/test/support/resources/constrained_map.ex
2023-05-15 09:39:32 -04:00

29 lines
578 B
Elixir

defmodule AshGraphql.Test.ConstrainedMap do
@moduledoc false
use Ash.Type.NewType,
subtype_of: :map,
constraints: [
fields: [
foo_bar: [
type: :string,
allow_nil?: false
],
baz: [
type: :integer
],
bam: [
type: :map,
constraints: [
fields: [
qux: [
type: :string
]
]
]
]
]
]
def graphql_type, do: :constrained_map
def graphql_input_type, do: :constrained_map_input
end