Skip to content

Commit

Permalink
improvement: generic action support
Browse files Browse the repository at this point in the history
docs: better docs
  • Loading branch information
zachdaniel committed Sep 15, 2023
1 parent 0ec7625 commit 49c6534
Show file tree
Hide file tree
Showing 24 changed files with 1,111 additions and 229 deletions.
3 changes: 2 additions & 1 deletion .check.exs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
## ...or adjusted (e.g. use one-line formatter for more compact credo output)
# {:credo, "mix credo --format oneline"},

{:check_formatter, command: "mix spark.formatter --check"}
{:check_formatter, command: "mix spark.formatter --check"},
{:doctor, false}

## custom new tools may be added (mix tasks or arbitrary commands)
# {:my_mix_task, command: "mix release", env: %{"MIX_ENV" => "prod"}},
Expand Down
2 changes: 2 additions & 0 deletions .formatter.exs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
spark_locals_without_parens = [
action: 2,
action: 3,
allow_nil?: 1,
argument_names: 1,
as_mutation?: 1,
Expand Down
37 changes: 37 additions & 0 deletions documentation/dsls/DSL:-AshGraphql.Api.cheatmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# DSL: AshGraphql.Api

The entrypoint for adding graphql behavior to an Ash API


## graphql
Global configuration for graphql




### Examples
```
graphql do
authorize? false # To skip authorization for this API
end

```




### Options
| Name | Type | Default | Docs |
| --- | --- | --- | --- |
| `authorize?` | `boolean` | true | Whether or not to perform authorization for this API |
| `tracer` | `atom` | | A tracer to use to trace execution in the graphql. Will use `config :ash, :tracer` if it is set. |
| `root_level_errors?` | `boolean` | false | By default, mutation errors are shown in their result object's errors key, but this setting places those errors in the top level errors list |
| `error_handler` | `mfa` | {AshGraphql.DefaultErrorHandler, :handle_error, []} | Set an MFA to intercept/handle any errors that are generated. |
| `show_raised_errors?` | `boolean` | false | For security purposes, if an error is *raised* then Ash simply shows a generic error. If you want to show those errors, set this to true. |
| `debug?` | `boolean` | false | Whether or not to log (extremely verbose) debug information |






Loading

0 comments on commit 49c6534

Please sign in to comment.