Skip to content

Commit

Permalink
Fix for #1274. (#2411)
Browse files Browse the repository at this point in the history
Co-authored-by: Chaitanya Maili <chaitanya.maili@pantheon.io>
  • Loading branch information
chaitanyamaili and chaitanyapantheor committed Nov 4, 2022
1 parent 906c0de commit 3087cf3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/content/getting-started.md
Expand Up @@ -139,9 +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))
todo := &model.Todo{
Text: input.Text,
ID: fmt.Sprintf("T%d", rand.Int()),
ID: fmt.Sprintf("T%d", rand),
User: &model.User{ID: input.UserID, Name: "user " + input.UserID},
}
r.todos = append(r.todos, todo)
Expand Down

0 comments on commit 3087cf3

Please sign in to comment.