mirror of
https://github.com/ash-project/ash_graphql.git
synced 2024-09-20 13:24:14 +12:00
13 lines
448 B
Markdown
13 lines
448 B
Markdown
|
# JSON
|
||
|
|
||
|
AshGraphql provides two json types that may be used. They are the same except for how the type is serialized in responses.
|
||
|
|
||
|
- `:json_string` - serializes the json to a string, e.g `"{\"foo\":1}"`
|
||
|
- `:json` - leaves the json as an object, e.g `{foo: 1}`
|
||
|
|
||
|
By default, `:json_string` is used. The configuration for this is (uncharacteristically) placed in application config, for example:
|
||
|
|
||
|
```elixir
|
||
|
config :ash_graphql, :json_type, :json
|
||
|
```
|