mirror of
https://github.com/ash-project/ash_graphql.git
synced 2024-09-21 05:43:28 +12:00
29 lines
578 B
Elixir
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
|