absinthe: update formatting
This commit is contained in:
parent
fed977fdfd
commit
dc463af7cf
|
@ -97,10 +97,11 @@ This defines a type `:post`, which is used by the resolver.
|
||||||
|
|
||||||
### Query arguments
|
### Query arguments
|
||||||
|
|
||||||
|
#### GraphQL query
|
||||||
|
|
||||||
```
|
```
|
||||||
{ user(id: "1") { ··· } }
|
{ user(id: "1") { ··· } }
|
||||||
```
|
```
|
||||||
{: .-setup}
|
|
||||||
|
|
||||||
#### web/schema.ex
|
#### web/schema.ex
|
||||||
|
|
||||||
|
@ -116,7 +117,7 @@ end
|
||||||
|
|
||||||
#### Resolver
|
#### Resolver
|
||||||
|
|
||||||
```
|
```elixir
|
||||||
def find(%{id: id} = args, _info) do
|
def find(%{id: id} = args, _info) do
|
||||||
···
|
···
|
||||||
end
|
end
|
||||||
|
@ -127,6 +128,8 @@ See: [Query arguments](http://absinthe-graphql.org/tutorial/query-arguments/)
|
||||||
|
|
||||||
### Mutations
|
### Mutations
|
||||||
|
|
||||||
|
#### GraphQL query
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
mutation CreatePost {
|
mutation CreatePost {
|
||||||
|
@ -134,7 +137,6 @@ See: [Query arguments](http://absinthe-graphql.org/tutorial/query-arguments/)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
{: .-setup}
|
|
||||||
|
|
||||||
#### web/schema.ex
|
#### web/schema.ex
|
||||||
|
|
||||||
|
@ -147,6 +149,7 @@ mutation do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
{: data-line="1"}
|
||||||
|
|
||||||
See: [Mutations](http://absinthe-graphql.org/tutorial/mutations/)
|
See: [Mutations](http://absinthe-graphql.org/tutorial/mutations/)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue