mirror of
https://github.com/ash-project/ash_graphql.git
synced 2024-09-20 13:24:14 +12:00
Updated documentation on Connect your schema - Using Plug (#6)
This commit is contained in:
parent
77566d96c4
commit
d427e39d15
1 changed files with 8 additions and 4 deletions
|
@ -93,12 +93,16 @@ adding plug to your application.
|
||||||
Then you can use a `Plug.Router` and [forward](https://hexdocs.pm/plug/Plug.Router.html#forward/2) to your plugs similar to how it is done for phoenix:
|
Then you can use a `Plug.Router` and [forward](https://hexdocs.pm/plug/Plug.Router.html#forward/2) to your plugs similar to how it is done for phoenix:
|
||||||
|
|
||||||
```elixir
|
```elixir
|
||||||
forward "/gql", Absinthe.Plug, schema: YourSchema
|
forward "/gql",
|
||||||
|
to: Absinthe.Plug,
|
||||||
|
init_opts: [schema: YourSchema]
|
||||||
|
|
||||||
forward "/playground",
|
forward "/playground",
|
||||||
Absinthe.Plug.GraphiQL,
|
to: Absinthe.Plug.GraphiQL,
|
||||||
schema: YourSchema
|
init_opts: [
|
||||||
|
schema: YourSchema,
|
||||||
interface: :playground
|
interface: :playground
|
||||||
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Using Phoenix
|
### Using Phoenix
|
||||||
|
|
Loading…
Reference in a new issue