ash_graphql/documentation/dsls/DSL:-AshGraphql.Api.cheatmd

167 lines
3.7 KiB
Text
Raw Normal View History

<!--
This file was generated by Spark. Do not edit it by hand.
-->
# 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
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th colspan=2>Docs</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<a id="graphql-authorize?" href="#graphql-authorize?">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
authorize?
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">boolean</code>
</td>
<td style="text-align: left">
<code class="inline">true</code>
</td>
<td style="text-align: left" colspan=2>
Whether or not to perform authorization for this API
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="graphql-tracer" href="#graphql-tracer">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
tracer
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">atom</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
A tracer to use to trace execution in the graphql. Will use `config :ash, :tracer` if it is set.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="graphql-root_level_errors?" href="#graphql-root_level_errors?">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
root_level_errors?
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">boolean</code>
</td>
<td style="text-align: left">
<code class="inline">false</code>
</td>
<td style="text-align: left" colspan=2>
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
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="graphql-error_handler" href="#graphql-error_handler">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
error_handler
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">mfa</code>
</td>
<td style="text-align: left">
<code class="inline">{AshGraphql.DefaultErrorHandler, :handle_error, []}</code>
</td>
<td style="text-align: left" colspan=2>
Set an MFA to intercept/handle any errors that are generated.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="graphql-show_raised_errors?" href="#graphql-show_raised_errors?">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
show_raised_errors?
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">boolean</code>
</td>
<td style="text-align: left">
<code class="inline">false</code>
</td>
<td style="text-align: left" colspan=2>
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.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="graphql-debug?" href="#graphql-debug?">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
debug?
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">boolean</code>
</td>
<td style="text-align: left">
<code class="inline">false</code>
</td>
<td style="text-align: left" colspan=2>
Whether or not to log (extremely verbose) debug information
</td>
</tr>
</tbody>
</table>