diff --git a/CHANGELOG.md b/CHANGELOG.md index a74b4b2df8..b0c7ff1e9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -725,7 +725,7 @@ This reverts commits 64b882c3c9901f25edc0684ce2a1f9b63443416b and 670cf22272b490
5f5bfcb9 fix #2204 - don't try to embed builtin sources (#2214) -* dont't try to embed builtins +* don't try to embed builtins * add test @@ -3068,7 +3068,7 @@ Remove stale bot
34a442c7 Merge pull request #1399 from 99designs/prevent-possible-error-deadlock -Dont hold error lock when calling into error presenters +Don't hold error lock when calling into error presenters
@@ -6353,7 +6353,7 @@ duration of inactivity. - 693753fc Add websocket keepalive support -- 162afad7 enums dont exist in runtime +- 162afad7 enums don't exist in runtime
d0b6485b Merge pull request #525 from 99designs/stop-grc-panic @@ -8322,7 +8322,7 @@ Validate at end
b16e8429 Merge pull request #159 from vektah/enum-only-generation -Dont skip model generation if there are enums defined +Don't skip model generation if there are enums defined
diff --git a/TESTING.md b/TESTING.md index e5d49e8a9f..b8adadd649 100644 --- a/TESTING.md +++ b/TESTING.md @@ -36,5 +36,4 @@ npm install will write the schema to `integration/schema-fetched.graphql`, compare that with `schema-expected.graphql` -CI will run this and fail the build if the two files dont match. - +CI will run this and fail the build if the two files don't match. diff --git a/_examples/todo/todo.go b/_examples/todo/todo.go index 479b144399..ad3da2c392 100644 --- a/_examples/todo/todo.go +++ b/_examples/todo/todo.go @@ -50,7 +50,7 @@ func New() Config { } if ownable.Owner().ID != getUserId(ctx) { - return nil, fmt.Errorf("you dont own that") + return nil, fmt.Errorf("you don't own that") } } diff --git a/_examples/todo/todo_test.go b/_examples/todo/todo_test.go index 7423580f8c..a6cef4ac05 100644 --- a/_examples/todo/todo_test.go +++ b/_examples/todo/todo_test.go @@ -85,7 +85,7 @@ func TestTodo(t *testing.T) { } } err := c.Post(`mutation { updateTodo(id: 3, changes:{done:true}) { text, done } }`, &resp) - require.EqualError(t, err, "[{\"message\":\"you dont own that\",\"path\":[\"updateTodo\",\"done\"]}]") + require.EqualError(t, err, "[{\"message\":\"you don't own that\",\"path\":[\"updateTodo\",\"done\"]}]") require.Nil(t, resp.UpdateTodo) }) @@ -120,7 +120,7 @@ func TestTodo(t *testing.T) { } err := c.Post(`{ todo(id:3) { text, done } }`, &resp) - require.EqualError(t, err, `[{"message":"you dont own that","path":["todo","done"]}]`) + require.EqualError(t, err, `[{"message":"you don't own that","path":["todo","done"]}]`) require.Nil(t, resp.Todo) }) diff --git a/codegen/templates/import.go b/codegen/templates/import.go index 00a82ea5ef..50115283fb 100644 --- a/codegen/templates/import.go +++ b/codegen/templates/import.go @@ -45,7 +45,7 @@ func (s *Imports) Reserve(path string, aliases ...string) (string, error) { panic("empty ambient import") } - // if we are referencing our own package we dont need an import + // if we are referencing our own package we don't need an import if code.ImportPathForDir(s.destDir) == path { return "", nil } @@ -85,7 +85,7 @@ func (s *Imports) Lookup(path string) string { path = code.NormalizeVendor(path) - // if we are referencing our own package we dont need an import + // if we are referencing our own package we don't need an import if code.ImportPathForDir(s.destDir) == path { return "" } diff --git a/docs/content/getting-started.md b/docs/content/getting-started.md index 310ffbdcc6..42fee8eb9a 100644 --- a/docs/content/getting-started.md +++ b/docs/content/getting-started.md @@ -139,10 +139,10 @@ Returning to `graph/schema.resolvers.go`, let's implement the bodies of those au ```go func (r *mutationResolver) CreateTodo(ctx context.Context, input model.NewTodo) (*model.Todo, error) { - rand, _ := rand.Int(rand.Reader, big.NewInt(100)) + rand, _ := rand.Int(rand.Reader, big.NewInt(100)) todo := &model.Todo{ - Text: input.Text, - ID: fmt.Sprintf("T%d", rand), + Text: input.Text, + ID: fmt.Sprintf("T%d", rand), User: &model.User{ID: input.UserID, Name: "user " + input.UserID}, } r.todos = append(r.todos, todo) @@ -190,7 +190,7 @@ query findTodos { ### Don't eagerly fetch the user -This example is great, but in the real world fetching most objects is expensive. We dont want to load the User on the +This example is great, but in the real world fetching most objects is expensive. We don't want to load the User on the todo unless the user actually asked for it. So lets replace the generated `Todo` model with something slightly more realistic. diff --git a/docs/content/recipes/migration-0.11.md b/docs/content/recipes/migration-0.11.md index aaaa88f55e..de64f13797 100644 --- a/docs/content/recipes/migration-0.11.md +++ b/docs/content/recipes/migration-0.11.md @@ -117,7 +117,7 @@ Many of the old interfaces collapse down into just a few extension points: ![Anatomy of a request](/request_anatomy.png) -The tracing interface has also been removed, tracing stats are now measured in core (eg time to parse query) and made available on the operation/response contexts. Much of the old interface was designed so that users of a tracer dont need to know which extension points it was listening to, the new handler extensions have the same goal. +The tracing interface has also been removed, tracing stats are now measured in core (eg time to parse query) and made available on the operation/response contexts. Much of the old interface was designed so that users of a tracer don't need to know which extension points it was listening to, the new handler extensions have the same goal. ### Backward compatibility diff --git a/graphql/stats.go b/graphql/stats.go index a52e143ebe..31b9e6055b 100644 --- a/graphql/stats.go +++ b/graphql/stats.go @@ -12,7 +12,7 @@ type Stats struct { Parsing TraceTiming Validation TraceTiming - // Stats collected by handler extensions. Dont use directly, the extension should provide a type safe way to + // Stats collected by handler extensions. Don't use directly, the extension should provide a type safe way to // access this. extension map[string]interface{} } @@ -26,7 +26,7 @@ var ctxTraceStart key = "trace_start" // StartOperationTrace captures the current time and stores it in context. This will eventually be added to request // context but we want to grab it as soon as possible. For transports that can only handle a single graphql query -// per http requests you dont need to call this at all, the server will do it for you. For transports that handle +// per http requests you don't need to call this at all, the server will do it for you. For transports that handle // multiple (eg batching, subscriptions) this should be called before decoding each request. func StartOperationTrace(ctx context.Context) context.Context { return context.WithValue(ctx, ctxTraceStart, Now()) diff --git a/handler/handler.go b/handler/handler.go index 386b194627..19491020de 100644 --- a/handler/handler.go +++ b/handler/handler.go @@ -118,7 +118,7 @@ func ErrorPresenter(f graphql.ErrorPresenterFunc) Option { } } -// IntrospectionEnabled = false will forbid clients from calling introspection endpoints. Can be useful in prod when you dont +// IntrospectionEnabled = false will forbid clients from calling introspection endpoints. Can be useful in prod when you don't // want clients introspecting the full schema. // Deprecated: switch to graphql/handler.New func IntrospectionEnabled(enabled bool) Option { diff --git a/internal/code/packages.go b/internal/code/packages.go index c800d3d84f..31f8255934 100644 --- a/internal/code/packages.go +++ b/internal/code/packages.go @@ -151,7 +151,7 @@ func (p *Packages) NameForPackage(importPath string) string { pkg := p.packages[importPath] if pkg == nil { - // otherwise do a name only lookup for it but dont put it in the package cache. + // otherwise do a name only lookup for it but don't put it in the package cache. p.numNameCalls++ pkgs, err := packages.Load(&packages.Config{Mode: packages.NeedName}, importPath) if err != nil { diff --git a/main.go b/main.go index e0420d1502..af365bfeb9 100644 --- a/main.go +++ b/main.go @@ -12,13 +12,12 @@ import ( "os" "path/filepath" - "github.com/urfave/cli/v2" - "github.com/99designs/gqlgen/api" "github.com/99designs/gqlgen/codegen/config" "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/internal/code" "github.com/99designs/gqlgen/plugin/servergen" + "github.com/urfave/cli/v2" ) //go:embed init-templates/schema.graphqls