Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
vektah committed Jan 4, 2019
2 parents 473f4f0 + 3921636 commit f87ea6e
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 10 deletions.
4 changes: 2 additions & 2 deletions docs/content/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ exec:
filename: graph/generated/generated.go
package: generated

# Let gqlgen know where to the generated models (if any)
# Let gqlgen know where to put the generated models (if any)
model:
filename: models/generated.go
package: models

# Optional, turns on resolver stub generation
resolver:
filename: resolver.go # where to write them
type: Resolver # whats the resolver root implementation type called?
type: Resolver # what's the resolver root implementation type called?

# Optional, turns on binding to field names by tag provided
struct_tag: json
Expand Down
4 changes: 4 additions & 0 deletions docs/content/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,3 +286,7 @@ This magic comment tells `go generate` what command to run when we want to regen
```go
go generate ./...
```
> Note
>
> Ensure that the path to your `gqlgen` binary is relative to the file the generate command is added to.
10 changes: 5 additions & 5 deletions docs/content/reference/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ menu: { main: { parent: 'reference' } }

## Returning errors

All resolvers simply return an error to send it to the user. Its assumed that any error message returned
here is safe for users, if certain messages arent safe, customize the error presenter.
All resolvers simply return an error to be sent to the user. It's assumed that any error message returned
here is safe for users. If certain messages aren't safe, customise the error presenter.

### Multiple errors

Expand Down Expand Up @@ -63,8 +63,8 @@ They will be returned in the same order in the response, eg:

### The error presenter

All `errors` returned by resolvers, or from validation pass through a hook before being displayed to the user.
This hook gives you the ability to customize errors however makes sense in your app.
All `errors` returned by resolvers, or from validation, pass through a hook before being displayed to the user.
This hook gives you the ability to customise errors however makes sense in your app.

The default error presenter will capture the resolver path and use the Error() message in the response. It will
also call an Extensions() method if one is present to return graphql extensions.
Expand All @@ -85,7 +85,7 @@ server := handler.GraphQL(MakeExecutableSchema(resolvers),
)
```

This function will be called with the the same resolver context that threw generated it, so you can extract the
This function will be called with the the same resolver context that generated it, so you can extract the
current resolver path and whatever other state you might want to notify the client about.


Expand Down
4 changes: 2 additions & 2 deletions docs/layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{{ define "main" }}
<header>
<div class="content">
<h1>{{ .LinkTitle }}</h1>
<div class="description">{{ .Title }}</div>
<a class="header-link"
target="_blank"
href="https://github.com/99designs/gqlgen/blob/master/docs/content/{{.File.Path }}">
[edit]
</a>
<h1>{{ .LinkTitle }}</h1>
<div class="description">{{ .Title }}</div>
</div>
</header>

Expand Down
5 changes: 4 additions & 1 deletion docs/static/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ main {
}

.content {
position: relative;
grid-area: content;
max-width: 920px;
margin: auto;
Expand Down Expand Up @@ -149,7 +150,9 @@ h1 {
}

.header-link {
float: right;
position: absolute;
top: 0;
right: 0;
}

h2 {
Expand Down

0 comments on commit f87ea6e

Please sign in to comment.