Skip to content

Commit

Permalink
Merge pull request #1459 from aaronArinder/getting-started-server-sec…
Browse files Browse the repository at this point in the history
…tion

getting started: make running server own section
  • Loading branch information
MichaelJCompton committed Mar 15, 2021
2 parents 82a8e1b + 67e652a commit 52ded95
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/content/getting-started.md
Expand Up @@ -129,12 +129,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, starting with creating a todo:
```graphql
mutation createTodo {
createTodo(input: { text: "todo", userId: "1" }) {
Expand All @@ -145,7 +147,11 @@ mutation createTodo {
done
}
}
```

And then querying for it:

```graphql
query findTodos {
todos {
text
Expand Down

0 comments on commit 52ded95

Please sign in to comment.