Skip to content

Commit

Permalink
Merge pull request 99designs#801 from Schparky/patch-1
Browse files Browse the repository at this point in the history
Documentation: getting-started edits
  • Loading branch information
vektah authored Aug 7, 2019
2 parents 70ccb3f + 8151245 commit e476fed
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/content/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ $ go mod init github.com/[username]/gqlgen-todos
### Define the schema

gqlgen is a schema-first library — before writing code, you describe your API using the GraphQL
[Schema Definition Language](http://graphql.org/learn/schema/). This usually goes into a file called `schema.graphql`:
[Schema Definition Language](http://graphql.org/learn/schema/). This usually goes into a file called `schema.graphql`. A basic example as follows will be generated by the `init` command:

```graphql
type Todo {
Expand Down Expand Up @@ -102,7 +102,7 @@ models:
Regenerate by running:
```bash
$ go run github.com/99designs/gqlgen
$ go run github.com/99designs/gqlgen -v
```

> Note
Expand Down Expand Up @@ -195,7 +195,7 @@ func (r *mutationResolver) CreateTodo(ctx context.Context, input NewTodo) (*Todo

type queryResolver struct{ *Resolver }

func (r *queryResolver) Todos(ctx context.Context) ([]Todo, error) {
func (r *queryResolver) Todos(ctx context.Context) ([]*Todo, error) {
return r.todos, nil
}

Expand Down Expand Up @@ -237,7 +237,7 @@ query findTodos {

## Finishing touches

At the top of our `resolver.go` add the following line:
At the top of our `resolver.go`, between `package` and `import`, add the following line:

```go
//go:generate go run github.com/99designs/gqlgen
Expand Down

0 comments on commit e476fed

Please sign in to comment.