mirror of
https://github.com/ash-project/ash_graphql.git
synced 2024-09-20 13:24:14 +12:00
33 lines
614 B
Elixir
33 lines
614 B
Elixir
|
defmodule AshGraphql.Resource.Query do
|
||
|
defstruct [:name, :action, :type]
|
||
|
|
||
|
@get_schema [
|
||
|
name: [
|
||
|
type: :atom,
|
||
|
doc: "The name to use for the query.",
|
||
|
default: :get
|
||
|
],
|
||
|
action: [
|
||
|
type: :atom,
|
||
|
doc: "The action to use for the query.",
|
||
|
required: true
|
||
|
]
|
||
|
]
|
||
|
|
||
|
@list_schema [
|
||
|
name: [
|
||
|
type: :atom,
|
||
|
doc: "The name to use for the query.",
|
||
|
default: :list
|
||
|
],
|
||
|
action: [
|
||
|
type: :atom,
|
||
|
doc: "The action to use for the query.",
|
||
|
required: true
|
||
|
]
|
||
|
]
|
||
|
|
||
|
def get_schema, do: @get_schema
|
||
|
def list_schema, do: @list_schema
|
||
|
end
|