mirror of
https://github.com/ash-project/ash_graphql.git
synced 2024-09-20 05:13:33 +12:00
docs: minor doc updates (#142)
This commit is contained in:
parent
d223372496
commit
c015030dc5
2 changed files with 6 additions and 6 deletions
|
@ -2,7 +2,7 @@ defmodule AshGraphql.Domain do
|
||||||
@graphql %Spark.Dsl.Section{
|
@graphql %Spark.Dsl.Section{
|
||||||
name: :graphql,
|
name: :graphql,
|
||||||
describe: """
|
describe: """
|
||||||
Global configuration for graphql
|
Domain level configuration for GraphQL
|
||||||
""",
|
""",
|
||||||
examples: [
|
examples: [
|
||||||
"""
|
"""
|
||||||
|
@ -47,7 +47,7 @@ defmodule AshGraphql.Domain do
|
||||||
@sections [@graphql]
|
@sections [@graphql]
|
||||||
|
|
||||||
@moduledoc """
|
@moduledoc """
|
||||||
The entrypoint for adding graphql behavior to an Ash domain
|
The entrypoint for adding GraphQL behavior to an Ash domain
|
||||||
"""
|
"""
|
||||||
|
|
||||||
require Ash.Domain.Info
|
require Ash.Domain.Info
|
||||||
|
|
|
@ -3,7 +3,7 @@ defmodule AshGraphql.Domain.Info do
|
||||||
|
|
||||||
alias Spark.Dsl.Extension
|
alias Spark.Dsl.Extension
|
||||||
|
|
||||||
@doc "Wether or not to run authorization on this domain"
|
@doc "Whether or not to run authorization on this domain"
|
||||||
def authorize?(domain) do
|
def authorize?(domain) do
|
||||||
Extension.get_opt(domain, [:graphql], :authorize?, true)
|
Extension.get_opt(domain, [:graphql], :authorize?, true)
|
||||||
end
|
end
|
||||||
|
@ -16,12 +16,12 @@ defmodule AshGraphql.Domain.Info do
|
||||||
|> Enum.concat(List.wrap(Application.get_env(:ash, :tracer)))
|
|> Enum.concat(List.wrap(Application.get_env(:ash, :tracer)))
|
||||||
end
|
end
|
||||||
|
|
||||||
@doc "Wether or not to surface errors to the root of the response"
|
@doc "Whether or not to surface errors to the root of the response"
|
||||||
def root_level_errors?(domain) do
|
def root_level_errors?(domain) do
|
||||||
Extension.get_opt(domain, [:graphql], :root_level_errors?, false, true)
|
Extension.get_opt(domain, [:graphql], :root_level_errors?, false, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
@doc "An error handler for errors produced by domain"
|
@doc "An error handler for errors produced by the domain"
|
||||||
def error_handler(domain) do
|
def error_handler(domain) do
|
||||||
Extension.get_opt(
|
Extension.get_opt(
|
||||||
domain,
|
domain,
|
||||||
|
@ -32,7 +32,7 @@ defmodule AshGraphql.Domain.Info do
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
@doc "Wether or not to render raised errors in the graphql response"
|
@doc "Whether or not to render raised errors in the GraphQL response"
|
||||||
def show_raised_errors?(domain) do
|
def show_raised_errors?(domain) do
|
||||||
Extension.get_opt(domain, [:graphql], :show_raised_errors?, false, true)
|
Extension.get_opt(domain, [:graphql], :show_raised_errors?, false, true)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue