From 918801eac861c0ceb5cf45969745f674b823ef7c Mon Sep 17 00:00:00 2001 From: Ricardo Cuenca Date: Fri, 11 Dec 2020 19:21:22 -0600 Subject: [PATCH] Change 'Changeset' doc example to mutation --- docs/content/reference/changesets.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/reference/changesets.md b/docs/content/reference/changesets.md index 243ab30eb6a..329206ba5ef 100644 --- a/docs/content/reference/changesets.md +++ b/docs/content/reference/changesets.md @@ -9,7 +9,7 @@ Occasionally you need to distinguish presence from nil (undefined vs null). In g ```graphql -type Query { +type Mutation { updateUser(id: ID!, changes: UserChanges!): User } @@ -28,7 +28,7 @@ models: After running go generate you should end up with a resolver that looks like this: ```go -func (r *queryResolver) UpdateUser(ctx context.Context, id int, changes map[string]interface{}) (*User, error) { +func (r *mutationResolver) UpdateUser(ctx context.Context, id int, changes map[string]interface{}) (*User, error) { u := fetchFromDb(id) /// apply the changes saveToDb(u)