From ada1b928096db2d4cff8d476e62d8a84c41da47e Mon Sep 17 00:00:00 2001 From: Aaron Arinder Date: Sun, 7 Feb 2021 14:40:35 -0500 Subject: [PATCH 1/3] getting started: updating wording around implementing unimpl fns --- docs/content/getting-started.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/content/getting-started.md b/docs/content/getting-started.md index 99a3be37270..821efe02669 100644 --- a/docs/content/getting-started.md +++ b/docs/content/getting-started.md @@ -103,14 +103,15 @@ func (r *queryResolver) Todos(ctx context.Context) ([]*model.Todo, error) { We just need to implement these two methods to get our server working: -First we need somewhere to track our state, lets put it in `graph/resolver.go`: +First we need somewhere to track our state, lets put it in `graph/resolver.go`. `graph/resolver.go` is where we declare any dependencies for our app, like our database. It gets initialized once in `server.go` when we create the graph. + ```go type Resolver struct{ todos []*model.Todo } ``` -This is where we declare any dependencies for our app like our database, it gets initialized once in `server.go` when -we create the graph. + +Returning to `graph/schema.resolvers.go`, let's implement our unimplemented function bodies: ```go func (r *mutationResolver) CreateTodo(ctx context.Context, input model.NewTodo) (*model.Todo, error) { From 5b2531aee84fa4f971ea83c083f7113b2d6b7c6e Mon Sep 17 00:00:00 2001 From: Aaron Arinder Date: Sun, 7 Feb 2021 14:43:34 -0500 Subject: [PATCH 2/3] getting started: wording update --- docs/content/getting-started.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/getting-started.md b/docs/content/getting-started.md index 821efe02669..7e002273352 100644 --- a/docs/content/getting-started.md +++ b/docs/content/getting-started.md @@ -103,7 +103,7 @@ func (r *queryResolver) Todos(ctx context.Context) ([]*model.Todo, error) { We just need to implement these two methods to get our server working: -First we need somewhere to track our state, lets put it in `graph/resolver.go`. `graph/resolver.go` is where we declare any dependencies for our app, like our database. It gets initialized once in `server.go` when we create the graph. +First we need somewhere to track our state, lets put it in `graph/resolver.go`. The `graph/resolver.go` file is where we declare our app's dependencies, like our database. It gets initialized once in `server.go` when we create the graph. ```go type Resolver struct{ @@ -111,7 +111,7 @@ type Resolver struct{ } ``` -Returning to `graph/schema.resolvers.go`, let's implement our unimplemented function bodies: +Returning to `graph/schema.resolvers.go`, let's implement the bodies of our automatically generated resolver functions: ```go func (r *mutationResolver) CreateTodo(ctx context.Context, input model.NewTodo) (*model.Todo, error) { From aa531ed87f327f0e03d243744a5f5e810d5c1230 Mon Sep 17 00:00:00 2001 From: Aaron Arinder Date: Sun, 7 Feb 2021 14:44:19 -0500 Subject: [PATCH 3/3] getting started: more wording updates --- docs/content/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/getting-started.md b/docs/content/getting-started.md index 7e002273352..caa63c10890 100644 --- a/docs/content/getting-started.md +++ b/docs/content/getting-started.md @@ -111,7 +111,7 @@ type Resolver struct{ } ``` -Returning to `graph/schema.resolvers.go`, let's implement the bodies of our automatically generated resolver functions: +Returning to `graph/schema.resolvers.go`, let's implement the bodies of those automatically generated resolver functions: ```go func (r *mutationResolver) CreateTodo(ctx context.Context, input model.NewTodo) (*model.Todo, error) {