From 31d339ab390a2c4119fec42c54edabebd96ef730 Mon Sep 17 00:00:00 2001 From: Aaron Arinder Date: Sun, 7 Feb 2021 14:53:54 -0500 Subject: [PATCH 1/2] getting started: make running server own section --- docs/content/getting-started.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/content/getting-started.md b/docs/content/getting-started.md index 99a3be3727..b7afd9e483 100644 --- a/docs/content/getting-started.md +++ b/docs/content/getting-started.md @@ -128,12 +128,14 @@ func (r *queryResolver) Todos(ctx context.Context) ([]*model.Todo, error) { } ``` +### Run the server + We now have a working server, to start it: ```bash go run server.go ``` -then open http://localhost:8080 in a browser. here are some queries to try: +Open http://localhost:8080 in a browser. Here are some queries to try: ```graphql mutation createTodo { createTodo(input:{text:"todo", userId:"1"}) { From 67e652ad974418a9f6fa9cfa4c97eebc3db910bf Mon Sep 17 00:00:00 2001 From: Aaron Arinder Date: Sun, 7 Feb 2021 14:57:18 -0500 Subject: [PATCH 2/2] getting started: separate example mutation/query --- docs/content/getting-started.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/content/getting-started.md b/docs/content/getting-started.md index b7afd9e483..083d1521b3 100644 --- a/docs/content/getting-started.md +++ b/docs/content/getting-started.md @@ -135,7 +135,7 @@ We now have a working server, to start it: go run server.go ``` -Open http://localhost:8080 in a browser. Here are some queries to try: +Open http://localhost:8080 in a browser. Here are some queries to try, starting with creating a todo: ```graphql mutation createTodo { createTodo(input:{text:"todo", userId:"1"}) { @@ -146,7 +146,11 @@ mutation createTodo { done } } +``` + +And then querying for it: +```graphql query findTodos { todos { text