From 2cb878af796dee8dc4947958bab3eaae9402f2d5 Mon Sep 17 00:00:00 2001 From: Zach Daniel Date: Fri, 12 Mar 2021 09:19:19 -0500 Subject: [PATCH] docs: make the docs a bit clearer on schema oddities --- documentation/introduction/getting_started.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/documentation/introduction/getting_started.md b/documentation/introduction/getting_started.md index a16e732..2f25e4b 100644 --- a/documentation/introduction/getting_started.md +++ b/documentation/introduction/getting_started.md @@ -63,13 +63,12 @@ end If you don't have an absinthe schema, you can create one just for ash -If you don't have any queries or mutations in your schema, you may -need to add empty query and mutation blocks. If you have no mutations, -don't add an empty mutations block, same for queries. Additionally, -define a `context/1` function, and call `AshGraphql.add_context/2` with -the current context and your apis. Additionally, add the `Absinthe.Middleware.Dataloader` -to your plugins, as shown below. If you're starting fresh, just copy the schema below and -adjust the module name and api name. + +Define a `context/1` function, and call `AshGraphql.add_context/2` with the current context and your apis. Additionally, add the `Absinthe.Middleware.Dataloader` to your plugins, as shown below. If you're starting fresh, just copy the schema below and adjust the module name and api name. + +### Temporary workaround + +You will need an empty `query` block and `mutations` block in your schema, as shown below. If none of your resources define mutations, then leave the empty `mutations` block out. ```elixir defmodule MyApp.Schema do