Repository: Khan/genqlient
Pull request #291 (2023-07-31 20:09:45)

bugfix: local variable 'data' colliding with argument name
This PR makes [THIS ISSUE](https://github.com/Khan/genqlient/issues/279) a lot less likely to occur. 
The local name "data" in generated functions was colliding with arguments called "data". 

Note that no explicit name collision check was added, but "data" inside the function was just renamed to "data_" to make it less likely to collide with arguments.

I have:
- [x] Written a clear PR title and description (above)
- [x] Signed the [Khan Academy CLA](https://www.khanacademy.org/r/cla)
- [x] Added tests covering my changes, if applicable
- [x] Included a link to the issue fixed, if applicable
- [ ] Included documentation, for new features
- [x] Added an entry to the changelog


zholti: > @benjaminjkraft should weigh in too, bit it seems like a good idea to me! Can you add the underscore to all vars, not just`data`?

Did that for the local "err" as well. The collision with query/mutation args affects only this template as far as I can see. Which other vars in which templates can be affected?
csilvers: I could see you passing in a var called `client` to say which client to use. But I agree we don't have to handle it now if it's user facing 
zholti: > I could see you passing in a var called `client` to say which client to use. But I agree we don't have to handle it now if it's user facing

Passing a client is already there, no? Depending on Config.ClientGetter, either the one passed as arg or the local one will be constructed.

But you do have a point - no matter if the client is passed or constructed, an arg called "client" will collide with it in both cases.
zholti: > As far as I can tell this is the only template that uses user-defined variable names. To be complete we should do the same for `req` and `resp`. If you get a chance to do that that would be great. (In theory we should also do `ctx` and `client`, but since those are user-visible, I'd prefer if we can change them only if needed. And they're probably less likely names to conflict with, since context is a Go thing and how would you pass a client over GraphQL.)

In my latest commit, I renamed client to client_, since I can imagine that there might be schemas with fields taking such an arg. Should I also do the same treatment on ctx? This is less likely to collide with argument names, but still...
benjaminjkraft: If we're gonna do `client_`, we may as well do the same for `ctx_`!

Patch:
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index f0199ee..bec20ef 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -29,6 +29,7 @@ When releasing a new version:
 
 ### Bug fixes:
 - The presence of negative pointer directives, i.e., `# @genqlient(pointer: false)` are now respected even in the when `optional: pointer` is set in the configuration file.
+- Made name collisions between query/mutation arguments and local function variables less likely.
 
 ## v0.6.0
 
diff --git a/example/generated.go b/example/generated.go
index 7c1c0f3..c13d33b 100644
--- a/example/generated.go
+++ b/example/generated.go
@@ -81,29 +81,29 @@ query getUser ($Login: String!) {
 
 // getUser gets the given user's name from their username.
 func getUser(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 	Login string,
 ) (*getUserResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "getUser",
 		Query:  getUser_Operation,
 		Variables: &__getUserInput{
 			Login: Login,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data getUserResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ getUserResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
 // The query or mutation executed by getViewer.
@@ -117,23 +117,23 @@ query getViewer {
 `
 
 func getViewer(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 ) (*getViewerResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "getViewer",
 		Query:  getViewer_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data getViewerResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ getViewerResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
diff --git a/generate/operation.go.tmpl b/generate/operation.go.tmpl
index 48221cd..a89b83c 100644
--- a/generate/operation.go.tmpl
+++ b/generate/operation.go.tmpl
@@ -4,10 +4,10 @@ const {{.Name}}_Operation = `{{$.Body}}`
 {{.Doc}}
 func {{.Name}}(
     {{if ne .Config.ContextType "-" -}}
-    ctx {{ref .Config.ContextType}},
+    ctx_ {{ref .Config.ContextType}},
     {{end}}
     {{- if not .Config.ClientGetter -}}
-    client {{ref "github.com/Khan/genqlient/graphql.Client"}},
+    client_ {{ref "github.com/Khan/genqlient/graphql.Client"}},
     {{end}}
     {{- if .Input -}}
     {{- range .Input.Fields -}}
@@ -16,7 +16,7 @@ func {{.Name}}(
     {{end -}}
     {{end -}}
 ) (*{{.ResponseName}}, {{if .Config.Extensions -}}map[string]interface{},{{end}} error) {
-    req := &graphql.Request{
+    req_ := &graphql.Request{
         OpName: "{{.Name}}",
         Query:  {{.Name}}_Operation,
     {{if .Input -}}
@@ -27,23 +27,23 @@ func {{.Name}}(
         },
     {{end -}}
     }
-    var err error
+    var err_ error
     {{if .Config.ClientGetter -}}
-    var client graphql.Client
+    var client_ graphql.Client
 
-    client, err = {{ref .Config.ClientGetter}}({{if ne .Config.ContextType "-"}}ctx{{else}}{{end}})
-    if err != nil {
-        return nil, {{if .Config.Extensions -}}nil,{{end -}} err
+    client_, err_ = {{ref .Config.ClientGetter}}({{if ne .Config.ContextType "-"}}ctx_{{else}}{{end}})
+    if err_ != nil {
+        return nil, {{if .Config.Extensions -}}nil,{{end -}} err_
     }
     {{end}}
-    var data {{.ResponseName}}
-    resp := &graphql.Response{Data: &data}
+    var data_ {{.ResponseName}}
+    resp_ := &graphql.Response{Data: &data_}
 
-    err = client.MakeRequest(
-        {{if ne .Config.ContextType "-"}}ctx{{else}}nil{{end}},
-        req,
-        resp,
+    err_ = client_.MakeRequest(
+        {{if ne .Config.ContextType "-"}}ctx_{{else}}nil{{end}},
+        req_,
+        resp_,
     )
 	
-    return &data, {{if .Config.Extensions -}}resp.Extensions,{{end -}} err
+    return &data_, {{if .Config.Extensions -}}resp_.Extensions,{{end -}} err_
 }
diff --git a/internal/integration/generated.go b/internal/integration/generated.go
index bce3bf0..1f0e079 100644
--- a/internal/integration/generated.go
+++ b/internal/integration/generated.go
@@ -3089,29 +3089,29 @@ mutation createUser ($user: NewUser!) {
 `
 
 func createUser(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 	user NewUser,
 ) (*createUserResponse, map[string]interface{}, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "createUser",
 		Query:  createUser_Operation,
 		Variables: &__createUserInput{
 			User: user,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data createUserResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ createUserResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, resp.Extensions, err
+	return &data_, resp_.Extensions, err_
 }
 
 // The query or mutation executed by failingQuery.
@@ -3125,25 +3125,25 @@ query failingQuery {
 `
 
 func failingQuery(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 ) (*failingQueryResponse, map[string]interface{}, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "failingQuery",
 		Query:  failingQuery_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data failingQueryResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ failingQueryResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, resp.Extensions, err
+	return &data_, resp_.Extensions, err_
 }
 
 // The query or mutation executed by queryWithCustomMarshal.
@@ -3158,29 +3158,29 @@ query queryWithCustomMarshal ($date: Date!) {
 `
 
 func queryWithCustomMarshal(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 	date time.Time,
 ) (*queryWithCustomMarshalResponse, map[string]interface{}, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "queryWithCustomMarshal",
 		Query:  queryWithCustomMarshal_Operation,
 		Variables: &__queryWithCustomMarshalInput{
 			Date: date,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data queryWithCustomMarshalResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ queryWithCustomMarshalResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, resp.Extensions, err
+	return &data_, resp_.Extensions, err_
 }
 
 // The query or mutation executed by queryWithCustomMarshalOptional.
@@ -3195,12 +3195,12 @@ query queryWithCustomMarshalOptional ($date: Date, $id: ID) {
 `
 
 func queryWithCustomMarshalOptional(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 	date *time.Time,
 	id *string,
 ) (*queryWithCustomMarshalOptionalResponse, map[string]interface{}, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "queryWithCustomMarshalOptional",
 		Query:  queryWithCustomMarshalOptional_Operation,
 		Variables: &__queryWithCustomMarshalOptionalInput{
@@ -3208,18 +3208,18 @@ func queryWithCustomMarshalOptional(
 			Id:   id,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data queryWithCustomMarshalOptionalResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ queryWithCustomMarshalOptionalResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, resp.Extensions, err
+	return &data_, resp_.Extensions, err_
 }
 
 // The query or mutation executed by queryWithCustomMarshalSlice.
@@ -3234,29 +3234,29 @@ query queryWithCustomMarshalSlice ($dates: [Date!]!) {
 `
 
 func queryWithCustomMarshalSlice(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 	dates []time.Time,
 ) (*queryWithCustomMarshalSliceResponse, map[string]interface{}, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "queryWithCustomMarshalSlice",
 		Query:  queryWithCustomMarshalSlice_Operation,
 		Variables: &__queryWithCustomMarshalSliceInput{
 			Dates: dates,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data queryWithCustomMarshalSliceResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ queryWithCustomMarshalSliceResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, resp.Extensions, err
+	return &data_, resp_.Extensions, err_
 }
 
 // The query or mutation executed by queryWithFlatten.
@@ -3305,29 +3305,29 @@ fragment FriendsFields on User {
 `
 
 func queryWithFlatten(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 	ids []string,
 ) (*QueryFragment, map[string]interface{}, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "queryWithFlatten",
 		Query:  queryWithFlatten_Operation,
 		Variables: &__queryWithFlattenInput{
 			Ids: ids,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data QueryFragment
-	resp := &graphql.Response{Data: &data}
+	var data_ QueryFragment
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, resp.Extensions, err
+	return &data_, resp_.Extensions, err_
 }
 
 // The query or mutation executed by queryWithFragments.
@@ -3370,29 +3370,29 @@ query queryWithFragments ($ids: [ID!]!) {
 `
 
 func queryWithFragments(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 	ids []string,
 ) (*queryWithFragmentsResponse, map[string]interface{}, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "queryWithFragments",
 		Query:  queryWithFragments_Operation,
 		Variables: &__queryWithFragmentsInput{
 			Ids: ids,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data queryWithFragmentsResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ queryWithFragmentsResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, resp.Extensions, err
+	return &data_, resp_.Extensions, err_
 }
 
 // The query or mutation executed by queryWithInterfaceListField.
@@ -3407,29 +3407,29 @@ query queryWithInterfaceListField ($ids: [ID!]!) {
 `
 
 func queryWithInterfaceListField(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 	ids []string,
 ) (*queryWithInterfaceListFieldResponse, map[string]interface{}, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "queryWithInterfaceListField",
 		Query:  queryWithInterfaceListField_Operation,
 		Variables: &__queryWithInterfaceListFieldInput{
 			Ids: ids,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data queryWithInterfaceListFieldResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ queryWithInterfaceListFieldResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, resp.Extensions, err
+	return &data_, resp_.Extensions, err_
 }
 
 // The query or mutation executed by queryWithInterfaceListPointerField.
@@ -3444,29 +3444,29 @@ query queryWithInterfaceListPointerField ($ids: [ID!]!) {
 `
 
 func queryWithInterfaceListPointerField(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 	ids []string,
 ) (*queryWithInterfaceListPointerFieldResponse, map[string]interface{}, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "queryWithInterfaceListPointerField",
 		Query:  queryWithInterfaceListPointerField_Operation,
 		Variables: &__queryWithInterfaceListPointerFieldInput{
 			Ids: ids,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data queryWithInterfaceListPointerFieldResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ queryWithInterfaceListPointerFieldResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, resp.Extensions, err
+	return &data_, resp_.Extensions, err_
 }
 
 // The query or mutation executed by queryWithInterfaceNoFragments.
@@ -3485,29 +3485,29 @@ query queryWithInterfaceNoFragments ($id: ID!) {
 `
 
 func queryWithInterfaceNoFragments(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 	id string,
 ) (*queryWithInterfaceNoFragmentsResponse, map[string]interface{}, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "queryWithInterfaceNoFragments",
 		Query:  queryWithInterfaceNoFragments_Operation,
 		Variables: &__queryWithInterfaceNoFragmentsInput{
 			Id: id,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data queryWithInterfaceNoFragmentsResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ queryWithInterfaceNoFragmentsResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, resp.Extensions, err
+	return &data_, resp_.Extensions, err_
 }
 
 // The query or mutation executed by queryWithNamedFragments.
@@ -3550,29 +3550,29 @@ fragment MoreUserFields on User {
 `
 
 func queryWithNamedFragments(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 	ids []string,
 ) (*queryWithNamedFragmentsResponse, map[string]interface{}, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "queryWithNamedFragments",
 		Query:  queryWithNamedFragments_Operation,
 		Variables: &__queryWithNamedFragmentsInput{
 			Ids: ids,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data queryWithNamedFragmentsResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ queryWithNamedFragmentsResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, resp.Extensions, err
+	return &data_, resp_.Extensions, err_
 }
 
 // The query or mutation executed by queryWithOmitempty.
@@ -3587,29 +3587,29 @@ query queryWithOmitempty ($id: ID) {
 `
 
 func queryWithOmitempty(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 	id string,
 ) (*queryWithOmitemptyResponse, map[string]interface{}, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "queryWithOmitempty",
 		Query:  queryWithOmitempty_Operation,
 		Variables: &__queryWithOmitemptyInput{
 			Id: id,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data queryWithOmitemptyResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ queryWithOmitemptyResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, resp.Extensions, err
+	return &data_, resp_.Extensions, err_
 }
 
 // The query or mutation executed by queryWithVariables.
@@ -3624,29 +3624,29 @@ query queryWithVariables ($id: ID!) {
 `
 
 func queryWithVariables(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 	id string,
 ) (*queryWithVariablesResponse, map[string]interface{}, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "queryWithVariables",
 		Query:  queryWithVariables_Operation,
 		Variables: &__queryWithVariablesInput{
 			Id: id,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data queryWithVariablesResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ queryWithVariablesResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, resp.Extensions, err
+	return &data_, resp_.Extensions, err_
 }
 
 // The query or mutation executed by simpleQuery.
@@ -3661,25 +3661,25 @@ query simpleQuery {
 `
 
 func simpleQuery(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 ) (*simpleQueryResponse, map[string]interface{}, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "simpleQuery",
 		Query:  simpleQuery_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data simpleQueryResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ simpleQueryResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, resp.Extensions, err
+	return &data_, resp_.Extensions, err_
 }
 
 // The query or mutation executed by simpleQueryExt.
@@ -3694,23 +3694,23 @@ query simpleQueryExt {
 `
 
 func simpleQueryExt(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 ) (*simpleQueryExtResponse, map[string]interface{}, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "simpleQueryExt",
 		Query:  simpleQueryExt_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data simpleQueryExtResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ simpleQueryExtResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, resp.Extensions, err
+	return &data_, resp_.Extensions, err_
 }


Test patch:
diff --git a/generate/testdata/queries/MutationArgsWithCollidingNames.graphql b/generate/testdata/queries/MutationArgsWithCollidingNames.graphql
new file mode 100644
index 0000000..cbe35f4
--- /dev/null
+++ b/generate/testdata/queries/MutationArgsWithCollidingNames.graphql
@@ -0,0 +1,5 @@
+mutation MutationArgsWithCollidingNames($data: String!, $req: Int, $resp: Int, $client: String) {
+  updateUser(data: $data, req: $req, resp: $resp, client: $client) {
+    id
+  }
+}
diff --git a/generate/testdata/queries/schema.graphql b/generate/testdata/queries/schema.graphql
index 6e783de..17db360 100644
--- a/generate/testdata/queries/schema.graphql
+++ b/generate/testdata/queries/schema.graphql
@@ -184,7 +184,10 @@ type Query {
 }
 
 type Mutation {
-  createUser(name: String!, email: String): User 
+  createUser(name: String!, email: String): User
+  # The following query is non-sensical, but tests that argument names don't 
+  # collide with local var names in generated functions
+  updateUser(data: String!, req: Int, resp: Int, client: String): User
 }
 
 input getPokemonBoolExp {
diff --git a/generate/testdata/snapshots/TestGenerate-ComplexInlineFragments.graphql-ComplexInlineFragments.graphql.go b/generate/testdata/snapshots/TestGenerate-ComplexInlineFragments.graphql-ComplexInlineFragments.graphql.go
index 2afdeb4..5cd21cd 100644
--- a/generate/testdata/snapshots/TestGenerate-ComplexInlineFragments.graphql-ComplexInlineFragments.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-ComplexInlineFragments.graphql-ComplexInlineFragments.graphql.go
@@ -1435,23 +1435,23 @@ query ComplexInlineFragments {
 // versa, because gqlparser doesn't support interfaces that implement other
 // interfaces yet.
 func ComplexInlineFragments(
-	client graphql.Client,
+	client_ graphql.Client,
 ) (*ComplexInlineFragmentsResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "ComplexInlineFragments",
 		Query:  ComplexInlineFragments_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data ComplexInlineFragmentsResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ ComplexInlineFragmentsResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-ComplexNamedFragments.graphql-ComplexNamedFragments.graphql.go b/generate/testdata/snapshots/TestGenerate-ComplexNamedFragments.graphql-ComplexNamedFragments.graphql.go
index dbddcee..5e7350c 100644
--- a/generate/testdata/snapshots/TestGenerate-ComplexNamedFragments.graphql-ComplexNamedFragments.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-ComplexNamedFragments.graphql-ComplexNamedFragments.graphql.go
@@ -1801,23 +1801,23 @@ fragment MoreVideoFields on Video {
 `
 
 func ComplexNamedFragments(
-	client graphql.Client,
+	client_ graphql.Client,
 ) (*ComplexNamedFragmentsResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "ComplexNamedFragments",
 		Query:  ComplexNamedFragments_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data ComplexNamedFragmentsResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ ComplexNamedFragmentsResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-CovariantInterfaceImplementation.graphql-CovariantInterfaceImplementation.graphql.go b/generate/testdata/snapshots/TestGenerate-CovariantInterfaceImplementation.graphql-CovariantInterfaceImplementation.graphql.go
index 419ae10..74aa577 100644
--- a/generate/testdata/snapshots/TestGenerate-CovariantInterfaceImplementation.graphql-CovariantInterfaceImplementation.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-CovariantInterfaceImplementation.graphql-CovariantInterfaceImplementation.graphql.go
@@ -2393,23 +2393,23 @@ fragment TopicFields on Topic {
 `
 
 func CovariantInterfaceImplementation(
-	client graphql.Client,
+	client_ graphql.Client,
 ) (*CovariantInterfaceImplementationResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "CovariantInterfaceImplementation",
 		Query:  CovariantInterfaceImplementation_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data CovariantInterfaceImplementationResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ CovariantInterfaceImplementationResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-CustomMarshal.graphql-CustomMarshal.graphql.go b/generate/testdata/snapshots/TestGenerate-CustomMarshal.graphql-CustomMarshal.graphql.go
index c848ad7..7f67c02 100644
--- a/generate/testdata/snapshots/TestGenerate-CustomMarshal.graphql-CustomMarshal.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-CustomMarshal.graphql-CustomMarshal.graphql.go
@@ -185,27 +185,27 @@ query CustomMarshal ($date: Date!) {
 `
 
 func CustomMarshal(
-	client graphql.Client,
+	client_ graphql.Client,
 	date time.Time,
 ) (*CustomMarshalResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "CustomMarshal",
 		Query:  CustomMarshal_Operation,
 		Variables: &__CustomMarshalInput{
 			Date: date,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data CustomMarshalResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ CustomMarshalResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-CustomMarshalSlice.graphql-CustomMarshalSlice.graphql.go b/generate/testdata/snapshots/TestGenerate-CustomMarshalSlice.graphql-CustomMarshalSlice.graphql.go
index 0d72eb3..0ed6bec 100644
--- a/generate/testdata/snapshots/TestGenerate-CustomMarshalSlice.graphql-CustomMarshalSlice.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-CustomMarshalSlice.graphql-CustomMarshalSlice.graphql.go
@@ -212,11 +212,11 @@ query CustomMarshalSlice ($datesss: [[[Date!]!]!]!, $datesssp: [[[Date!]!]!]!) {
 `
 
 func CustomMarshalSlice(
-	client graphql.Client,
+	client_ graphql.Client,
 	datesss [][][]time.Time,
 	datesssp [][][]*time.Time,
 ) (*CustomMarshalSliceResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "CustomMarshalSlice",
 		Query:  CustomMarshalSlice_Operation,
 		Variables: &__CustomMarshalSliceInput{
@@ -224,17 +224,17 @@ func CustomMarshalSlice(
 			Datesssp: datesssp,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data CustomMarshalSliceResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ CustomMarshalSliceResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-DateTime.graphql-DateTime.graphql.go b/generate/testdata/snapshots/TestGenerate-DateTime.graphql-DateTime.graphql.go
index 97554da..3bf2390 100644
--- a/generate/testdata/snapshots/TestGenerate-DateTime.graphql-DateTime.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-DateTime.graphql-DateTime.graphql.go
@@ -36,11 +36,11 @@ query convertTimezone ($dt: DateTime!, $tz: String) {
 `
 
 func convertTimezone(
-	client graphql.Client,
+	client_ graphql.Client,
 	dt time.Time,
 	tz string,
 ) (*convertTimezoneResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "convertTimezone",
 		Query:  convertTimezone_Operation,
 		Variables: &__convertTimezoneInput{
@@ -48,17 +48,17 @@ func convertTimezone(
 			Tz: tz,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data convertTimezoneResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ convertTimezoneResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-EmptyInterface.graphql-EmptyInterface.graphql.go b/generate/testdata/snapshots/TestGenerate-EmptyInterface.graphql-EmptyInterface.graphql.go
index 0f798d7..95d902d 100644
--- a/generate/testdata/snapshots/TestGenerate-EmptyInterface.graphql-EmptyInterface.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-EmptyInterface.graphql-EmptyInterface.graphql.go
@@ -29,23 +29,23 @@ query EmptyInterface {
 `
 
 func EmptyInterface(
-	client graphql.Client,
+	client_ graphql.Client,
 ) (*EmptyInterfaceResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "EmptyInterface",
 		Query:  EmptyInterface_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data EmptyInterfaceResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ EmptyInterfaceResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-Flatten.graphql-Flatten.graphql.go b/generate/testdata/snapshots/TestGenerate-Flatten.graphql-Flatten.graphql.go
index a18b857..c05e913 100644
--- a/generate/testdata/snapshots/TestGenerate-Flatten.graphql-Flatten.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-Flatten.graphql-Flatten.graphql.go
@@ -305,23 +305,23 @@ fragment ChildVideoFields on Video {
 `
 
 func ComplexNamedFragments(
-	client graphql.Client,
+	client_ graphql.Client,
 ) (*InnerQueryFragment, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "ComplexNamedFragments",
 		Query:  ComplexNamedFragments_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data InnerQueryFragment
-	resp := &graphql.Response{Data: &data}
+	var data_ InnerQueryFragment
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-Hasura.graphql-Hasura.graphql.go b/generate/testdata/snapshots/TestGenerate-Hasura.graphql-Hasura.graphql.go
index 313b82e..d1dc426 100644
--- a/generate/testdata/snapshots/TestGenerate-Hasura.graphql-Hasura.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-Hasura.graphql-Hasura.graphql.go
@@ -92,27 +92,27 @@ query GetPokemon ($where: getPokemonBoolExp!) {
 `
 
 func GetPokemon(
-	client graphql.Client,
+	client_ graphql.Client,
 	where *GetPokemonBoolExp,
 ) (*GetPokemonResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "GetPokemon",
 		Query:  GetPokemon_Operation,
 		Variables: &__GetPokemonInput{
 			Where: where,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data GetPokemonResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ GetPokemonResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-InputEnum.graphql-InputEnum.graphql.go b/generate/testdata/snapshots/TestGenerate-InputEnum.graphql-InputEnum.graphql.go
index f51591a..49e46c3 100644
--- a/generate/testdata/snapshots/TestGenerate-InputEnum.graphql-InputEnum.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-InputEnum.graphql-InputEnum.graphql.go
@@ -64,27 +64,27 @@ query InputEnumQuery ($role: Role!) {
 `
 
 func InputEnumQuery(
-	client graphql.Client,
+	client_ graphql.Client,
 	role Role,
 ) (*InputEnumQueryResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "InputEnumQuery",
 		Query:  InputEnumQuery_Operation,
 		Variables: &__InputEnumQueryInput{
 			Role: role,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data InputEnumQueryResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ InputEnumQueryResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-InputObject.graphql-InputObject.graphql.go b/generate/testdata/snapshots/TestGenerate-InputObject.graphql-InputObject.graphql.go
index e5f2aa0..9209e04 100644
--- a/generate/testdata/snapshots/TestGenerate-InputObject.graphql-InputObject.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-InputObject.graphql-InputObject.graphql.go
@@ -187,27 +187,27 @@ query InputObjectQuery ($query: UserQueryInput) {
 `
 
 func InputObjectQuery(
-	client graphql.Client,
+	client_ graphql.Client,
 	query UserQueryInput,
 ) (*InputObjectQueryResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "InputObjectQuery",
 		Query:  InputObjectQuery_Operation,
 		Variables: &__InputObjectQueryInput{
 			Query: query,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data InputObjectQueryResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ InputObjectQueryResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-InterfaceListField.graphql-InterfaceListField.graphql.go b/generate/testdata/snapshots/TestGenerate-InterfaceListField.graphql-InterfaceListField.graphql.go
index fb2fc30..c5dcb07 100644
--- a/generate/testdata/snapshots/TestGenerate-InterfaceListField.graphql-InterfaceListField.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-InterfaceListField.graphql-InterfaceListField.graphql.go
@@ -545,23 +545,23 @@ query InterfaceListField {
 `
 
 func InterfaceListField(
-	client graphql.Client,
+	client_ graphql.Client,
 ) (*InterfaceListFieldResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "InterfaceListField",
 		Query:  InterfaceListField_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data InterfaceListFieldResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ InterfaceListFieldResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-InterfaceListOfListsOfListsField.graphql-InterfaceListOfListsOfListsField.graphql.go b/generate/testdata/snapshots/TestGenerate-InterfaceListOfListsOfListsField.graphql-InterfaceListOfListsOfListsField.graphql.go
index 8b5a607..2d13e43 100644
--- a/generate/testdata/snapshots/TestGenerate-InterfaceListOfListsOfListsField.graphql-InterfaceListOfListsOfListsField.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-InterfaceListOfListsOfListsField.graphql-InterfaceListOfListsOfListsField.graphql.go
@@ -523,23 +523,23 @@ query InterfaceListOfListOfListsField {
 `
 
 func InterfaceListOfListOfListsField(
-	client graphql.Client,
+	client_ graphql.Client,
 ) (*InterfaceListOfListOfListsFieldResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "InterfaceListOfListOfListsField",
 		Query:  InterfaceListOfListOfListsField_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data InterfaceListOfListOfListsFieldResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ InterfaceListOfListOfListsFieldResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-InterfaceNesting.graphql-InterfaceNesting.graphql.go b/generate/testdata/snapshots/TestGenerate-InterfaceNesting.graphql-InterfaceNesting.graphql.go
index 2ad6642..5f87208 100644
--- a/generate/testdata/snapshots/TestGenerate-InterfaceNesting.graphql-InterfaceNesting.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-InterfaceNesting.graphql-InterfaceNesting.graphql.go
@@ -525,23 +525,23 @@ query InterfaceNesting {
 `
 
 func InterfaceNesting(
-	client graphql.Client,
+	client_ graphql.Client,
 ) (*InterfaceNestingResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "InterfaceNesting",
 		Query:  InterfaceNesting_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data InterfaceNestingResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ InterfaceNestingResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-InterfaceNoFragments.graphql-InterfaceNoFragments.graphql.go b/generate/testdata/snapshots/TestGenerate-InterfaceNoFragments.graphql-InterfaceNoFragments.graphql.go
index 84b2037..bd4c7f0 100644
--- a/generate/testdata/snapshots/TestGenerate-InterfaceNoFragments.graphql-InterfaceNoFragments.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-InterfaceNoFragments.graphql-InterfaceNoFragments.graphql.go
@@ -652,23 +652,23 @@ query InterfaceNoFragmentsQuery {
 `
 
 func InterfaceNoFragmentsQuery(
-	client graphql.Client,
+	client_ graphql.Client,
 ) (*InterfaceNoFragmentsQueryResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "InterfaceNoFragmentsQuery",
 		Query:  InterfaceNoFragmentsQuery_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data InterfaceNoFragmentsQueryResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ InterfaceNoFragmentsQueryResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-ListInput.graphql-ListInput.graphql.go b/generate/testdata/snapshots/TestGenerate-ListInput.graphql-ListInput.graphql.go
index 8cb888d..2d3dfc1 100644
--- a/generate/testdata/snapshots/TestGenerate-ListInput.graphql-ListInput.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-ListInput.graphql-ListInput.graphql.go
@@ -51,27 +51,27 @@ query ListInputQuery ($names: [String]) {
 `
 
 func ListInputQuery(
-	client graphql.Client,
+	client_ graphql.Client,
 	names []string,
 ) (*ListInputQueryResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "ListInputQuery",
 		Query:  ListInputQuery_Operation,
 		Variables: &__ListInputQueryInput{
 			Names: names,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data ListInputQueryResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ ListInputQueryResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-ListOfListsOfLists.graphql-ListOfListsOfLists.graphql.go b/generate/testdata/snapshots/TestGenerate-ListOfListsOfLists.graphql-ListOfListsOfLists.graphql.go
index 806e81a..e536cf6 100644
--- a/generate/testdata/snapshots/TestGenerate-ListOfListsOfLists.graphql-ListOfListsOfLists.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-ListOfListsOfLists.graphql-ListOfListsOfLists.graphql.go
@@ -24,23 +24,23 @@ query ListOfListsOfLists {
 `
 
 func ListOfListsOfLists(
-	client graphql.Client,
+	client_ graphql.Client,
 ) (*ListOfListsOfListsResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "ListOfListsOfLists",
 		Query:  ListOfListsOfLists_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data ListOfListsOfListsResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ ListOfListsOfListsResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-MultipleDirectives.graphql-MultipleDirectives.graphql.go b/generate/testdata/snapshots/TestGenerate-MultipleDirectives.graphql-MultipleDirectives.graphql.go
index 356eef4..2859ade 100644
--- a/generate/testdata/snapshots/TestGenerate-MultipleDirectives.graphql-MultipleDirectives.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-MultipleDirectives.graphql-MultipleDirectives.graphql.go
@@ -338,11 +338,11 @@ query MultipleDirectives ($query: UserQueryInput, $queries: [UserQueryInput]) {
 `
 
 func MultipleDirectives(
-	client graphql.Client,
+	client_ graphql.Client,
 	query MyInput,
 	queries []*UserQueryInput,
 ) (*MyMultipleDirectivesResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "MultipleDirectives",
 		Query:  MultipleDirectives_Operation,
 		Variables: &__MultipleDirectivesInput{
@@ -350,17 +350,17 @@ func MultipleDirectives(
 			Queries: queries,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data MyMultipleDirectivesResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ MyMultipleDirectivesResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-MutationArgsWithCollidingNames.graphql-MutationArgsWithCollidingNames.graphql.go b/generate/testdata/snapshots/TestGenerate-MutationArgsWithCollidingNames.graphql-MutationArgsWithCollidingNames.graphql.go
new file mode 100644
index 0000000..be34cf2
--- /dev/null
+++ b/generate/testdata/snapshots/TestGenerate-MutationArgsWithCollidingNames.graphql-MutationArgsWithCollidingNames.graphql.go
@@ -0,0 +1,93 @@
+// Code generated by github.com/Khan/genqlient, DO NOT EDIT.
+
+package test
+
+import (
+	"github.com/Khan/genqlient/graphql"
+	"github.com/Khan/genqlient/internal/testutil"
+)
+
+// MutationArgsWithCollidingNamesResponse is returned by MutationArgsWithCollidingNames on success.
+type MutationArgsWithCollidingNamesResponse struct {
+	UpdateUser MutationArgsWithCollidingNamesUpdateUser `json:"updateUser"`
+}
+
+// GetUpdateUser returns MutationArgsWithCollidingNamesResponse.UpdateUser, and is useful for accessing the field via an interface.
+func (v *MutationArgsWithCollidingNamesResponse) GetUpdateUser() MutationArgsWithCollidingNamesUpdateUser {
+	return v.UpdateUser
+}
+
+// MutationArgsWithCollidingNamesUpdateUser includes the requested fields of the GraphQL type User.
+// The GraphQL type's documentation follows.
+//
+// A User is a user!
+type MutationArgsWithCollidingNamesUpdateUser struct {
+	// id is the user's ID.
+	//
+	// It is stable, unique, and opaque, like all good IDs.
+	Id testutil.ID `json:"id"`
+}
+
+// GetId returns MutationArgsWithCollidingNamesUpdateUser.Id, and is useful for accessing the field via an interface.
+func (v *MutationArgsWithCollidingNamesUpdateUser) GetId() testutil.ID { return v.Id }
+
+// __MutationArgsWithCollidingNamesInput is used internally by genqlient
+type __MutationArgsWithCollidingNamesInput struct {
+	Data   string `json:"data"`
+	Req    int    `json:"req"`
+	Resp   int    `json:"resp"`
+	Client string `json:"client"`
+}
+
+// GetData returns __MutationArgsWithCollidingNamesInput.Data, and is useful for accessing the field via an interface.
+func (v *__MutationArgsWithCollidingNamesInput) GetData() string { return v.Data }
+
+// GetReq returns __MutationArgsWithCollidingNamesInput.Req, and is useful for accessing the field via an interface.
+func (v *__MutationArgsWithCollidingNamesInput) GetReq() int { return v.Req }
+
+// GetResp returns __MutationArgsWithCollidingNamesInput.Resp, and is useful for accessing the field via an interface.
+func (v *__MutationArgsWithCollidingNamesInput) GetResp() int { return v.Resp }
+
+// GetClient returns __MutationArgsWithCollidingNamesInput.Client, and is useful for accessing the field via an interface.
+func (v *__MutationArgsWithCollidingNamesInput) GetClient() string { return v.Client }
+
+// The query or mutation executed by MutationArgsWithCollidingNames.
+const MutationArgsWithCollidingNames_Operation = `
+mutation MutationArgsWithCollidingNames ($data: String!, $req: Int, $resp: Int, $client: String) {
+	updateUser(data: $data, req: $req, resp: $resp, client: $client) {
+		id
+	}
+}
+`
+
+func MutationArgsWithCollidingNames(
+	client_ graphql.Client,
+	data string,
+	req int,
+	resp int,
+	client string,
+) (*MutationArgsWithCollidingNamesResponse, error) {
+	req_ := &graphql.Request{
+		OpName: "MutationArgsWithCollidingNames",
+		Query:  MutationArgsWithCollidingNames_Operation,
+		Variables: &__MutationArgsWithCollidingNamesInput{
+			Data:   data,
+			Req:    req,
+			Resp:   resp,
+			Client: client,
+		},
+	}
+	var err_ error
+
+	var data_ MutationArgsWithCollidingNamesResponse
+	resp_ := &graphql.Response{Data: &data_}
+
+	err_ = client_.MakeRequest(
+		nil,
+		req_,
+		resp_,
+	)
+
+	return &data_, err_
+}
+
diff --git a/generate/testdata/snapshots/TestGenerate-MutationArgsWithCollidingNames.graphql-MutationArgsWithCollidingNames.graphql.json b/generate/testdata/snapshots/TestGenerate-MutationArgsWithCollidingNames.graphql-MutationArgsWithCollidingNames.graphql.json
new file mode 100644
index 0000000..44b4188
--- /dev/null
+++ b/generate/testdata/snapshots/TestGenerate-MutationArgsWithCollidingNames.graphql-MutationArgsWithCollidingNames.graphql.json
@@ -0,0 +1,9 @@
+{
+  "operations": [
+    {
+      "operationName": "MutationArgsWithCollidingNames",
+      "query": "\nmutation MutationArgsWithCollidingNames ($data: String!, $req: Int, $resp: Int, $client: String) {\n\tupdateUser(data: $data, req: $req, resp: $resp, client: $client) {\n\t\tid\n\t}\n}\n",
+      "sourceLocation": "testdata/queries/MutationArgsWithCollidingNames.graphql"
+    }
+  ]
+}
diff --git a/generate/testdata/snapshots/TestGenerate-Omitempty.graphql-Omitempty.graphql.go b/generate/testdata/snapshots/TestGenerate-Omitempty.graphql-Omitempty.graphql.go
index 11c7fb0..a0f3cf1 100644
--- a/generate/testdata/snapshots/TestGenerate-Omitempty.graphql-Omitempty.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-Omitempty.graphql-Omitempty.graphql.go
@@ -234,14 +234,14 @@ query OmitEmptyQuery ($query: UserQueryInput, $queries: [UserQueryInput], $dt: D
 `
 
 func OmitEmptyQuery(
-	client graphql.Client,
+	client_ graphql.Client,
 	query UserQueryInput,
 	queries []UserQueryInput,
 	dt time.Time,
 	tz string,
 	tzNoOmitEmpty string,
 ) (*OmitEmptyQueryResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "OmitEmptyQuery",
 		Query:  OmitEmptyQuery_Operation,
 		Variables: &__OmitEmptyQueryInput{
@@ -252,17 +252,17 @@ func OmitEmptyQuery(
 			TzNoOmitEmpty: tzNoOmitEmpty,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data OmitEmptyQueryResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ OmitEmptyQueryResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-Pointers.graphql-Pointers.graphql.go b/generate/testdata/snapshots/TestGenerate-Pointers.graphql-Pointers.graphql.go
index 10058d8..7b40273 100644
--- a/generate/testdata/snapshots/TestGenerate-Pointers.graphql-Pointers.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-Pointers.graphql-Pointers.graphql.go
@@ -248,12 +248,12 @@ query PointersQuery ($query: UserQueryInput, $dt: DateTime, $tz: String) {
 `
 
 func PointersQuery(
-	client graphql.Client,
+	client_ graphql.Client,
 	query *UserQueryInput,
 	dt time.Time,
 	tz *string,
 ) (*PointersQueryResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "PointersQuery",
 		Query:  PointersQuery_Operation,
 		Variables: &__PointersQueryInput{
@@ -262,17 +262,17 @@ func PointersQuery(
 			Tz:    tz,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data PointersQueryResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ PointersQueryResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-PointersInline.graphql-PointersInline.graphql.go b/generate/testdata/snapshots/TestGenerate-PointersInline.graphql-PointersInline.graphql.go
index 99de563..b365f37 100644
--- a/generate/testdata/snapshots/TestGenerate-PointersInline.graphql-PointersInline.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-PointersInline.graphql-PointersInline.graphql.go
@@ -245,12 +245,12 @@ query PointersQuery ($query: UserQueryInput, $dt: DateTime, $tz: String) {
 `
 
 func PointersQuery(
-	client graphql.Client,
+	client_ graphql.Client,
 	query *UserQueryInput,
 	dt *time.Time,
 	tz string,
 ) (*PointersQueryResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "PointersQuery",
 		Query:  PointersQuery_Operation,
 		Variables: &__PointersQueryInput{
@@ -259,17 +259,17 @@ func PointersQuery(
 			Tz:    tz,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data PointersQueryResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ PointersQueryResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-Pokemon.graphql-Pokemon.graphql.go b/generate/testdata/snapshots/TestGenerate-Pokemon.graphql-Pokemon.graphql.go
index a14a99f..9f1b108 100644
--- a/generate/testdata/snapshots/TestGenerate-Pokemon.graphql-Pokemon.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-Pokemon.graphql-Pokemon.graphql.go
@@ -91,27 +91,27 @@ query GetPokemonSiblings ($input: PokemonInput!) {
 `
 
 func GetPokemonSiblings(
-	client graphql.Client,
+	client_ graphql.Client,
 	input testutil.Pokemon,
 ) (*GetPokemonSiblingsResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "GetPokemonSiblings",
 		Query:  GetPokemonSiblings_Operation,
 		Variables: &__GetPokemonSiblingsInput{
 			Input: input,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data GetPokemonSiblingsResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ GetPokemonSiblingsResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-QueryWithAlias.graphql-QueryWithAlias.graphql.go b/generate/testdata/snapshots/TestGenerate-QueryWithAlias.graphql-QueryWithAlias.graphql.go
index f8ef2c8..0a71a8a 100644
--- a/generate/testdata/snapshots/TestGenerate-QueryWithAlias.graphql-QueryWithAlias.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-QueryWithAlias.graphql-QueryWithAlias.graphql.go
@@ -51,23 +51,23 @@ query QueryWithAlias {
 `
 
 func QueryWithAlias(
-	client graphql.Client,
+	client_ graphql.Client,
 ) (*QueryWithAliasResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "QueryWithAlias",
 		Query:  QueryWithAlias_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data QueryWithAliasResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ QueryWithAliasResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-QueryWithDoubleAlias.graphql-QueryWithDoubleAlias.graphql.go b/generate/testdata/snapshots/TestGenerate-QueryWithDoubleAlias.graphql-QueryWithDoubleAlias.graphql.go
index 575e508..f921fc5 100644
--- a/generate/testdata/snapshots/TestGenerate-QueryWithDoubleAlias.graphql-QueryWithDoubleAlias.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-QueryWithDoubleAlias.graphql-QueryWithDoubleAlias.graphql.go
@@ -51,23 +51,23 @@ query QueryWithDoubleAlias {
 `
 
 func QueryWithDoubleAlias(
-	client graphql.Client,
+	client_ graphql.Client,
 ) (*QueryWithDoubleAliasResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "QueryWithDoubleAlias",
 		Query:  QueryWithDoubleAlias_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data QueryWithDoubleAliasResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ QueryWithDoubleAliasResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-QueryWithEnums.graphql-QueryWithEnums.graphql.go b/generate/testdata/snapshots/TestGenerate-QueryWithEnums.graphql-QueryWithEnums.graphql.go
index 7328966..b3b0a42 100644
--- a/generate/testdata/snapshots/TestGenerate-QueryWithEnums.graphql-QueryWithEnums.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-QueryWithEnums.graphql-QueryWithEnums.graphql.go
@@ -75,23 +75,23 @@ query QueryWithEnums {
 `
 
 func QueryWithEnums(
-	client graphql.Client,
+	client_ graphql.Client,
 ) (*QueryWithEnumsResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "QueryWithEnums",
 		Query:  QueryWithEnums_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data QueryWithEnumsResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ QueryWithEnumsResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-QueryWithSlices.graphql-QueryWithSlices.graphql.go b/generate/testdata/snapshots/TestGenerate-QueryWithSlices.graphql-QueryWithSlices.graphql.go
index 0552e56..8c2b7a6 100644
--- a/generate/testdata/snapshots/TestGenerate-QueryWithSlices.graphql-QueryWithSlices.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-QueryWithSlices.graphql-QueryWithSlices.graphql.go
@@ -54,23 +54,23 @@ query QueryWithSlices {
 `
 
 func QueryWithSlices(
-	client graphql.Client,
+	client_ graphql.Client,
 ) (*QueryWithSlicesResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "QueryWithSlices",
 		Query:  QueryWithSlices_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data QueryWithSlicesResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ QueryWithSlicesResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-QueryWithStructs.graphql-QueryWithStructs.graphql.go b/generate/testdata/snapshots/TestGenerate-QueryWithStructs.graphql-QueryWithStructs.graphql.go
index dcb209f..8146c98 100644
--- a/generate/testdata/snapshots/TestGenerate-QueryWithStructs.graphql-QueryWithStructs.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-QueryWithStructs.graphql-QueryWithStructs.graphql.go
@@ -56,23 +56,23 @@ query QueryWithStructs {
 `
 
 func QueryWithStructs(
-	client graphql.Client,
+	client_ graphql.Client,
 ) (*QueryWithStructsResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "QueryWithStructs",
 		Query:  QueryWithStructs_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data QueryWithStructsResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ QueryWithStructsResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-Recursion.graphql-Recursion.graphql.go b/generate/testdata/snapshots/TestGenerate-Recursion.graphql-Recursion.graphql.go
index a04627f..9c479e0 100644
--- a/generate/testdata/snapshots/TestGenerate-Recursion.graphql-Recursion.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-Recursion.graphql-Recursion.graphql.go
@@ -84,27 +84,27 @@ query Recursion ($input: RecursiveInput!) {
 `
 
 func Recursion(
-	client graphql.Client,
+	client_ graphql.Client,
 	input RecursiveInput,
 ) (*RecursionResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "Recursion",
 		Query:  Recursion_Operation,
 		Variables: &__RecursionInput{
 			Input: input,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data RecursionResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ RecursionResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-SimpleInlineFragment.graphql-SimpleInlineFragment.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleInlineFragment.graphql-SimpleInlineFragment.graphql.go
index be156a3..0d3fb54 100644
--- a/generate/testdata/snapshots/TestGenerate-SimpleInlineFragment.graphql-SimpleInlineFragment.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-SimpleInlineFragment.graphql-SimpleInlineFragment.graphql.go
@@ -257,23 +257,23 @@ query SimpleInlineFragment {
 `
 
 func SimpleInlineFragment(
-	client graphql.Client,
+	client_ graphql.Client,
 ) (*SimpleInlineFragmentResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "SimpleInlineFragment",
 		Query:  SimpleInlineFragment_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data SimpleInlineFragmentResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ SimpleInlineFragmentResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-SimpleInput.graphql-SimpleInput.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleInput.graphql-SimpleInput.graphql.go
index 2a48f8a..f6e475e 100644
--- a/generate/testdata/snapshots/TestGenerate-SimpleInput.graphql-SimpleInput.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-SimpleInput.graphql-SimpleInput.graphql.go
@@ -51,27 +51,27 @@ query SimpleInputQuery ($name: String!) {
 `
 
 func SimpleInputQuery(
-	client graphql.Client,
+	client_ graphql.Client,
 	name string,
 ) (*SimpleInputQueryResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "SimpleInputQuery",
 		Query:  SimpleInputQuery_Operation,
 		Variables: &__SimpleInputQueryInput{
 			Name: name,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data SimpleInputQueryResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ SimpleInputQueryResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-SimpleMutation.graphql-SimpleMutation.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleMutation.graphql-SimpleMutation.graphql.go
index f99df88..f87244c 100644
--- a/generate/testdata/snapshots/TestGenerate-SimpleMutation.graphql-SimpleMutation.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-SimpleMutation.graphql-SimpleMutation.graphql.go
@@ -56,27 +56,27 @@ mutation SimpleMutation ($name: String!) {
 // It has a long doc-comment, to test that we handle that correctly.
 // What a long comment indeed.
 func SimpleMutation(
-	client graphql.Client,
+	client_ graphql.Client,
 	name string,
 ) (*SimpleMutationResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "SimpleMutation",
 		Query:  SimpleMutation_Operation,
 		Variables: &__SimpleMutationInput{
 			Name: name,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data SimpleMutationResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ SimpleMutationResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-SimpleNamedFragment.graphql-SimpleNamedFragment.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleNamedFragment.graphql-SimpleNamedFragment.graphql.go
index febf112..c0ee332 100644
--- a/generate/testdata/snapshots/TestGenerate-SimpleNamedFragment.graphql-SimpleNamedFragment.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-SimpleNamedFragment.graphql-SimpleNamedFragment.graphql.go
@@ -572,23 +572,23 @@ fragment VideoFields on Video {
 `
 
 func SimpleNamedFragment(
-	client graphql.Client,
+	client_ graphql.Client,
 ) (*SimpleNamedFragmentResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "SimpleNamedFragment",
 		Query:  SimpleNamedFragment_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data SimpleNamedFragmentResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ SimpleNamedFragmentResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-SimpleQuery.graphql-SimpleQuery.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleQuery.graphql-SimpleQuery.graphql.go
index 0d6c004..ddb81cf 100644
--- a/generate/testdata/snapshots/TestGenerate-SimpleQuery.graphql-SimpleQuery.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-SimpleQuery.graphql-SimpleQuery.graphql.go
@@ -43,23 +43,23 @@ query SimpleQuery {
 `
 
 func SimpleQuery(
-	client graphql.Client,
+	client_ graphql.Client,
 ) (*SimpleQueryResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "SimpleQuery",
 		Query:  SimpleQuery_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data SimpleQueryResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ SimpleQueryResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-SimpleQueryNoOverride.graphql-SimpleQueryNoOverride.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleQueryNoOverride.graphql-SimpleQueryNoOverride.graphql.go
index 5a27e89..6458168 100644
--- a/generate/testdata/snapshots/TestGenerate-SimpleQueryNoOverride.graphql-SimpleQueryNoOverride.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-SimpleQueryNoOverride.graphql-SimpleQueryNoOverride.graphql.go
@@ -48,23 +48,23 @@ query SimpleQueryNoOverride {
 `
 
 func SimpleQueryNoOverride(
-	client graphql.Client,
+	client_ graphql.Client,
 ) (*SimpleQueryNoOverrideResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "SimpleQueryNoOverride",
 		Query:  SimpleQueryNoOverride_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data SimpleQueryNoOverrideResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ SimpleQueryNoOverrideResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-SimpleQueryWithPointerFalseOverride.graphql-SimpleQueryWithPointerFalseOverride.graphql.go b/generate/testdata/snapshots/TestGenerate-SimpleQueryWithPointerFalseOverride.graphql-SimpleQueryWithPointerFalseOverride.graphql.go
index 8bb9e36..6c26ddb 100644
--- a/generate/testdata/snapshots/TestGenerate-SimpleQueryWithPointerFalseOverride.graphql-SimpleQueryWithPointerFalseOverride.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-SimpleQueryWithPointerFalseOverride.graphql-SimpleQueryWithPointerFalseOverride.graphql.go
@@ -50,23 +50,23 @@ query SimpleQueryWithPointerFalseOverride {
 `
 
 func SimpleQueryWithPointerFalseOverride(
-	client graphql.Client,
+	client_ graphql.Client,
 ) (*SimpleQueryWithPointerFalseOverrideResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "SimpleQueryWithPointerFalseOverride",
 		Query:  SimpleQueryWithPointerFalseOverride_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data SimpleQueryWithPointerFalseOverrideResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ SimpleQueryWithPointerFalseOverrideResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-StructOption.graphql-StructOption.graphql.go b/generate/testdata/snapshots/TestGenerate-StructOption.graphql-StructOption.graphql.go
index 1cf05a3..55e0bfd 100644
--- a/generate/testdata/snapshots/TestGenerate-StructOption.graphql-StructOption.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-StructOption.graphql-StructOption.graphql.go
@@ -456,23 +456,23 @@ fragment VideoFields on Video {
 `
 
 func StructOption(
-	client graphql.Client,
+	client_ graphql.Client,
 ) (*StructOptionResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "StructOption",
 		Query:  StructOption_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data StructOptionResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ StructOptionResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-TypeName.graphql-TypeName.graphql.go b/generate/testdata/snapshots/TestGenerate-TypeName.graphql-TypeName.graphql.go
index 174d558..af67320 100644
--- a/generate/testdata/snapshots/TestGenerate-TypeName.graphql-TypeName.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-TypeName.graphql-TypeName.graphql.go
@@ -48,23 +48,23 @@ query TypeNameQuery {
 `
 
 func TypeNameQuery(
-	client graphql.Client,
+	client_ graphql.Client,
 ) (*TypeNameQueryResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "TypeNameQuery",
 		Query:  TypeNameQuery_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data TypeNameQueryResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ TypeNameQueryResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-TypeNames.graphql-TypeNames.graphql.go b/generate/testdata/snapshots/TestGenerate-TypeNames.graphql-TypeNames.graphql.go
index b05f5d5..04bcec4 100644
--- a/generate/testdata/snapshots/TestGenerate-TypeNames.graphql-TypeNames.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-TypeNames.graphql-TypeNames.graphql.go
@@ -284,23 +284,23 @@ query TypeNames {
 `
 
 func TypeNames(
-	client graphql.Client,
+	client_ graphql.Client,
 ) (*Resp, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "TypeNames",
 		Query:  TypeNames_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data Resp
-	resp := &graphql.Response{Data: &data}
+	var data_ Resp
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-UnionNoFragments.graphql-UnionNoFragments.graphql.go b/generate/testdata/snapshots/TestGenerate-UnionNoFragments.graphql-UnionNoFragments.graphql.go
index 8c570a8..d52f31a 100644
--- a/generate/testdata/snapshots/TestGenerate-UnionNoFragments.graphql-UnionNoFragments.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-UnionNoFragments.graphql-UnionNoFragments.graphql.go
@@ -184,23 +184,23 @@ query UnionNoFragmentsQuery {
 `
 
 func UnionNoFragmentsQuery(
-	client graphql.Client,
+	client_ graphql.Client,
 ) (*UnionNoFragmentsQueryResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "UnionNoFragmentsQuery",
 		Query:  UnionNoFragmentsQuery_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data UnionNoFragmentsQueryResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ UnionNoFragmentsQueryResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-UsesEnumTwice.graphql-UsesEnumTwice.graphql.go b/generate/testdata/snapshots/TestGenerate-UsesEnumTwice.graphql-UsesEnumTwice.graphql.go
index d3f81e7..69c2113 100644
--- a/generate/testdata/snapshots/TestGenerate-UsesEnumTwice.graphql-UsesEnumTwice.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-UsesEnumTwice.graphql-UsesEnumTwice.graphql.go
@@ -75,23 +75,23 @@ query UsesEnumTwiceQuery {
 `
 
 func UsesEnumTwiceQuery(
-	client graphql.Client,
+	client_ graphql.Client,
 ) (*UsesEnumTwiceQueryResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "UsesEnumTwiceQuery",
 		Query:  UsesEnumTwiceQuery_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data UsesEnumTwiceQueryResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ UsesEnumTwiceQueryResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerate-unexported.graphql-unexported.graphql.go b/generate/testdata/snapshots/TestGenerate-unexported.graphql-unexported.graphql.go
index c16bfcb..f3e1f54 100644
--- a/generate/testdata/snapshots/TestGenerate-unexported.graphql-unexported.graphql.go
+++ b/generate/testdata/snapshots/TestGenerate-unexported.graphql-unexported.graphql.go
@@ -187,27 +187,27 @@ query unexported ($query: UserQueryInput) {
 `
 
 func unexported(
-	client graphql.Client,
+	client_ graphql.Client,
 	query UserQueryInput,
 ) (*unexportedResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "unexported",
 		Query:  unexported_Operation,
 		Variables: &__unexportedInput{
 			Query: query,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data unexportedResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ unexportedResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetter-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetter-testdata-queries-generated.go
index bed3898..4ef93ec 100644
--- a/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetter-testdata-queries-generated.go
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetter-testdata-queries-generated.go
@@ -45,29 +45,29 @@ query SimpleQuery {
 `
 
 func SimpleQuery(
-	ctx context.Context,
+	ctx_ context.Context,
 ) (*SimpleQueryResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "SimpleQuery",
 		Query:  SimpleQuery_Operation,
 	}
-	var err error
-	var client graphql.Client
+	var err_ error
+	var client_ graphql.Client
 
-	client, err = testutil.GetClientFromContext(ctx)
-	if err != nil {
-		return nil, err
+	client_, err_ = testutil.GetClientFromContext(ctx_)
+	if err_ != nil {
+		return nil, err_
 	}
 
-	var data SimpleQueryResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ SimpleQueryResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterCustomContext-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterCustomContext-testdata-queries-generated.go
index 252030c..2a16c72 100644
--- a/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterCustomContext-testdata-queries-generated.go
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterCustomContext-testdata-queries-generated.go
@@ -48,29 +48,29 @@ query SimpleQuery {
 `
 
 func SimpleQuery(
-	ctx testutil.MyContext,
+	ctx_ testutil.MyContext,
 ) (*SimpleQueryResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "SimpleQuery",
 		Query:  SimpleQuery_Operation,
 	}
-	var err error
-	var client graphql.Client
+	var err_ error
+	var client_ graphql.Client
 
-	client, err = testutil.GetClientFromMyContext(ctx)
-	if err != nil {
-		return nil, err
+	client_, err_ = testutil.GetClientFromMyContext(ctx_)
+	if err_ != nil {
+		return nil, err_
 	}
 
-	var data SimpleQueryResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ SimpleQueryResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterNoContext-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterNoContext-testdata-queries-generated.go
index 65121f7..a34cf8d 100644
--- a/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterNoContext-testdata-queries-generated.go
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterNoContext-testdata-queries-generated.go
@@ -43,27 +43,27 @@ query SimpleQuery {
 `
 
 func SimpleQuery() (*SimpleQueryResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "SimpleQuery",
 		Query:  SimpleQuery_Operation,
 	}
-	var err error
-	var client graphql.Client
+	var err_ error
+	var client_ graphql.Client
 
-	client, err = testutil.GetClientFromNowhere()
-	if err != nil {
-		return nil, err
+	client_, err_ = testutil.GetClientFromNowhere()
+	if err_ != nil {
+		return nil, err_
 	}
 
-	var data SimpleQueryResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ SimpleQueryResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-CustomContext-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-CustomContext-testdata-queries-generated.go
index 3738622..e961813 100644
--- a/generate/testdata/snapshots/TestGenerateWithConfig-CustomContext-testdata-queries-generated.go
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-CustomContext-testdata-queries-generated.go
@@ -48,24 +48,24 @@ query SimpleQuery {
 `
 
 func SimpleQuery(
-	ctx testutil.MyContext,
-	client graphql.Client,
+	ctx_ testutil.MyContext,
+	client_ graphql.Client,
 ) (*SimpleQueryResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "SimpleQuery",
 		Query:  SimpleQuery_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data SimpleQueryResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ SimpleQueryResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-CustomContextWithAlias-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-CustomContextWithAlias-testdata-queries-generated.go
index a3f043b..a6d2535 100644
--- a/generate/testdata/snapshots/TestGenerateWithConfig-CustomContextWithAlias-testdata-queries-generated.go
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-CustomContextWithAlias-testdata-queries-generated.go
@@ -48,24 +48,24 @@ query SimpleQuery {
 `
 
 func SimpleQuery(
-	ctx junkfunname.MyContext,
-	client graphql.Client,
+	ctx_ junkfunname.MyContext,
+	client_ graphql.Client,
 ) (*SimpleQueryResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "SimpleQuery",
 		Query:  SimpleQuery_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data SimpleQueryResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ SimpleQueryResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-DefaultConfig-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-DefaultConfig-testdata-queries-generated.go
index b1cb7eb..2a18a3b 100644
--- a/generate/testdata/snapshots/TestGenerateWithConfig-DefaultConfig-testdata-queries-generated.go
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-DefaultConfig-testdata-queries-generated.go
@@ -44,24 +44,24 @@ query SimpleQuery {
 `
 
 func SimpleQuery(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 ) (*SimpleQueryResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "SimpleQuery",
 		Query:  SimpleQuery_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data SimpleQueryResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ SimpleQueryResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingAll-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingAll-testdata-queries-generated.go
index f168b1a..3d296e5 100644
--- a/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingAll-testdata-queries-generated.go
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingAll-testdata-queries-generated.go
@@ -77,24 +77,24 @@ query QueryWithEnums {
 `
 
 func QueryWithEnums(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 ) (*QueryWithEnumsResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "QueryWithEnums",
 		Query:  QueryWithEnums_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data QueryWithEnumsResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ QueryWithEnumsResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingSpecific-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingSpecific-testdata-queries-generated.go
index f168b1a..3d296e5 100644
--- a/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingSpecific-testdata-queries-generated.go
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingSpecific-testdata-queries-generated.go
@@ -77,24 +77,24 @@ query QueryWithEnums {
 `
 
 func QueryWithEnums(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 ) (*QueryWithEnumsResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "QueryWithEnums",
 		Query:  QueryWithEnums_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data QueryWithEnumsResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ QueryWithEnumsResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-ExportOperations-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-ExportOperations-testdata-queries-generated.go
index b1cb7eb..2a18a3b 100644
--- a/generate/testdata/snapshots/TestGenerateWithConfig-ExportOperations-testdata-queries-generated.go
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-ExportOperations-testdata-queries-generated.go
@@ -44,24 +44,24 @@ query SimpleQuery {
 `
 
 func SimpleQuery(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 ) (*SimpleQueryResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "SimpleQuery",
 		Query:  SimpleQuery_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data SimpleQueryResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ SimpleQueryResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-Extensions-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-Extensions-testdata-queries-generated.go
index 1383c1e..da4a5d0 100644
--- a/generate/testdata/snapshots/TestGenerateWithConfig-Extensions-testdata-queries-generated.go
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-Extensions-testdata-queries-generated.go
@@ -44,24 +44,24 @@ query SimpleQuery {
 `
 
 func SimpleQuery(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 ) (*SimpleQueryResponse, map[string]interface{}, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "SimpleQuery",
 		Query:  SimpleQuery_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data SimpleQueryResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ SimpleQueryResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, resp.Extensions, err
+	return &data_, resp_.Extensions, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-NoContext-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-NoContext-testdata-queries-generated.go
index fe97b8c..01005a7 100644
--- a/generate/testdata/snapshots/TestGenerateWithConfig-NoContext-testdata-queries-generated.go
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-NoContext-testdata-queries-generated.go
@@ -42,23 +42,23 @@ query SimpleQuery {
 `
 
 func SimpleQuery(
-	client graphql.Client,
+	client_ graphql.Client,
 ) (*SimpleQueryResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "SimpleQuery",
 		Query:  SimpleQuery_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data SimpleQueryResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ SimpleQueryResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
+	err_ = client_.MakeRequest(
 		nil,
-		req,
-		resp,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalGeneric-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalGeneric-testdata-queries-generated.go
index 24cbd22..5d7d29c 100644
--- a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalGeneric-testdata-queries-generated.go
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalGeneric-testdata-queries-generated.go
@@ -92,29 +92,29 @@ query ListInputQuery ($names: [String]) {
 `
 
 func ListInputQuery(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 	names []testutil.Option[string],
 ) (*ListInputQueryResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "ListInputQuery",
 		Query:  ListInputQuery_Operation,
 		Variables: &__ListInputQueryInput{
 			Names: names,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data ListInputQueryResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ ListInputQueryResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
 // The query or mutation executed by QueryWithSlices.
@@ -130,24 +130,24 @@ query QueryWithSlices {
 `
 
 func QueryWithSlices(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 ) (*QueryWithSlicesResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "QueryWithSlices",
 		Query:  QueryWithSlices_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data QueryWithSlicesResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ QueryWithSlicesResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointer-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointer-testdata-queries-generated.go
index e547f81..781bc54 100644
--- a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointer-testdata-queries-generated.go
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointer-testdata-queries-generated.go
@@ -149,29 +149,29 @@ query ListInputQuery ($names: [String]) {
 `
 
 func ListInputQuery(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 	names []*string,
 ) (*ListInputQueryResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "ListInputQuery",
 		Query:  ListInputQuery_Operation,
 		Variables: &__ListInputQueryInput{
 			Names: names,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data ListInputQueryResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ ListInputQueryResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
 // The query or mutation executed by QueryWithSlices.
@@ -187,25 +187,25 @@ query QueryWithSlices {
 `
 
 func QueryWithSlices(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 ) (*QueryWithSlicesResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "QueryWithSlices",
 		Query:  QueryWithSlices_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data QueryWithSlicesResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ QueryWithSlicesResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
 // The query or mutation executed by SimpleQueryNoOverride.
@@ -219,25 +219,25 @@ query SimpleQueryNoOverride {
 `
 
 func SimpleQueryNoOverride(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 ) (*SimpleQueryNoOverrideResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "SimpleQueryNoOverride",
 		Query:  SimpleQueryNoOverride_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data SimpleQueryNoOverrideResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ SimpleQueryNoOverrideResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
 // The query or mutation executed by SimpleQueryWithPointerFalseOverride.
@@ -251,24 +251,24 @@ query SimpleQueryWithPointerFalseOverride {
 `
 
 func SimpleQueryWithPointerFalseOverride(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 ) (*SimpleQueryWithPointerFalseOverrideResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "SimpleQueryWithPointerFalseOverride",
 		Query:  SimpleQueryWithPointerFalseOverride_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data SimpleQueryWithPointerFalseOverrideResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ SimpleQueryWithPointerFalseOverrideResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalValue-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalValue-testdata-queries-generated.go
index 336bd4d..82416cd 100644
--- a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalValue-testdata-queries-generated.go
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalValue-testdata-queries-generated.go
@@ -87,29 +87,29 @@ query ListInputQuery ($names: [String]) {
 `
 
 func ListInputQuery(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 	names []string,
 ) (*ListInputQueryResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "ListInputQuery",
 		Query:  ListInputQuery_Operation,
 		Variables: &__ListInputQueryInput{
 			Names: names,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data ListInputQueryResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ ListInputQueryResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
 // The query or mutation executed by QueryWithSlices.
@@ -125,24 +125,24 @@ query QueryWithSlices {
 `
 
 func QueryWithSlices(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 ) (*QueryWithSlicesResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "QueryWithSlices",
 		Query:  QueryWithSlices_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data QueryWithSlicesResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ QueryWithSlicesResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-PackageBindings-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-PackageBindings-testdata-queries-generated.go
index 5838a0a..9340d5e 100644
--- a/generate/testdata/snapshots/TestGenerateWithConfig-PackageBindings-testdata-queries-generated.go
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-PackageBindings-testdata-queries-generated.go
@@ -45,24 +45,24 @@ query SimpleQuery {
 `
 
 func SimpleQuery(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 ) (*SimpleQueryResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "SimpleQuery",
 		Query:  SimpleQuery_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data SimpleQueryResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ SimpleQueryResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-PackageName-testdata-queries-myfile.go b/generate/testdata/snapshots/TestGenerateWithConfig-PackageName-testdata-queries-myfile.go
index d3308f7..4d38276 100644
--- a/generate/testdata/snapshots/TestGenerateWithConfig-PackageName-testdata-queries-myfile.go
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-PackageName-testdata-queries-myfile.go
@@ -44,24 +44,24 @@ query SimpleQuery {
 `
 
 func SimpleQuery(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 ) (*SimpleQueryResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "SimpleQuery",
 		Query:  SimpleQuery_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data SimpleQueryResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ SimpleQueryResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-StructReferences-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-StructReferences-testdata-queries-generated.go
index 6686c7e..8365a6f 100644
--- a/generate/testdata/snapshots/TestGenerateWithConfig-StructReferences-testdata-queries-generated.go
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-StructReferences-testdata-queries-generated.go
@@ -236,29 +236,29 @@ query InputObjectQuery ($query: UserQueryInput) {
 `
 
 func InputObjectQuery(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 	query *UserQueryInput,
 ) (*InputObjectQueryResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "InputObjectQuery",
 		Query:  InputObjectQuery_Operation,
 		Variables: &__InputObjectQueryInput{
 			Query: query,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data InputObjectQueryResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ InputObjectQueryResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
 // The query or mutation executed by QueryWithStructs.
@@ -274,24 +274,24 @@ query QueryWithStructs {
 `
 
 func QueryWithStructs(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 ) (*QueryWithStructsResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "QueryWithStructs",
 		Query:  QueryWithStructs_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data QueryWithStructsResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ QueryWithStructsResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-StructReferencesAndOptionalPointer-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-StructReferencesAndOptionalPointer-testdata-queries-generated.go
index 704d3a7..61c785f 100644
--- a/generate/testdata/snapshots/TestGenerateWithConfig-StructReferencesAndOptionalPointer-testdata-queries-generated.go
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-StructReferencesAndOptionalPointer-testdata-queries-generated.go
@@ -239,29 +239,29 @@ query InputObjectQuery ($query: UserQueryInput) {
 `
 
 func InputObjectQuery(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 	query *UserQueryInput,
 ) (*InputObjectQueryResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "InputObjectQuery",
 		Query:  InputObjectQuery_Operation,
 		Variables: &__InputObjectQueryInput{
 			Query: query,
 		},
 	}
-	var err error
+	var err_ error
 
-	var data InputObjectQueryResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ InputObjectQueryResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
 // The query or mutation executed by QueryWithStructs.
@@ -277,24 +277,24 @@ query QueryWithStructs {
 `
 
 func QueryWithStructs(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 ) (*QueryWithStructsResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "QueryWithStructs",
 		Query:  QueryWithStructs_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data QueryWithStructsResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ QueryWithStructsResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-Subpackage-testdata-queries-mypkg-myfile.go b/generate/testdata/snapshots/TestGenerateWithConfig-Subpackage-testdata-queries-mypkg-myfile.go
index d3308f7..4d38276 100644
--- a/generate/testdata/snapshots/TestGenerateWithConfig-Subpackage-testdata-queries-mypkg-myfile.go
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-Subpackage-testdata-queries-mypkg-myfile.go
@@ -44,24 +44,24 @@ query SimpleQuery {
 `
 
 func SimpleQuery(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 ) (*SimpleQueryResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "SimpleQuery",
 		Query:  SimpleQuery_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data SimpleQueryResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ SimpleQueryResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }
 
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-SubpackageConfig-testdata-queries-mypkg-myfile.go b/generate/testdata/snapshots/TestGenerateWithConfig-SubpackageConfig-testdata-queries-mypkg-myfile.go
index d3308f7..4d38276 100644
--- a/generate/testdata/snapshots/TestGenerateWithConfig-SubpackageConfig-testdata-queries-mypkg-myfile.go
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-SubpackageConfig-testdata-queries-mypkg-myfile.go
@@ -44,24 +44,24 @@ query SimpleQuery {
 `
 
 func SimpleQuery(
-	ctx context.Context,
-	client graphql.Client,
+	ctx_ context.Context,
+	client_ graphql.Client,
 ) (*SimpleQueryResponse, error) {
-	req := &graphql.Request{
+	req_ := &graphql.Request{
 		OpName: "SimpleQuery",
 		Query:  SimpleQuery_Operation,
 	}
-	var err error
+	var err_ error
 
-	var data SimpleQueryResponse
-	resp := &graphql.Response{Data: &data}
+	var data_ SimpleQueryResponse
+	resp_ := &graphql.Response{Data: &data_}
 
-	err = client.MakeRequest(
-		ctx,
-		req,
-		resp,
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
 	)
 
-	return &data, err
+	return &data_, err_
 }