Repository: Khan/genqlient

Issue:
Support go version 1.25
**Describe the bug**
With the newest upgrade for golang there is a problem with the golang.org experimental tools package. 

`pkg/mod/golang.org/x/tools@v0.24.0/internal/tokeninternal/tokeninternal.go:64:9: invalid array length -delta * delta (constant -256 of type int64)`

**To Reproduce**

`FROM public.ecr.aws/docker/library/golang:1.25.0
RUN go install github.com/Khan/genqlient@v0.8.1
`

**Expected behavior**
Its working without problems :D 

**genqlient version**
v0.8.1



Discussion:
@benjaminjkraft: Probably we need to update our `x/tools` to match? PRs welcome -- else I probably won't get to this for a week or two.@adankb: Yes, upgrading `x/tools` to the latest version fixed the issue for me. @werjo-gridfuse: Just as a question because we cannot move on to go 1.25 atm without changing other things :D When do you intend to release the new version? 

@benjaminjkraft: You can likely upgrade `x/tools` in your own project to solve this as well (or install `genqlient@latest`). Our release policy is here: https://github.com/Khan/genqlient/blob/main/docs/versioning.md#when-do-we-make-a-release.@shadiramadan: Can this issue be reopened until released?  @benjaminjkraft  I think you meant `@main` not `@latest`.

Solution patch:
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
index 67c6409..2467191 100644
--- a/.github/workflows/go.yml
+++ b/.github/workflows/go.yml
@@ -12,7 +12,7 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        go: [ '1.22', '1.23' ]
+        go: [ '1.23', '1.24', '1.25' ]
 
     steps:
     - name: Set up Go
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index aa5d80f..9e550e5 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -20,6 +20,10 @@ When releasing a new version:
 
 <!-- Add new changes in this section! -->
 
+This release adds support for Go 1.25.
+
+Note that genqlient now requires Go 1.23 or higher, and is tested through Go 1.23, 1.24 and 1.25.
+
 ### Breaking changes:
 
 ### New features:
@@ -57,7 +61,7 @@ Note that genqlient now requires Go 1.22.5 or higher, and is tested through Go 1
 
 ### New features:
 
-- genqlient now supports subscriptions; the websocket protocol is by default `graphql-transport-ws` but can be set to another value.  
+- genqlient now supports subscriptions; the websocket protocol is by default `graphql-transport-ws` but can be set to another value.
   See the [documentation](subscriptions.md) for more details on how to use subscriptions.
 - genqlient now supports double-star globs for schema and query files; see [`genqlient.yaml` docs](genqlient.yaml) for more.
 - genqlient now generates slices containing all enum values for each enum type.
diff --git a/go.mod b/go.mod
index 3630a42..5c1a5b8 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
 module github.com/Khan/genqlient
 
-go 1.22.5
+go 1.23.0
 
 toolchain go1.23.3
 
@@ -13,7 +13,7 @@ require (
 	github.com/gorilla/websocket v1.5.0
 	github.com/stretchr/testify v1.9.0
 	github.com/vektah/gqlparser/v2 v2.5.19
-	golang.org/x/tools v0.24.0
+	golang.org/x/tools v0.36.0
 	gopkg.in/yaml.v2 v2.4.0
 )
 
@@ -25,7 +25,7 @@ require (
 	github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
 	github.com/pmezard/go-difflib v1.0.0 // indirect
 	github.com/sosodev/duration v1.3.1 // indirect
-	golang.org/x/mod v0.20.0 // indirect
-	golang.org/x/sync v0.8.0 // indirect
+	golang.org/x/mod v0.27.0 // indirect
+	golang.org/x/sync v0.16.0 // indirect
 	gopkg.in/yaml.v3 v3.0.1 // indirect
 )
diff --git a/go.sum b/go.sum
index 518247f..3e02b19 100644
--- a/go.sum
+++ b/go.sum
@@ -21,6 +21,8 @@ github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+
 github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA=
 github.com/go-viper/mapstructure/v2 v2.3.0 h1:27XbWsHIqhbdR5TIC911OfYvgSaW93HM+dX7970Q7jk=
 github.com/go-viper/mapstructure/v2 v2.3.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
+github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
+github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
 github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
 github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
 github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
@@ -41,12 +43,12 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT
 github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
 github.com/vektah/gqlparser/v2 v2.5.19 h1:bhCPCX1D4WWzCDvkPl4+TP1N8/kLrWnp43egplt7iSg=
 github.com/vektah/gqlparser/v2 v2.5.19/go.mod h1:y7kvl5bBlDeuWIvLtA9849ncyvx6/lj06RsMrEjVy3U=
-golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0=
-golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
-golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
-golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
-golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24=
-golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ=
+golang.org/x/mod v0.27.0 h1:kb+q2PyFnEADO2IEF935ehFUXlWiNjJWtRNgBLSfbxQ=
+golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc=
+golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
+golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
+golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg=
+golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
 gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=



Test patch:
diff --git a/generate/generate_test.go b/generate/generate_test.go
index 8cdfbe8..5b57003 100644
--- a/generate/generate_test.go
+++ b/generate/generate_test.go
@@ -258,6 +258,7 @@ func TestGenerateWithConfig(t *testing.T) {
 					Marshaler:   "github.com/Khan/genqlient/internal/testutil.MarshalDate",
 					Unmarshaler: "github.com/Khan/genqlient/internal/testutil.UnmarshalDate",
 				},
+				"PokemonInput": {Type: "github.com/Khan/genqlient/internal/testutil.Pokemon"},
 			},
 		}},
 		{
@@ -274,47 +275,49 @@ func TestGenerateWithConfig(t *testing.T) {
 		},
 	}
 
-	sourceFilename := "SimpleQuery.graphql"
-
 	for _, test := range tests {
 		config := test.config
 		baseDir := filepath.Join(dataDir, test.baseDir)
 		t.Run(test.name, func(t *testing.T) {
 			err := config.ValidateAndFillDefaults(baseDir)
 			config.Schema = []string{filepath.Join(dataDir, "schema.graphql")}
-			if test.operations == nil {
-				config.Operations = []string{filepath.Join(dataDir, sourceFilename)}
-			} else {
-				config.Operations = make([]string, len(test.operations))
-				for i := range test.operations {
-					config.Operations[i] = filepath.Join(dataDir, test.operations[i])
-				}
-			}
-			if err != nil {
-				t.Fatal(err)
-			}
-			generated, err := Generate(config)
-			if err != nil {
-				t.Fatal(err)
+			operationFiles := test.operations
+			if operationFiles == nil {
+				operationFiles = []string{"SimpleQuery.graphql"}
 			}
 
-			for filename, content := range generated {
-				t.Run(filename, func(t *testing.T) {
-					testutil.Cupaloy.SnapshotT(t, string(content))
-				})
-			}
+			// Since we often reuse types across test cases, run generation
+			// separately for each to avoid conflicts.
+			for _, operationFile := range operationFiles {
+				t.Run(operationFile, func(t *testing.T) {
+					config.Operations = []string{filepath.Join(dataDir, operationFile)}
+					if err != nil {
+						t.Fatal(err)
+					}
+					generated, err := Generate(config)
+					if err != nil {
+						t.Fatal(err)
+					}
 
-			t.Run("Build", func(t *testing.T) {
-				if testing.Short() {
-					t.Skip("skipping build due to -short")
-				}
+					for filename, content := range generated {
+						t.Run(filename, func(t *testing.T) {
+							testutil.Cupaloy.SnapshotT(t, string(content))
+						})
+					}
 
-				err := buildGoFile(sourceFilename,
-					generated[config.Generated])
-				if err != nil {
-					t.Error(err)
-				}
-			})
+					t.Run("Build", func(t *testing.T) {
+						if testing.Short() {
+							t.Skip("skipping build due to -short")
+						}
+
+						err := buildGoFile(operationFile,
+							generated[config.Generated])
+						if err != nil {
+							t.Error(err)
+						}
+					})
+				})
+			}
 		})
 	}
 }
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-AutoCamelCase-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-AutoCamelCase-SnakeCaseFields.graphql-testdata-queries-generated.go
similarity index 55%
rename from generate/testdata/snapshots/TestGenerateWithConfig-AutoCamelCase-testdata-queries-generated.go
rename to generate/testdata/snapshots/TestGenerateWithConfig-AutoCamelCase-SnakeCaseFields.graphql-testdata-queries-generated.go
index 057ece5..bd2232d 100644
--- a/generate/testdata/snapshots/TestGenerateWithConfig-AutoCamelCase-testdata-queries-generated.go
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-AutoCamelCase-SnakeCaseFields.graphql-testdata-queries-generated.go
@@ -35,26 +35,6 @@ func (v *SnakeCaseFieldsUser) GetUserId() string { return v.UserId }
 // GetDisplayName returns SnakeCaseFieldsUser.DisplayName, and is useful for accessing the field via an interface.
 func (v *SnakeCaseFieldsUser) GetDisplayName() string { return v.DisplayName }
 
-// SnakeCaseTypeResponse is returned by SnakeCaseType on success.
-type SnakeCaseTypeResponse struct {
-	SnakeCaseType SnakeCaseTypeSnakeCaseType `json:"snake_case_type"`
-}
-
-// GetSnakeCaseType returns SnakeCaseTypeResponse.SnakeCaseType, and is useful for accessing the field via an interface.
-func (v *SnakeCaseTypeResponse) GetSnakeCaseType() SnakeCaseTypeSnakeCaseType { return v.SnakeCaseType }
-
-// SnakeCaseTypeSnakeCaseType includes the requested fields of the GraphQL type snake_case_type.
-type SnakeCaseTypeSnakeCaseType struct {
-	Id   string `json:"id"`
-	Name string `json:"name"`
-}
-
-// GetId returns SnakeCaseTypeSnakeCaseType.Id, and is useful for accessing the field via an interface.
-func (v *SnakeCaseTypeSnakeCaseType) GetId() string { return v.Id }
-
-// GetName returns SnakeCaseTypeSnakeCaseType.Name, and is useful for accessing the field via an interface.
-func (v *SnakeCaseTypeSnakeCaseType) GetName() string { return v.Name }
-
 // The query executed by SnakeCaseFields.
 const SnakeCaseFields_Operation = `
 query SnakeCaseFields {
@@ -86,34 +66,3 @@ func SnakeCaseFields(
 	return data_, err_
 }
 
-// The query executed by SnakeCaseType.
-const SnakeCaseType_Operation = `
-query SnakeCaseType {
-	snake_case_type {
-		id
-		name
-	}
-}
-`
-
-func SnakeCaseType(
-	ctx_ context.Context,
-	client_ graphql.Client,
-) (data_ *SnakeCaseTypeResponse, err_ error) {
-	req_ := &graphql.Request{
-		OpName: "SnakeCaseType",
-		Query:  SnakeCaseType_Operation,
-	}
-
-	data_ = &SnakeCaseTypeResponse{}
-	resp_ := &graphql.Response{Data: data_}
-
-	err_ = client_.MakeRequest(
-		ctx_,
-		req_,
-		resp_,
-	)
-
-	return data_, err_
-}
-
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-AutoCamelCase-SnakeCaseType.graphql-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-AutoCamelCase-SnakeCaseType.graphql-testdata-queries-generated.go
new file mode 100644
index 0000000..723c3a2
--- /dev/null
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-AutoCamelCase-SnakeCaseType.graphql-testdata-queries-generated.go
@@ -0,0 +1,61 @@
+// Code generated by github.com/Khan/genqlient, DO NOT EDIT.
+
+package queries
+
+import (
+	"context"
+
+	"github.com/Khan/genqlient/graphql"
+)
+
+// SnakeCaseTypeResponse is returned by SnakeCaseType on success.
+type SnakeCaseTypeResponse struct {
+	SnakeCaseType SnakeCaseTypeSnakeCaseType `json:"snake_case_type"`
+}
+
+// GetSnakeCaseType returns SnakeCaseTypeResponse.SnakeCaseType, and is useful for accessing the field via an interface.
+func (v *SnakeCaseTypeResponse) GetSnakeCaseType() SnakeCaseTypeSnakeCaseType { return v.SnakeCaseType }
+
+// SnakeCaseTypeSnakeCaseType includes the requested fields of the GraphQL type snake_case_type.
+type SnakeCaseTypeSnakeCaseType struct {
+	Id   string `json:"id"`
+	Name string `json:"name"`
+}
+
+// GetId returns SnakeCaseTypeSnakeCaseType.Id, and is useful for accessing the field via an interface.
+func (v *SnakeCaseTypeSnakeCaseType) GetId() string { return v.Id }
+
+// GetName returns SnakeCaseTypeSnakeCaseType.Name, and is useful for accessing the field via an interface.
+func (v *SnakeCaseTypeSnakeCaseType) GetName() string { return v.Name }
+
+// The query executed by SnakeCaseType.
+const SnakeCaseType_Operation = `
+query SnakeCaseType {
+	snake_case_type {
+		id
+		name
+	}
+}
+`
+
+func SnakeCaseType(
+	ctx_ context.Context,
+	client_ graphql.Client,
+) (data_ *SnakeCaseTypeResponse, err_ error) {
+	req_ := &graphql.Request{
+		OpName: "SnakeCaseType",
+		Query:  SnakeCaseType_Operation,
+	}
+
+	data_ = &SnakeCaseTypeResponse{}
+	resp_ := &graphql.Response{Data: data_}
+
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
+	)
+
+	return data_, err_
+}
+
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetter-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetter-SimpleQuery.graphql-testdata-queries-generated.go
similarity index 100%
rename from generate/testdata/snapshots/TestGenerateWithConfig-ClientGetter-testdata-queries-generated.go
rename to generate/testdata/snapshots/TestGenerateWithConfig-ClientGetter-SimpleQuery.graphql-testdata-queries-generated.go
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterCustomContext-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterCustomContext-SimpleQuery.graphql-testdata-queries-generated.go
similarity index 100%
rename from generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterCustomContext-testdata-queries-generated.go
rename to generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterCustomContext-SimpleQuery.graphql-testdata-queries-generated.go
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterNoContext-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterNoContext-SimpleQuery.graphql-testdata-queries-generated.go
similarity index 100%
rename from generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterNoContext-testdata-queries-generated.go
rename to generate/testdata/snapshots/TestGenerateWithConfig-ClientGetterNoContext-SimpleQuery.graphql-testdata-queries-generated.go
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-CustomContext-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-CustomContext-SimpleQuery.graphql-testdata-queries-generated.go
similarity index 100%
rename from generate/testdata/snapshots/TestGenerateWithConfig-CustomContext-testdata-queries-generated.go
rename to generate/testdata/snapshots/TestGenerateWithConfig-CustomContext-SimpleQuery.graphql-testdata-queries-generated.go
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-CustomContextWithAlias-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-CustomContextWithAlias-SimpleQuery.graphql-testdata-queries-generated.go
similarity index 100%
rename from generate/testdata/snapshots/TestGenerateWithConfig-CustomContextWithAlias-testdata-queries-generated.go
rename to generate/testdata/snapshots/TestGenerateWithConfig-CustomContextWithAlias-SimpleQuery.graphql-testdata-queries-generated.go
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-DefaultConfig-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-DefaultConfig-SimpleQuery.graphql-testdata-queries-generated.go
similarity index 100%
rename from generate/testdata/snapshots/TestGenerateWithConfig-DefaultConfig-testdata-queries-generated.go
rename to generate/testdata/snapshots/TestGenerateWithConfig-DefaultConfig-SimpleQuery.graphql-testdata-queries-generated.go
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingAll-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingAll-QueryWithEnums.graphql-testdata-queries-generated.go
similarity index 100%
rename from generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingAll-testdata-queries-generated.go
rename to generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingAll-QueryWithEnums.graphql-testdata-queries-generated.go
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingSpecific-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingSpecific-QueryWithEnums.graphql-testdata-queries-generated.go
similarity index 100%
rename from generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingSpecific-testdata-queries-generated.go
rename to generate/testdata/snapshots/TestGenerateWithConfig-EnumRawCasingSpecific-QueryWithEnums.graphql-testdata-queries-generated.go
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-ExportOperations-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-ExportOperations-SimpleQuery.graphql-testdata-queries-generated.go
similarity index 100%
rename from generate/testdata/snapshots/TestGenerateWithConfig-ExportOperations-testdata-queries-generated.go
rename to generate/testdata/snapshots/TestGenerateWithConfig-ExportOperations-SimpleQuery.graphql-testdata-queries-generated.go
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-ExportOperations-testdata-queries-operations.json b/generate/testdata/snapshots/TestGenerateWithConfig-ExportOperations-SimpleQuery.graphql-testdata-queries-operations.json
similarity index 100%
rename from generate/testdata/snapshots/TestGenerateWithConfig-ExportOperations-testdata-queries-operations.json
rename to generate/testdata/snapshots/TestGenerateWithConfig-ExportOperations-SimpleQuery.graphql-testdata-queries-operations.json
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-Extensions-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-Extensions-SimpleQuery.graphql-testdata-queries-generated.go
similarity index 100%
rename from generate/testdata/snapshots/TestGenerateWithConfig-Extensions-testdata-queries-generated.go
rename to generate/testdata/snapshots/TestGenerateWithConfig-Extensions-SimpleQuery.graphql-testdata-queries-generated.go
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-NoContext-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-NoContext-SimpleQuery.graphql-testdata-queries-generated.go
similarity index 100%
rename from generate/testdata/snapshots/TestGenerateWithConfig-NoContext-testdata-queries-generated.go
rename to generate/testdata/snapshots/TestGenerateWithConfig-NoContext-SimpleQuery.graphql-testdata-queries-generated.go
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalGeneric-ListInput.graphql-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalGeneric-ListInput.graphql-testdata-queries-generated.go
new file mode 100644
index 0000000..1d9f6f7
--- /dev/null
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalGeneric-ListInput.graphql-testdata-queries-generated.go
@@ -0,0 +1,79 @@
+// Code generated by github.com/Khan/genqlient, DO NOT EDIT.
+
+package queries
+
+import (
+	"context"
+
+	"github.com/Khan/genqlient/graphql"
+	"github.com/Khan/genqlient/internal/testutil"
+)
+
+// ListInputQueryResponse is returned by ListInputQuery on success.
+type ListInputQueryResponse struct {
+	// user looks up a user by some stuff.
+	//
+	// See UserQueryInput for what stuff is supported.
+	// If query is null, returns the current user.
+	User testutil.Option[ListInputQueryUser] `json:"user"`
+}
+
+// GetUser returns ListInputQueryResponse.User, and is useful for accessing the field via an interface.
+func (v *ListInputQueryResponse) GetUser() testutil.Option[ListInputQueryUser] { return v.User }
+
+// ListInputQueryUser includes the requested fields of the GraphQL type User.
+// The GraphQL type's documentation follows.
+//
+// A User is a user!
+type ListInputQueryUser struct {
+	// id is the user's ID.
+	//
+	// It is stable, unique, and opaque, like all good IDs.
+	Id string `json:"id"`
+}
+
+// GetId returns ListInputQueryUser.Id, and is useful for accessing the field via an interface.
+func (v *ListInputQueryUser) GetId() string { return v.Id }
+
+// __ListInputQueryInput is used internally by genqlient
+type __ListInputQueryInput struct {
+	Names []testutil.Option[string] `json:"names"`
+}
+
+// GetNames returns __ListInputQueryInput.Names, and is useful for accessing the field via an interface.
+func (v *__ListInputQueryInput) GetNames() []testutil.Option[string] { return v.Names }
+
+// The query executed by ListInputQuery.
+const ListInputQuery_Operation = `
+query ListInputQuery ($names: [String]) {
+	user(query: {names:$names}) {
+		id
+	}
+}
+`
+
+func ListInputQuery(
+	ctx_ context.Context,
+	client_ graphql.Client,
+	names []testutil.Option[string],
+) (data_ *ListInputQueryResponse, err_ error) {
+	req_ := &graphql.Request{
+		OpName: "ListInputQuery",
+		Query:  ListInputQuery_Operation,
+		Variables: &__ListInputQueryInput{
+			Names: names,
+		},
+	}
+
+	data_ = &ListInputQueryResponse{}
+	resp_ := &graphql.Response{Data: data_}
+
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
+	)
+
+	return data_, err_
+}
+
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalGeneric-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalGeneric-QueryWithSlices.graphql-testdata-queries-generated.go
similarity index 57%
rename from generate/testdata/snapshots/TestGenerateWithConfig-OptionalGeneric-testdata-queries-generated.go
rename to generate/testdata/snapshots/TestGenerateWithConfig-OptionalGeneric-QueryWithSlices.graphql-testdata-queries-generated.go
index 29b8d9e..cc82b57 100644
--- a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalGeneric-testdata-queries-generated.go
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalGeneric-QueryWithSlices.graphql-testdata-queries-generated.go
@@ -9,32 +9,6 @@ import (
 	"github.com/Khan/genqlient/internal/testutil"
 )
 
-// ListInputQueryResponse is returned by ListInputQuery on success.
-type ListInputQueryResponse struct {
-	// user looks up a user by some stuff.
-	//
-	// See UserQueryInput for what stuff is supported.
-	// If query is null, returns the current user.
-	User testutil.Option[ListInputQueryUser] `json:"user"`
-}
-
-// GetUser returns ListInputQueryResponse.User, and is useful for accessing the field via an interface.
-func (v *ListInputQueryResponse) GetUser() testutil.Option[ListInputQueryUser] { return v.User }
-
-// ListInputQueryUser includes the requested fields of the GraphQL type User.
-// The GraphQL type's documentation follows.
-//
-// A User is a user!
-type ListInputQueryUser struct {
-	// id is the user's ID.
-	//
-	// It is stable, unique, and opaque, like all good IDs.
-	Id string `json:"id"`
-}
-
-// GetId returns ListInputQueryUser.Id, and is useful for accessing the field via an interface.
-func (v *ListInputQueryUser) GetId() string { return v.Id }
-
 // QueryWithSlicesResponse is returned by QueryWithSlices on success.
 type QueryWithSlicesResponse struct {
 	// user looks up a user by some stuff.
@@ -74,48 +48,6 @@ func (v *QueryWithSlicesUser) GetEmailsWithNullsOrNull() []testutil.Option[strin
 	return v.EmailsWithNullsOrNull
 }
 
-// __ListInputQueryInput is used internally by genqlient
-type __ListInputQueryInput struct {
-	Names []testutil.Option[string] `json:"names"`
-}
-
-// GetNames returns __ListInputQueryInput.Names, and is useful for accessing the field via an interface.
-func (v *__ListInputQueryInput) GetNames() []testutil.Option[string] { return v.Names }
-
-// The query executed by ListInputQuery.
-const ListInputQuery_Operation = `
-query ListInputQuery ($names: [String]) {
-	user(query: {names:$names}) {
-		id
-	}
-}
-`
-
-func ListInputQuery(
-	ctx_ context.Context,
-	client_ graphql.Client,
-	names []testutil.Option[string],
-) (data_ *ListInputQueryResponse, err_ error) {
-	req_ := &graphql.Request{
-		OpName: "ListInputQuery",
-		Query:  ListInputQuery_Operation,
-		Variables: &__ListInputQueryInput{
-			Names: names,
-		},
-	}
-
-	data_ = &ListInputQueryResponse{}
-	resp_ := &graphql.Response{Data: data_}
-
-	err_ = client_.MakeRequest(
-		ctx_,
-		req_,
-		resp_,
-	)
-
-	return data_, err_
-}
-
 // The query executed by QueryWithSlices.
 const QueryWithSlices_Operation = `
 query QueryWithSlices {
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointer-ListInput.graphql-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointer-ListInput.graphql-testdata-queries-generated.go
new file mode 100644
index 0000000..d285ea6
--- /dev/null
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointer-ListInput.graphql-testdata-queries-generated.go
@@ -0,0 +1,78 @@
+// Code generated by github.com/Khan/genqlient, DO NOT EDIT.
+
+package queries
+
+import (
+	"context"
+
+	"github.com/Khan/genqlient/graphql"
+)
+
+// ListInputQueryResponse is returned by ListInputQuery on success.
+type ListInputQueryResponse struct {
+	// user looks up a user by some stuff.
+	//
+	// See UserQueryInput for what stuff is supported.
+	// If query is null, returns the current user.
+	User *ListInputQueryUser `json:"user"`
+}
+
+// GetUser returns ListInputQueryResponse.User, and is useful for accessing the field via an interface.
+func (v *ListInputQueryResponse) GetUser() *ListInputQueryUser { return v.User }
+
+// ListInputQueryUser includes the requested fields of the GraphQL type User.
+// The GraphQL type's documentation follows.
+//
+// A User is a user!
+type ListInputQueryUser struct {
+	// id is the user's ID.
+	//
+	// It is stable, unique, and opaque, like all good IDs.
+	Id string `json:"id"`
+}
+
+// GetId returns ListInputQueryUser.Id, and is useful for accessing the field via an interface.
+func (v *ListInputQueryUser) GetId() string { return v.Id }
+
+// __ListInputQueryInput is used internally by genqlient
+type __ListInputQueryInput struct {
+	Names []*string `json:"names"`
+}
+
+// GetNames returns __ListInputQueryInput.Names, and is useful for accessing the field via an interface.
+func (v *__ListInputQueryInput) GetNames() []*string { return v.Names }
+
+// The query executed by ListInputQuery.
+const ListInputQuery_Operation = `
+query ListInputQuery ($names: [String]) {
+	user(query: {names:$names}) {
+		id
+	}
+}
+`
+
+func ListInputQuery(
+	ctx_ context.Context,
+	client_ graphql.Client,
+	names []*string,
+) (data_ *ListInputQueryResponse, err_ error) {
+	req_ := &graphql.Request{
+		OpName: "ListInputQuery",
+		Query:  ListInputQuery_Operation,
+		Variables: &__ListInputQueryInput{
+			Names: names,
+		},
+	}
+
+	data_ = &ListInputQueryResponse{}
+	resp_ := &graphql.Response{Data: data_}
+
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
+	)
+
+	return data_, err_
+}
+
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointer-QueryWithSlices.graphql-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointer-QueryWithSlices.graphql-testdata-queries-generated.go
new file mode 100644
index 0000000..04a4bd7
--- /dev/null
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointer-QueryWithSlices.graphql-testdata-queries-generated.go
@@ -0,0 +1,78 @@
+// Code generated by github.com/Khan/genqlient, DO NOT EDIT.
+
+package queries
+
+import (
+	"context"
+
+	"github.com/Khan/genqlient/graphql"
+)
+
+// QueryWithSlicesResponse is returned by QueryWithSlices on success.
+type QueryWithSlicesResponse struct {
+	// user looks up a user by some stuff.
+	//
+	// See UserQueryInput for what stuff is supported.
+	// If query is null, returns the current user.
+	User *QueryWithSlicesUser `json:"user"`
+}
+
+// GetUser returns QueryWithSlicesResponse.User, and is useful for accessing the field via an interface.
+func (v *QueryWithSlicesResponse) GetUser() *QueryWithSlicesUser { return v.User }
+
+// QueryWithSlicesUser includes the requested fields of the GraphQL type User.
+// The GraphQL type's documentation follows.
+//
+// A User is a user!
+type QueryWithSlicesUser struct {
+	Emails                []string  `json:"emails"`
+	EmailsOrNull          []string  `json:"emailsOrNull"`
+	EmailsWithNulls       []*string `json:"emailsWithNulls"`
+	EmailsWithNullsOrNull []*string `json:"emailsWithNullsOrNull"`
+}
+
+// GetEmails returns QueryWithSlicesUser.Emails, and is useful for accessing the field via an interface.
+func (v *QueryWithSlicesUser) GetEmails() []string { return v.Emails }
+
+// GetEmailsOrNull returns QueryWithSlicesUser.EmailsOrNull, and is useful for accessing the field via an interface.
+func (v *QueryWithSlicesUser) GetEmailsOrNull() []string { return v.EmailsOrNull }
+
+// GetEmailsWithNulls returns QueryWithSlicesUser.EmailsWithNulls, and is useful for accessing the field via an interface.
+func (v *QueryWithSlicesUser) GetEmailsWithNulls() []*string { return v.EmailsWithNulls }
+
+// GetEmailsWithNullsOrNull returns QueryWithSlicesUser.EmailsWithNullsOrNull, and is useful for accessing the field via an interface.
+func (v *QueryWithSlicesUser) GetEmailsWithNullsOrNull() []*string { return v.EmailsWithNullsOrNull }
+
+// The query executed by QueryWithSlices.
+const QueryWithSlices_Operation = `
+query QueryWithSlices {
+	user {
+		emails
+		emailsOrNull
+		emailsWithNulls
+		emailsWithNullsOrNull
+	}
+}
+`
+
+func QueryWithSlices(
+	ctx_ context.Context,
+	client_ graphql.Client,
+) (data_ *QueryWithSlicesResponse, err_ error) {
+	req_ := &graphql.Request{
+		OpName: "QueryWithSlices",
+		Query:  QueryWithSlices_Operation,
+	}
+
+	data_ = &QueryWithSlicesResponse{}
+	resp_ := &graphql.Response{Data: data_}
+
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
+	)
+
+	return data_, err_
+}
+
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointer-SimpleQueryNoOverride.graphql-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointer-SimpleQueryNoOverride.graphql-testdata-queries-generated.go
new file mode 100644
index 0000000..68cadac
--- /dev/null
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointer-SimpleQueryNoOverride.graphql-testdata-queries-generated.go
@@ -0,0 +1,71 @@
+// Code generated by github.com/Khan/genqlient, DO NOT EDIT.
+
+package queries
+
+import (
+	"context"
+
+	"github.com/Khan/genqlient/graphql"
+)
+
+// SimpleQueryNoOverrideResponse is returned by SimpleQueryNoOverride on success.
+type SimpleQueryNoOverrideResponse struct {
+	// user looks up a user by some stuff.
+	//
+	// See UserQueryInput for what stuff is supported.
+	// If query is null, returns the current user.
+	User *SimpleQueryNoOverrideUser `json:"user"`
+}
+
+// GetUser returns SimpleQueryNoOverrideResponse.User, and is useful for accessing the field via an interface.
+func (v *SimpleQueryNoOverrideResponse) GetUser() *SimpleQueryNoOverrideUser { return v.User }
+
+// SimpleQueryNoOverrideUser includes the requested fields of the GraphQL type User.
+// The GraphQL type's documentation follows.
+//
+// A User is a user!
+type SimpleQueryNoOverrideUser struct {
+	// id is the user's ID.
+	//
+	// It is stable, unique, and opaque, like all good IDs.
+	Id   string  `json:"id"`
+	Name *string `json:"name"`
+}
+
+// GetId returns SimpleQueryNoOverrideUser.Id, and is useful for accessing the field via an interface.
+func (v *SimpleQueryNoOverrideUser) GetId() string { return v.Id }
+
+// GetName returns SimpleQueryNoOverrideUser.Name, and is useful for accessing the field via an interface.
+func (v *SimpleQueryNoOverrideUser) GetName() *string { return v.Name }
+
+// The query executed by SimpleQueryNoOverride.
+const SimpleQueryNoOverride_Operation = `
+query SimpleQueryNoOverride {
+	user {
+		id
+		name
+	}
+}
+`
+
+func SimpleQueryNoOverride(
+	ctx_ context.Context,
+	client_ graphql.Client,
+) (data_ *SimpleQueryNoOverrideResponse, err_ error) {
+	req_ := &graphql.Request{
+		OpName: "SimpleQueryNoOverride",
+		Query:  SimpleQueryNoOverride_Operation,
+	}
+
+	data_ = &SimpleQueryNoOverrideResponse{}
+	resp_ := &graphql.Response{Data: data_}
+
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
+	)
+
+	return data_, err_
+}
+
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointer-SimpleQueryWithPointerFalseOverride.graphql-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointer-SimpleQueryWithPointerFalseOverride.graphql-testdata-queries-generated.go
new file mode 100644
index 0000000..706b25c
--- /dev/null
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointer-SimpleQueryWithPointerFalseOverride.graphql-testdata-queries-generated.go
@@ -0,0 +1,73 @@
+// Code generated by github.com/Khan/genqlient, DO NOT EDIT.
+
+package queries
+
+import (
+	"context"
+
+	"github.com/Khan/genqlient/graphql"
+)
+
+// SimpleQueryWithPointerFalseOverrideResponse is returned by SimpleQueryWithPointerFalseOverride on success.
+type SimpleQueryWithPointerFalseOverrideResponse struct {
+	// user looks up a user by some stuff.
+	//
+	// See UserQueryInput for what stuff is supported.
+	// If query is null, returns the current user.
+	User *SimpleQueryWithPointerFalseOverrideUser `json:"user"`
+}
+
+// GetUser returns SimpleQueryWithPointerFalseOverrideResponse.User, and is useful for accessing the field via an interface.
+func (v *SimpleQueryWithPointerFalseOverrideResponse) GetUser() *SimpleQueryWithPointerFalseOverrideUser {
+	return v.User
+}
+
+// SimpleQueryWithPointerFalseOverrideUser includes the requested fields of the GraphQL type User.
+// The GraphQL type's documentation follows.
+//
+// A User is a user!
+type SimpleQueryWithPointerFalseOverrideUser struct {
+	// id is the user's ID.
+	//
+	// It is stable, unique, and opaque, like all good IDs.
+	Id   string `json:"id"`
+	Name string `json:"name"`
+}
+
+// GetId returns SimpleQueryWithPointerFalseOverrideUser.Id, and is useful for accessing the field via an interface.
+func (v *SimpleQueryWithPointerFalseOverrideUser) GetId() string { return v.Id }
+
+// GetName returns SimpleQueryWithPointerFalseOverrideUser.Name, and is useful for accessing the field via an interface.
+func (v *SimpleQueryWithPointerFalseOverrideUser) GetName() string { return v.Name }
+
+// The query executed by SimpleQueryWithPointerFalseOverride.
+const SimpleQueryWithPointerFalseOverride_Operation = `
+query SimpleQueryWithPointerFalseOverride {
+	user {
+		id
+		name
+	}
+}
+`
+
+func SimpleQueryWithPointerFalseOverride(
+	ctx_ context.Context,
+	client_ graphql.Client,
+) (data_ *SimpleQueryWithPointerFalseOverrideResponse, err_ error) {
+	req_ := &graphql.Request{
+		OpName: "SimpleQueryWithPointerFalseOverride",
+		Query:  SimpleQueryWithPointerFalseOverride_Operation,
+	}
+
+	data_ = &SimpleQueryWithPointerFalseOverrideResponse{}
+	resp_ := &graphql.Response{Data: data_}
+
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
+	)
+
+	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
deleted file mode 100644
index da8ee58..0000000
--- a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointer-testdata-queries-generated.go
+++ /dev/null
@@ -1,270 +0,0 @@
-// Code generated by github.com/Khan/genqlient, DO NOT EDIT.
-
-package queries
-
-import (
-	"context"
-
-	"github.com/Khan/genqlient/graphql"
-)
-
-// ListInputQueryResponse is returned by ListInputQuery on success.
-type ListInputQueryResponse struct {
-	// user looks up a user by some stuff.
-	//
-	// See UserQueryInput for what stuff is supported.
-	// If query is null, returns the current user.
-	User *ListInputQueryUser `json:"user"`
-}
-
-// GetUser returns ListInputQueryResponse.User, and is useful for accessing the field via an interface.
-func (v *ListInputQueryResponse) GetUser() *ListInputQueryUser { return v.User }
-
-// ListInputQueryUser includes the requested fields of the GraphQL type User.
-// The GraphQL type's documentation follows.
-//
-// A User is a user!
-type ListInputQueryUser struct {
-	// id is the user's ID.
-	//
-	// It is stable, unique, and opaque, like all good IDs.
-	Id string `json:"id"`
-}
-
-// GetId returns ListInputQueryUser.Id, and is useful for accessing the field via an interface.
-func (v *ListInputQueryUser) GetId() string { return v.Id }
-
-// QueryWithSlicesResponse is returned by QueryWithSlices on success.
-type QueryWithSlicesResponse struct {
-	// user looks up a user by some stuff.
-	//
-	// See UserQueryInput for what stuff is supported.
-	// If query is null, returns the current user.
-	User *QueryWithSlicesUser `json:"user"`
-}
-
-// GetUser returns QueryWithSlicesResponse.User, and is useful for accessing the field via an interface.
-func (v *QueryWithSlicesResponse) GetUser() *QueryWithSlicesUser { return v.User }
-
-// QueryWithSlicesUser includes the requested fields of the GraphQL type User.
-// The GraphQL type's documentation follows.
-//
-// A User is a user!
-type QueryWithSlicesUser struct {
-	Emails                []string  `json:"emails"`
-	EmailsOrNull          []string  `json:"emailsOrNull"`
-	EmailsWithNulls       []*string `json:"emailsWithNulls"`
-	EmailsWithNullsOrNull []*string `json:"emailsWithNullsOrNull"`
-}
-
-// GetEmails returns QueryWithSlicesUser.Emails, and is useful for accessing the field via an interface.
-func (v *QueryWithSlicesUser) GetEmails() []string { return v.Emails }
-
-// GetEmailsOrNull returns QueryWithSlicesUser.EmailsOrNull, and is useful for accessing the field via an interface.
-func (v *QueryWithSlicesUser) GetEmailsOrNull() []string { return v.EmailsOrNull }
-
-// GetEmailsWithNulls returns QueryWithSlicesUser.EmailsWithNulls, and is useful for accessing the field via an interface.
-func (v *QueryWithSlicesUser) GetEmailsWithNulls() []*string { return v.EmailsWithNulls }
-
-// GetEmailsWithNullsOrNull returns QueryWithSlicesUser.EmailsWithNullsOrNull, and is useful for accessing the field via an interface.
-func (v *QueryWithSlicesUser) GetEmailsWithNullsOrNull() []*string { return v.EmailsWithNullsOrNull }
-
-// SimpleQueryNoOverrideResponse is returned by SimpleQueryNoOverride on success.
-type SimpleQueryNoOverrideResponse struct {
-	// user looks up a user by some stuff.
-	//
-	// See UserQueryInput for what stuff is supported.
-	// If query is null, returns the current user.
-	User *SimpleQueryNoOverrideUser `json:"user"`
-}
-
-// GetUser returns SimpleQueryNoOverrideResponse.User, and is useful for accessing the field via an interface.
-func (v *SimpleQueryNoOverrideResponse) GetUser() *SimpleQueryNoOverrideUser { return v.User }
-
-// SimpleQueryNoOverrideUser includes the requested fields of the GraphQL type User.
-// The GraphQL type's documentation follows.
-//
-// A User is a user!
-type SimpleQueryNoOverrideUser struct {
-	// id is the user's ID.
-	//
-	// It is stable, unique, and opaque, like all good IDs.
-	Id   string  `json:"id"`
-	Name *string `json:"name"`
-}
-
-// GetId returns SimpleQueryNoOverrideUser.Id, and is useful for accessing the field via an interface.
-func (v *SimpleQueryNoOverrideUser) GetId() string { return v.Id }
-
-// GetName returns SimpleQueryNoOverrideUser.Name, and is useful for accessing the field via an interface.
-func (v *SimpleQueryNoOverrideUser) GetName() *string { return v.Name }
-
-// SimpleQueryWithPointerFalseOverrideResponse is returned by SimpleQueryWithPointerFalseOverride on success.
-type SimpleQueryWithPointerFalseOverrideResponse struct {
-	// user looks up a user by some stuff.
-	//
-	// See UserQueryInput for what stuff is supported.
-	// If query is null, returns the current user.
-	User *SimpleQueryWithPointerFalseOverrideUser `json:"user"`
-}
-
-// GetUser returns SimpleQueryWithPointerFalseOverrideResponse.User, and is useful for accessing the field via an interface.
-func (v *SimpleQueryWithPointerFalseOverrideResponse) GetUser() *SimpleQueryWithPointerFalseOverrideUser {
-	return v.User
-}
-
-// SimpleQueryWithPointerFalseOverrideUser includes the requested fields of the GraphQL type User.
-// The GraphQL type's documentation follows.
-//
-// A User is a user!
-type SimpleQueryWithPointerFalseOverrideUser struct {
-	// id is the user's ID.
-	//
-	// It is stable, unique, and opaque, like all good IDs.
-	Id   string `json:"id"`
-	Name string `json:"name"`
-}
-
-// GetId returns SimpleQueryWithPointerFalseOverrideUser.Id, and is useful for accessing the field via an interface.
-func (v *SimpleQueryWithPointerFalseOverrideUser) GetId() string { return v.Id }
-
-// GetName returns SimpleQueryWithPointerFalseOverrideUser.Name, and is useful for accessing the field via an interface.
-func (v *SimpleQueryWithPointerFalseOverrideUser) GetName() string { return v.Name }
-
-// __ListInputQueryInput is used internally by genqlient
-type __ListInputQueryInput struct {
-	Names []*string `json:"names"`
-}
-
-// GetNames returns __ListInputQueryInput.Names, and is useful for accessing the field via an interface.
-func (v *__ListInputQueryInput) GetNames() []*string { return v.Names }
-
-// The query executed by ListInputQuery.
-const ListInputQuery_Operation = `
-query ListInputQuery ($names: [String]) {
-	user(query: {names:$names}) {
-		id
-	}
-}
-`
-
-func ListInputQuery(
-	ctx_ context.Context,
-	client_ graphql.Client,
-	names []*string,
-) (data_ *ListInputQueryResponse, err_ error) {
-	req_ := &graphql.Request{
-		OpName: "ListInputQuery",
-		Query:  ListInputQuery_Operation,
-		Variables: &__ListInputQueryInput{
-			Names: names,
-		},
-	}
-
-	data_ = &ListInputQueryResponse{}
-	resp_ := &graphql.Response{Data: data_}
-
-	err_ = client_.MakeRequest(
-		ctx_,
-		req_,
-		resp_,
-	)
-
-	return data_, err_
-}
-
-// The query executed by QueryWithSlices.
-const QueryWithSlices_Operation = `
-query QueryWithSlices {
-	user {
-		emails
-		emailsOrNull
-		emailsWithNulls
-		emailsWithNullsOrNull
-	}
-}
-`
-
-func QueryWithSlices(
-	ctx_ context.Context,
-	client_ graphql.Client,
-) (data_ *QueryWithSlicesResponse, err_ error) {
-	req_ := &graphql.Request{
-		OpName: "QueryWithSlices",
-		Query:  QueryWithSlices_Operation,
-	}
-
-	data_ = &QueryWithSlicesResponse{}
-	resp_ := &graphql.Response{Data: data_}
-
-	err_ = client_.MakeRequest(
-		ctx_,
-		req_,
-		resp_,
-	)
-
-	return data_, err_
-}
-
-// The query executed by SimpleQueryNoOverride.
-const SimpleQueryNoOverride_Operation = `
-query SimpleQueryNoOverride {
-	user {
-		id
-		name
-	}
-}
-`
-
-func SimpleQueryNoOverride(
-	ctx_ context.Context,
-	client_ graphql.Client,
-) (data_ *SimpleQueryNoOverrideResponse, err_ error) {
-	req_ := &graphql.Request{
-		OpName: "SimpleQueryNoOverride",
-		Query:  SimpleQueryNoOverride_Operation,
-	}
-
-	data_ = &SimpleQueryNoOverrideResponse{}
-	resp_ := &graphql.Response{Data: data_}
-
-	err_ = client_.MakeRequest(
-		ctx_,
-		req_,
-		resp_,
-	)
-
-	return data_, err_
-}
-
-// The query executed by SimpleQueryWithPointerFalseOverride.
-const SimpleQueryWithPointerFalseOverride_Operation = `
-query SimpleQueryWithPointerFalseOverride {
-	user {
-		id
-		name
-	}
-}
-`
-
-func SimpleQueryWithPointerFalseOverride(
-	ctx_ context.Context,
-	client_ graphql.Client,
-) (data_ *SimpleQueryWithPointerFalseOverrideResponse, err_ error) {
-	req_ := &graphql.Request{
-		OpName: "SimpleQueryWithPointerFalseOverride",
-		Query:  SimpleQueryWithPointerFalseOverride_Operation,
-	}
-
-	data_ = &SimpleQueryWithPointerFalseOverrideResponse{}
-	resp_ := &graphql.Response{Data: data_}
-
-	err_ = client_.MakeRequest(
-		ctx_,
-		req_,
-		resp_,
-	)
-
-	return data_, err_
-}
-
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointerOmitEmpty-InputObject.graphql-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointerOmitEmpty-InputObject.graphql-testdata-queries-generated.go
new file mode 100644
index 0000000..2a7cb9b
--- /dev/null
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointerOmitEmpty-InputObject.graphql-testdata-queries-generated.go
@@ -0,0 +1,222 @@
+// Code generated by github.com/Khan/genqlient, DO NOT EDIT.
+
+package queries
+
+import (
+	"context"
+	"encoding/json"
+	"fmt"
+	"time"
+
+	"github.com/Khan/genqlient/graphql"
+	"github.com/Khan/genqlient/internal/testutil"
+)
+
+// InputObjectQueryResponse is returned by InputObjectQuery on success.
+type InputObjectQueryResponse struct {
+	// user looks up a user by some stuff.
+	//
+	// See UserQueryInput for what stuff is supported.
+	// If query is null, returns the current user.
+	User *InputObjectQueryUser `json:"user"`
+}
+
+// GetUser returns InputObjectQueryResponse.User, and is useful for accessing the field via an interface.
+func (v *InputObjectQueryResponse) GetUser() *InputObjectQueryUser { return v.User }
+
+// InputObjectQueryUser includes the requested fields of the GraphQL type User.
+// The GraphQL type's documentation follows.
+//
+// A User is a user!
+type InputObjectQueryUser struct {
+	// id is the user's ID.
+	//
+	// It is stable, unique, and opaque, like all good IDs.
+	Id string `json:"id"`
+}
+
+// GetId returns InputObjectQueryUser.Id, and is useful for accessing the field via an interface.
+func (v *InputObjectQueryUser) GetId() string { return v.Id }
+
+// Role is a type a user may have.
+type Role string
+
+const (
+	// What is a student?
+	//
+	// A student is primarily a person enrolled in a school or other educational institution and who is under learning with goals of acquiring knowledge, developing professions and achieving employment at desired field. In the broader sense, a student is anyone who applies themselves to the intensive intellectual engagement with some matter necessary to master it as part of some practical affair in which such mastery is basic or decisive.
+	//
+	// (from [Wikipedia](https://en.wikipedia.org/wiki/Student))
+	RoleStudent Role = "STUDENT"
+	// Teacher is a teacher, who teaches the students.
+	RoleTeacher Role = "TEACHER"
+)
+
+var AllRole = []Role{
+	RoleStudent,
+	RoleTeacher,
+}
+
+// UserQueryInput is the argument to Query.users.
+//
+// Ideally this would support anything and everything!
+// Or maybe ideally it wouldn't.
+// Really I'm just talking to make this documentation longer.
+type UserQueryInput struct {
+	Email *string `json:"email,omitempty"`
+	Name  *string `json:"name,omitempty"`
+	// id looks the user up by ID.  It's a great way to look up users.
+	Id         *string           `json:"id,omitempty"`
+	Role       *Role             `json:"role,omitempty"`
+	Names      []*string         `json:"names,omitempty"`
+	HasPokemon *testutil.Pokemon `json:"hasPokemon,omitempty"`
+	Birthdate  *time.Time        `json:"-"`
+}
+
+// GetEmail returns UserQueryInput.Email, and is useful for accessing the field via an interface.
+func (v *UserQueryInput) GetEmail() *string { return v.Email }
+
+// GetName returns UserQueryInput.Name, and is useful for accessing the field via an interface.
+func (v *UserQueryInput) GetName() *string { return v.Name }
+
+// GetId returns UserQueryInput.Id, and is useful for accessing the field via an interface.
+func (v *UserQueryInput) GetId() *string { return v.Id }
+
+// GetRole returns UserQueryInput.Role, and is useful for accessing the field via an interface.
+func (v *UserQueryInput) GetRole() *Role { return v.Role }
+
+// GetNames returns UserQueryInput.Names, and is useful for accessing the field via an interface.
+func (v *UserQueryInput) GetNames() []*string { return v.Names }
+
+// GetHasPokemon returns UserQueryInput.HasPokemon, and is useful for accessing the field via an interface.
+func (v *UserQueryInput) GetHasPokemon() *testutil.Pokemon { return v.HasPokemon }
+
+// GetBirthdate returns UserQueryInput.Birthdate, and is useful for accessing the field via an interface.
+func (v *UserQueryInput) GetBirthdate() *time.Time { return v.Birthdate }
+
+func (v *UserQueryInput) UnmarshalJSON(b []byte) error {
+
+	if string(b) == "null" {
+		return nil
+	}
+
+	var firstPass struct {
+		*UserQueryInput
+		Birthdate json.RawMessage `json:"birthdate"`
+		graphql.NoUnmarshalJSON
+	}
+	firstPass.UserQueryInput = v
+
+	err := json.Unmarshal(b, &firstPass)
+	if err != nil {
+		return err
+	}
+
+	{
+		dst := &v.Birthdate
+		src := firstPass.Birthdate
+		if len(src) != 0 && string(src) != "null" {
+			*dst = new(time.Time)
+			err = testutil.UnmarshalDate(
+				src, *dst)
+			if err != nil {
+				return fmt.Errorf(
+					"unable to unmarshal UserQueryInput.Birthdate: %w", err)
+			}
+		}
+	}
+	return nil
+}
+
+type __premarshalUserQueryInput struct {
+	Email *string `json:"email,omitempty"`
+
+	Name *string `json:"name,omitempty"`
+
+	Id *string `json:"id,omitempty"`
+
+	Role *Role `json:"role,omitempty"`
+
+	Names []*string `json:"names,omitempty"`
+
+	HasPokemon *testutil.Pokemon `json:"hasPokemon,omitempty"`
+
+	Birthdate json.RawMessage `json:"birthdate,omitempty"`
+}
+
+func (v *UserQueryInput) MarshalJSON() ([]byte, error) {
+	premarshaled, err := v.__premarshalJSON()
+	if err != nil {
+		return nil, err
+	}
+	return json.Marshal(premarshaled)
+}
+
+func (v *UserQueryInput) __premarshalJSON() (*__premarshalUserQueryInput, error) {
+	var retval __premarshalUserQueryInput
+
+	retval.Email = v.Email
+	retval.Name = v.Name
+	retval.Id = v.Id
+	retval.Role = v.Role
+	retval.Names = v.Names
+	retval.HasPokemon = v.HasPokemon
+	{
+
+		dst := &retval.Birthdate
+		src := v.Birthdate
+		if src != nil {
+			var err error
+			*dst, err = testutil.MarshalDate(
+				src)
+			if err != nil {
+				return nil, fmt.Errorf(
+					"unable to marshal UserQueryInput.Birthdate: %w", err)
+			}
+		}
+	}
+	return &retval, nil
+}
+
+// __InputObjectQueryInput is used internally by genqlient
+type __InputObjectQueryInput struct {
+	Query *UserQueryInput `json:"query,omitempty"`
+}
+
+// GetQuery returns __InputObjectQueryInput.Query, and is useful for accessing the field via an interface.
+func (v *__InputObjectQueryInput) GetQuery() *UserQueryInput { return v.Query }
+
+// The query executed by InputObjectQuery.
+const InputObjectQuery_Operation = `
+query InputObjectQuery ($query: UserQueryInput) {
+	user(query: $query) {
+		id
+	}
+}
+`
+
+func InputObjectQuery(
+	ctx_ context.Context,
+	client_ graphql.Client,
+	query *UserQueryInput,
+) (data_ *InputObjectQueryResponse, err_ error) {
+	req_ := &graphql.Request{
+		OpName: "InputObjectQuery",
+		Query:  InputObjectQuery_Operation,
+		Variables: &__InputObjectQueryInput{
+			Query: query,
+		},
+	}
+
+	data_ = &InputObjectQueryResponse{}
+	resp_ := &graphql.Response{Data: data_}
+
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
+	)
+
+	return data_, err_
+}
+
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointerOmitEmpty-ListInput.graphql-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointerOmitEmpty-ListInput.graphql-testdata-queries-generated.go
new file mode 100644
index 0000000..92e9695
--- /dev/null
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointerOmitEmpty-ListInput.graphql-testdata-queries-generated.go
@@ -0,0 +1,78 @@
+// Code generated by github.com/Khan/genqlient, DO NOT EDIT.
+
+package queries
+
+import (
+	"context"
+
+	"github.com/Khan/genqlient/graphql"
+)
+
+// ListInputQueryResponse is returned by ListInputQuery on success.
+type ListInputQueryResponse struct {
+	// user looks up a user by some stuff.
+	//
+	// See UserQueryInput for what stuff is supported.
+	// If query is null, returns the current user.
+	User *ListInputQueryUser `json:"user"`
+}
+
+// GetUser returns ListInputQueryResponse.User, and is useful for accessing the field via an interface.
+func (v *ListInputQueryResponse) GetUser() *ListInputQueryUser { return v.User }
+
+// ListInputQueryUser includes the requested fields of the GraphQL type User.
+// The GraphQL type's documentation follows.
+//
+// A User is a user!
+type ListInputQueryUser struct {
+	// id is the user's ID.
+	//
+	// It is stable, unique, and opaque, like all good IDs.
+	Id string `json:"id"`
+}
+
+// GetId returns ListInputQueryUser.Id, and is useful for accessing the field via an interface.
+func (v *ListInputQueryUser) GetId() string { return v.Id }
+
+// __ListInputQueryInput is used internally by genqlient
+type __ListInputQueryInput struct {
+	Names []*string `json:"names,omitempty"`
+}
+
+// GetNames returns __ListInputQueryInput.Names, and is useful for accessing the field via an interface.
+func (v *__ListInputQueryInput) GetNames() []*string { return v.Names }
+
+// The query executed by ListInputQuery.
+const ListInputQuery_Operation = `
+query ListInputQuery ($names: [String]) {
+	user(query: {names:$names}) {
+		id
+	}
+}
+`
+
+func ListInputQuery(
+	ctx_ context.Context,
+	client_ graphql.Client,
+	names []*string,
+) (data_ *ListInputQueryResponse, err_ error) {
+	req_ := &graphql.Request{
+		OpName: "ListInputQuery",
+		Query:  ListInputQuery_Operation,
+		Variables: &__ListInputQueryInput{
+			Names: names,
+		},
+	}
+
+	data_ = &ListInputQueryResponse{}
+	resp_ := &graphql.Response{Data: data_}
+
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
+	)
+
+	return data_, err_
+}
+
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointerOmitEmpty-Omitempty.graphql-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointerOmitEmpty-Omitempty.graphql-testdata-queries-generated.go
new file mode 100644
index 0000000..0cc9826
--- /dev/null
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointerOmitEmpty-Omitempty.graphql-testdata-queries-generated.go
@@ -0,0 +1,458 @@
+// Code generated by github.com/Khan/genqlient, DO NOT EDIT.
+
+package queries
+
+import (
+	"context"
+	"encoding/json"
+	"fmt"
+	"time"
+
+	"github.com/Khan/genqlient/graphql"
+	"github.com/Khan/genqlient/internal/testutil"
+)
+
+// OmitEmptyQueryResponse is returned by OmitEmptyQuery on success.
+type OmitEmptyQueryResponse struct {
+	// user looks up a user by some stuff.
+	//
+	// See UserQueryInput for what stuff is supported.
+	// If query is null, returns the current user.
+	User         *OmitEmptyQueryUser        `json:"user"`
+	Users        []*OmitEmptyQueryUsersUser `json:"users"`
+	MaybeConvert *time.Time                 `json:"-"`
+	Convert2     *time.Time                 `json:"-"`
+}
+
+// GetUser returns OmitEmptyQueryResponse.User, and is useful for accessing the field via an interface.
+func (v *OmitEmptyQueryResponse) GetUser() *OmitEmptyQueryUser { return v.User }
+
+// GetUsers returns OmitEmptyQueryResponse.Users, and is useful for accessing the field via an interface.
+func (v *OmitEmptyQueryResponse) GetUsers() []*OmitEmptyQueryUsersUser { return v.Users }
+
+// GetMaybeConvert returns OmitEmptyQueryResponse.MaybeConvert, and is useful for accessing the field via an interface.
+func (v *OmitEmptyQueryResponse) GetMaybeConvert() *time.Time { return v.MaybeConvert }
+
+// GetConvert2 returns OmitEmptyQueryResponse.Convert2, and is useful for accessing the field via an interface.
+func (v *OmitEmptyQueryResponse) GetConvert2() *time.Time { return v.Convert2 }
+
+func (v *OmitEmptyQueryResponse) UnmarshalJSON(b []byte) error {
+
+	if string(b) == "null" {
+		return nil
+	}
+
+	var firstPass struct {
+		*OmitEmptyQueryResponse
+		MaybeConvert json.RawMessage `json:"maybeConvert"`
+		Convert2     json.RawMessage `json:"convert2"`
+		graphql.NoUnmarshalJSON
+	}
+	firstPass.OmitEmptyQueryResponse = v
+
+	err := json.Unmarshal(b, &firstPass)
+	if err != nil {
+		return err
+	}
+
+	{
+		dst := &v.MaybeConvert
+		src := firstPass.MaybeConvert
+		if len(src) != 0 && string(src) != "null" {
+			*dst = new(time.Time)
+			err = testutil.UnmarshalDate(
+				src, *dst)
+			if err != nil {
+				return fmt.Errorf(
+					"unable to unmarshal OmitEmptyQueryResponse.MaybeConvert: %w", err)
+			}
+		}
+	}
+
+	{
+		dst := &v.Convert2
+		src := firstPass.Convert2
+		if len(src) != 0 && string(src) != "null" {
+			*dst = new(time.Time)
+			err = testutil.UnmarshalDate(
+				src, *dst)
+			if err != nil {
+				return fmt.Errorf(
+					"unable to unmarshal OmitEmptyQueryResponse.Convert2: %w", err)
+			}
+		}
+	}
+	return nil
+}
+
+type __premarshalOmitEmptyQueryResponse struct {
+	User *OmitEmptyQueryUser `json:"user"`
+
+	Users []*OmitEmptyQueryUsersUser `json:"users"`
+
+	MaybeConvert json.RawMessage `json:"maybeConvert"`
+
+	Convert2 json.RawMessage `json:"convert2"`
+}
+
+func (v *OmitEmptyQueryResponse) MarshalJSON() ([]byte, error) {
+	premarshaled, err := v.__premarshalJSON()
+	if err != nil {
+		return nil, err
+	}
+	return json.Marshal(premarshaled)
+}
+
+func (v *OmitEmptyQueryResponse) __premarshalJSON() (*__premarshalOmitEmptyQueryResponse, error) {
+	var retval __premarshalOmitEmptyQueryResponse
+
+	retval.User = v.User
+	retval.Users = v.Users
+	{
+
+		dst := &retval.MaybeConvert
+		src := v.MaybeConvert
+		if src != nil {
+			var err error
+			*dst, err = testutil.MarshalDate(
+				src)
+			if err != nil {
+				return nil, fmt.Errorf(
+					"unable to marshal OmitEmptyQueryResponse.MaybeConvert: %w", err)
+			}
+		}
+	}
+	{
+
+		dst := &retval.Convert2
+		src := v.Convert2
+		if src != nil {
+			var err error
+			*dst, err = testutil.MarshalDate(
+				src)
+			if err != nil {
+				return nil, fmt.Errorf(
+					"unable to marshal OmitEmptyQueryResponse.Convert2: %w", err)
+			}
+		}
+	}
+	return &retval, nil
+}
+
+// OmitEmptyQueryUser includes the requested fields of the GraphQL type User.
+// The GraphQL type's documentation follows.
+//
+// A User is a user!
+type OmitEmptyQueryUser struct {
+	// id is the user's ID.
+	//
+	// It is stable, unique, and opaque, like all good IDs.
+	Id string `json:"id"`
+}
+
+// GetId returns OmitEmptyQueryUser.Id, and is useful for accessing the field via an interface.
+func (v *OmitEmptyQueryUser) GetId() string { return v.Id }
+
+// OmitEmptyQueryUsersUser includes the requested fields of the GraphQL type User.
+// The GraphQL type's documentation follows.
+//
+// A User is a user!
+type OmitEmptyQueryUsersUser struct {
+	// id is the user's ID.
+	//
+	// It is stable, unique, and opaque, like all good IDs.
+	Id string `json:"id"`
+}
+
+// GetId returns OmitEmptyQueryUsersUser.Id, and is useful for accessing the field via an interface.
+func (v *OmitEmptyQueryUsersUser) GetId() string { return v.Id }
+
+// Role is a type a user may have.
+type Role string
+
+const (
+	// What is a student?
+	//
+	// A student is primarily a person enrolled in a school or other educational institution and who is under learning with goals of acquiring knowledge, developing professions and achieving employment at desired field. In the broader sense, a student is anyone who applies themselves to the intensive intellectual engagement with some matter necessary to master it as part of some practical affair in which such mastery is basic or decisive.
+	//
+	// (from [Wikipedia](https://en.wikipedia.org/wiki/Student))
+	RoleStudent Role = "STUDENT"
+	// Teacher is a teacher, who teaches the students.
+	RoleTeacher Role = "TEACHER"
+)
+
+var AllRole = []Role{
+	RoleStudent,
+	RoleTeacher,
+}
+
+// UserQueryInput is the argument to Query.users.
+//
+// Ideally this would support anything and everything!
+// Or maybe ideally it wouldn't.
+// Really I'm just talking to make this documentation longer.
+type UserQueryInput struct {
+	Email *string `json:"email,omitempty"`
+	Name  *string `json:"name,omitempty"`
+	// id looks the user up by ID.  It's a great way to look up users.
+	Id         *string           `json:"id"`
+	Role       *Role             `json:"role,omitempty"`
+	Names      []*string         `json:"names,omitempty"`
+	HasPokemon *testutil.Pokemon `json:"hasPokemon,omitempty"`
+	Birthdate  *time.Time        `json:"-"`
+}
+
+// GetEmail returns UserQueryInput.Email, and is useful for accessing the field via an interface.
+func (v *UserQueryInput) GetEmail() *string { return v.Email }
+
+// GetName returns UserQueryInput.Name, and is useful for accessing the field via an interface.
+func (v *UserQueryInput) GetName() *string { return v.Name }
+
+// GetId returns UserQueryInput.Id, and is useful for accessing the field via an interface.
+func (v *UserQueryInput) GetId() *string { return v.Id }
+
+// GetRole returns UserQueryInput.Role, and is useful for accessing the field via an interface.
+func (v *UserQueryInput) GetRole() *Role { return v.Role }
+
+// GetNames returns UserQueryInput.Names, and is useful for accessing the field via an interface.
+func (v *UserQueryInput) GetNames() []*string { return v.Names }
+
+// GetHasPokemon returns UserQueryInput.HasPokemon, and is useful for accessing the field via an interface.
+func (v *UserQueryInput) GetHasPokemon() *testutil.Pokemon { return v.HasPokemon }
+
+// GetBirthdate returns UserQueryInput.Birthdate, and is useful for accessing the field via an interface.
+func (v *UserQueryInput) GetBirthdate() *time.Time { return v.Birthdate }
+
+func (v *UserQueryInput) UnmarshalJSON(b []byte) error {
+
+	if string(b) == "null" {
+		return nil
+	}
+
+	var firstPass struct {
+		*UserQueryInput
+		Birthdate json.RawMessage `json:"birthdate"`
+		graphql.NoUnmarshalJSON
+	}
+	firstPass.UserQueryInput = v
+
+	err := json.Unmarshal(b, &firstPass)
+	if err != nil {
+		return err
+	}
+
+	{
+		dst := &v.Birthdate
+		src := firstPass.Birthdate
+		if len(src) != 0 && string(src) != "null" {
+			*dst = new(time.Time)
+			err = testutil.UnmarshalDate(
+				src, *dst)
+			if err != nil {
+				return fmt.Errorf(
+					"unable to unmarshal UserQueryInput.Birthdate: %w", err)
+			}
+		}
+	}
+	return nil
+}
+
+type __premarshalUserQueryInput struct {
+	Email *string `json:"email,omitempty"`
+
+	Name *string `json:"name,omitempty"`
+
+	Id *string `json:"id"`
+
+	Role *Role `json:"role,omitempty"`
+
+	Names []*string `json:"names,omitempty"`
+
+	HasPokemon *testutil.Pokemon `json:"hasPokemon,omitempty"`
+
+	Birthdate json.RawMessage `json:"birthdate,omitempty"`
+}
+
+func (v *UserQueryInput) MarshalJSON() ([]byte, error) {
+	premarshaled, err := v.__premarshalJSON()
+	if err != nil {
+		return nil, err
+	}
+	return json.Marshal(premarshaled)
+}
+
+func (v *UserQueryInput) __premarshalJSON() (*__premarshalUserQueryInput, error) {
+	var retval __premarshalUserQueryInput
+
+	retval.Email = v.Email
+	retval.Name = v.Name
+	retval.Id = v.Id
+	retval.Role = v.Role
+	retval.Names = v.Names
+	retval.HasPokemon = v.HasPokemon
+	{
+
+		dst := &retval.Birthdate
+		src := v.Birthdate
+		if src != nil {
+			var err error
+			*dst, err = testutil.MarshalDate(
+				src)
+			if err != nil {
+				return nil, fmt.Errorf(
+					"unable to marshal UserQueryInput.Birthdate: %w", err)
+			}
+		}
+	}
+	return &retval, nil
+}
+
+// __OmitEmptyQueryInput is used internally by genqlient
+type __OmitEmptyQueryInput struct {
+	Query         *UserQueryInput   `json:"query,omitempty"`
+	Queries       []*UserQueryInput `json:"queries,omitempty"`
+	Dt            *time.Time        `json:"-"`
+	Tz            *string           `json:"tz,omitempty"`
+	TzNoOmitEmpty *string           `json:"tzNoOmitEmpty"`
+}
+
+// GetQuery returns __OmitEmptyQueryInput.Query, and is useful for accessing the field via an interface.
+func (v *__OmitEmptyQueryInput) GetQuery() *UserQueryInput { return v.Query }
+
+// GetQueries returns __OmitEmptyQueryInput.Queries, and is useful for accessing the field via an interface.
+func (v *__OmitEmptyQueryInput) GetQueries() []*UserQueryInput { return v.Queries }
+
+// GetDt returns __OmitEmptyQueryInput.Dt, and is useful for accessing the field via an interface.
+func (v *__OmitEmptyQueryInput) GetDt() *time.Time { return v.Dt }
+
+// GetTz returns __OmitEmptyQueryInput.Tz, and is useful for accessing the field via an interface.
+func (v *__OmitEmptyQueryInput) GetTz() *string { return v.Tz }
+
+// GetTzNoOmitEmpty returns __OmitEmptyQueryInput.TzNoOmitEmpty, and is useful for accessing the field via an interface.
+func (v *__OmitEmptyQueryInput) GetTzNoOmitEmpty() *string { return v.TzNoOmitEmpty }
+
+func (v *__OmitEmptyQueryInput) UnmarshalJSON(b []byte) error {
+
+	if string(b) == "null" {
+		return nil
+	}
+
+	var firstPass struct {
+		*__OmitEmptyQueryInput
+		Dt json.RawMessage `json:"dt"`
+		graphql.NoUnmarshalJSON
+	}
+	firstPass.__OmitEmptyQueryInput = v
+
+	err := json.Unmarshal(b, &firstPass)
+	if err != nil {
+		return err
+	}
+
+	{
+		dst := &v.Dt
+		src := firstPass.Dt
+		if len(src) != 0 && string(src) != "null" {
+			*dst = new(time.Time)
+			err = testutil.UnmarshalDate(
+				src, *dst)
+			if err != nil {
+				return fmt.Errorf(
+					"unable to unmarshal __OmitEmptyQueryInput.Dt: %w", err)
+			}
+		}
+	}
+	return nil
+}
+
+type __premarshal__OmitEmptyQueryInput struct {
+	Query *UserQueryInput `json:"query,omitempty"`
+
+	Queries []*UserQueryInput `json:"queries,omitempty"`
+
+	Dt json.RawMessage `json:"dt,omitempty"`
+
+	Tz *string `json:"tz,omitempty"`
+
+	TzNoOmitEmpty *string `json:"tzNoOmitEmpty"`
+}
+
+func (v *__OmitEmptyQueryInput) MarshalJSON() ([]byte, error) {
+	premarshaled, err := v.__premarshalJSON()
+	if err != nil {
+		return nil, err
+	}
+	return json.Marshal(premarshaled)
+}
+
+func (v *__OmitEmptyQueryInput) __premarshalJSON() (*__premarshal__OmitEmptyQueryInput, error) {
+	var retval __premarshal__OmitEmptyQueryInput
+
+	retval.Query = v.Query
+	retval.Queries = v.Queries
+	{
+
+		dst := &retval.Dt
+		src := v.Dt
+		if src != nil {
+			var err error
+			*dst, err = testutil.MarshalDate(
+				src)
+			if err != nil {
+				return nil, fmt.Errorf(
+					"unable to marshal __OmitEmptyQueryInput.Dt: %w", err)
+			}
+		}
+	}
+	retval.Tz = v.Tz
+	retval.TzNoOmitEmpty = v.TzNoOmitEmpty
+	return &retval, nil
+}
+
+// The query executed by OmitEmptyQuery.
+const OmitEmptyQuery_Operation = `
+query OmitEmptyQuery ($query: UserQueryInput, $queries: [UserQueryInput], $dt: DateTime, $tz: String, $tzNoOmitEmpty: String) {
+	user(query: $query) {
+		id
+	}
+	users(query: $queries) {
+		id
+	}
+	maybeConvert(dt: $dt, tz: $tz)
+	convert2: maybeConvert(dt: $dt, tz: $tzNoOmitEmpty)
+}
+`
+
+func OmitEmptyQuery(
+	ctx_ context.Context,
+	client_ graphql.Client,
+	query *UserQueryInput,
+	queries []*UserQueryInput,
+	dt *time.Time,
+	tz *string,
+	tzNoOmitEmpty *string,
+) (data_ *OmitEmptyQueryResponse, err_ error) {
+	req_ := &graphql.Request{
+		OpName: "OmitEmptyQuery",
+		Query:  OmitEmptyQuery_Operation,
+		Variables: &__OmitEmptyQueryInput{
+			Query:         query,
+			Queries:       queries,
+			Dt:            dt,
+			Tz:            tz,
+			TzNoOmitEmpty: tzNoOmitEmpty,
+		},
+	}
+
+	data_ = &OmitEmptyQueryResponse{}
+	resp_ := &graphql.Response{Data: data_}
+
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
+	)
+
+	return data_, err_
+}
+
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointerOmitEmpty-PointersOmitEmpty.graphql-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointerOmitEmpty-PointersOmitEmpty.graphql-testdata-queries-generated.go
new file mode 100644
index 0000000..896f5fd
--- /dev/null
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointerOmitEmpty-PointersOmitEmpty.graphql-testdata-queries-generated.go
@@ -0,0 +1,430 @@
+// Code generated by github.com/Khan/genqlient, DO NOT EDIT.
+
+package queries
+
+import (
+	"context"
+	"encoding/json"
+	"fmt"
+	"time"
+
+	"github.com/Khan/genqlient/graphql"
+	"github.com/Khan/genqlient/internal/testutil"
+)
+
+// PointersOmitEmptyQueryOtherUser includes the requested fields of the GraphQL type User.
+// The GraphQL type's documentation follows.
+//
+// A User is a user!
+type PointersOmitEmptyQueryOtherUser struct {
+	// id is the user's ID.
+	//
+	// It is stable, unique, and opaque, like all good IDs.
+	Id string `json:"id"`
+}
+
+// GetId returns PointersOmitEmptyQueryOtherUser.Id, and is useful for accessing the field via an interface.
+func (v *PointersOmitEmptyQueryOtherUser) GetId() string { return v.Id }
+
+// PointersOmitEmptyQueryResponse is returned by PointersOmitEmptyQuery on success.
+type PointersOmitEmptyQueryResponse struct {
+	// user looks up a user by some stuff.
+	//
+	// See UserQueryInput for what stuff is supported.
+	// If query is null, returns the current user.
+	User *PointersOmitEmptyQueryUser `json:"user"`
+	// user looks up a user by some stuff.
+	//
+	// See UserQueryInput for what stuff is supported.
+	// If query is null, returns the current user.
+	OtherUser    *PointersOmitEmptyQueryOtherUser `json:"otherUser"`
+	MaybeConvert *time.Time                       `json:"-"`
+}
+
+// GetUser returns PointersOmitEmptyQueryResponse.User, and is useful for accessing the field via an interface.
+func (v *PointersOmitEmptyQueryResponse) GetUser() *PointersOmitEmptyQueryUser { return v.User }
+
+// GetOtherUser returns PointersOmitEmptyQueryResponse.OtherUser, and is useful for accessing the field via an interface.
+func (v *PointersOmitEmptyQueryResponse) GetOtherUser() *PointersOmitEmptyQueryOtherUser {
+	return v.OtherUser
+}
+
+// GetMaybeConvert returns PointersOmitEmptyQueryResponse.MaybeConvert, and is useful for accessing the field via an interface.
+func (v *PointersOmitEmptyQueryResponse) GetMaybeConvert() *time.Time { return v.MaybeConvert }
+
+func (v *PointersOmitEmptyQueryResponse) UnmarshalJSON(b []byte) error {
+
+	if string(b) == "null" {
+		return nil
+	}
+
+	var firstPass struct {
+		*PointersOmitEmptyQueryResponse
+		MaybeConvert json.RawMessage `json:"maybeConvert"`
+		graphql.NoUnmarshalJSON
+	}
+	firstPass.PointersOmitEmptyQueryResponse = v
+
+	err := json.Unmarshal(b, &firstPass)
+	if err != nil {
+		return err
+	}
+
+	{
+		dst := &v.MaybeConvert
+		src := firstPass.MaybeConvert
+		if len(src) != 0 && string(src) != "null" {
+			*dst = new(time.Time)
+			err = testutil.UnmarshalDate(
+				src, *dst)
+			if err != nil {
+				return fmt.Errorf(
+					"unable to unmarshal PointersOmitEmptyQueryResponse.MaybeConvert: %w", err)
+			}
+		}
+	}
+	return nil
+}
+
+type __premarshalPointersOmitEmptyQueryResponse struct {
+	User *PointersOmitEmptyQueryUser `json:"user"`
+
+	OtherUser *PointersOmitEmptyQueryOtherUser `json:"otherUser"`
+
+	MaybeConvert json.RawMessage `json:"maybeConvert"`
+}
+
+func (v *PointersOmitEmptyQueryResponse) MarshalJSON() ([]byte, error) {
+	premarshaled, err := v.__premarshalJSON()
+	if err != nil {
+		return nil, err
+	}
+	return json.Marshal(premarshaled)
+}
+
+func (v *PointersOmitEmptyQueryResponse) __premarshalJSON() (*__premarshalPointersOmitEmptyQueryResponse, error) {
+	var retval __premarshalPointersOmitEmptyQueryResponse
+
+	retval.User = v.User
+	retval.OtherUser = v.OtherUser
+	{
+
+		dst := &retval.MaybeConvert
+		src := v.MaybeConvert
+		if src != nil {
+			var err error
+			*dst, err = testutil.MarshalDate(
+				src)
+			if err != nil {
+				return nil, fmt.Errorf(
+					"unable to marshal PointersOmitEmptyQueryResponse.MaybeConvert: %w", err)
+			}
+		}
+	}
+	return &retval, nil
+}
+
+// PointersOmitEmptyQueryUser includes the requested fields of the GraphQL type User.
+// The GraphQL type's documentation follows.
+//
+// A User is a user!
+type PointersOmitEmptyQueryUser struct {
+	// id is the user's ID.
+	//
+	// It is stable, unique, and opaque, like all good IDs.
+	Id          *string  `json:"id"`
+	Roles       []Role   `json:"roles"`
+	Name        *string  `json:"name"`
+	Emails      []string `json:"emails"`
+	EmailsNoPtr []string `json:"emailsNoPtr"`
+}
+
+// GetId returns PointersOmitEmptyQueryUser.Id, and is useful for accessing the field via an interface.
+func (v *PointersOmitEmptyQueryUser) GetId() *string { return v.Id }
+
+// GetRoles returns PointersOmitEmptyQueryUser.Roles, and is useful for accessing the field via an interface.
+func (v *PointersOmitEmptyQueryUser) GetRoles() []Role { return v.Roles }
+
+// GetName returns PointersOmitEmptyQueryUser.Name, and is useful for accessing the field via an interface.
+func (v *PointersOmitEmptyQueryUser) GetName() *string { return v.Name }
+
+// GetEmails returns PointersOmitEmptyQueryUser.Emails, and is useful for accessing the field via an interface.
+func (v *PointersOmitEmptyQueryUser) GetEmails() []string { return v.Emails }
+
+// GetEmailsNoPtr returns PointersOmitEmptyQueryUser.EmailsNoPtr, and is useful for accessing the field via an interface.
+func (v *PointersOmitEmptyQueryUser) GetEmailsNoPtr() []string { return v.EmailsNoPtr }
+
+// Role is a type a user may have.
+type Role string
+
+const (
+	// What is a student?
+	//
+	// A student is primarily a person enrolled in a school or other educational institution and who is under learning with goals of acquiring knowledge, developing professions and achieving employment at desired field. In the broader sense, a student is anyone who applies themselves to the intensive intellectual engagement with some matter necessary to master it as part of some practical affair in which such mastery is basic or decisive.
+	//
+	// (from [Wikipedia](https://en.wikipedia.org/wiki/Student))
+	RoleStudent Role = "STUDENT"
+	// Teacher is a teacher, who teaches the students.
+	RoleTeacher Role = "TEACHER"
+)
+
+var AllRole = []Role{
+	RoleStudent,
+	RoleTeacher,
+}
+
+// UserQueryInput is the argument to Query.users.
+//
+// Ideally this would support anything and everything!
+// Or maybe ideally it wouldn't.
+// Really I'm just talking to make this documentation longer.
+type UserQueryInput struct {
+	Email *string `json:"email,omitempty"`
+	Name  *string `json:"name,omitempty"`
+	// id looks the user up by ID.  It's a great way to look up users.
+	Id         string            `json:"id,omitempty"`
+	Role       *Role             `json:"role,omitempty"`
+	Names      []*string         `json:"names,omitempty"`
+	HasPokemon *testutil.Pokemon `json:"hasPokemon,omitempty"`
+	Birthdate  *time.Time        `json:"-"`
+}
+
+// GetEmail returns UserQueryInput.Email, and is useful for accessing the field via an interface.
+func (v *UserQueryInput) GetEmail() *string { return v.Email }
+
+// GetName returns UserQueryInput.Name, and is useful for accessing the field via an interface.
+func (v *UserQueryInput) GetName() *string { return v.Name }
+
+// GetId returns UserQueryInput.Id, and is useful for accessing the field via an interface.
+func (v *UserQueryInput) GetId() string { return v.Id }
+
+// GetRole returns UserQueryInput.Role, and is useful for accessing the field via an interface.
+func (v *UserQueryInput) GetRole() *Role { return v.Role }
+
+// GetNames returns UserQueryInput.Names, and is useful for accessing the field via an interface.
+func (v *UserQueryInput) GetNames() []*string { return v.Names }
+
+// GetHasPokemon returns UserQueryInput.HasPokemon, and is useful for accessing the field via an interface.
+func (v *UserQueryInput) GetHasPokemon() *testutil.Pokemon { return v.HasPokemon }
+
+// GetBirthdate returns UserQueryInput.Birthdate, and is useful for accessing the field via an interface.
+func (v *UserQueryInput) GetBirthdate() *time.Time { return v.Birthdate }
+
+func (v *UserQueryInput) UnmarshalJSON(b []byte) error {
+
+	if string(b) == "null" {
+		return nil
+	}
+
+	var firstPass struct {
+		*UserQueryInput
+		Birthdate json.RawMessage `json:"birthdate"`
+		graphql.NoUnmarshalJSON
+	}
+	firstPass.UserQueryInput = v
+
+	err := json.Unmarshal(b, &firstPass)
+	if err != nil {
+		return err
+	}
+
+	{
+		dst := &v.Birthdate
+		src := firstPass.Birthdate
+		if len(src) != 0 && string(src) != "null" {
+			*dst = new(time.Time)
+			err = testutil.UnmarshalDate(
+				src, *dst)
+			if err != nil {
+				return fmt.Errorf(
+					"unable to unmarshal UserQueryInput.Birthdate: %w", err)
+			}
+		}
+	}
+	return nil
+}
+
+type __premarshalUserQueryInput struct {
+	Email *string `json:"email,omitempty"`
+
+	Name *string `json:"name,omitempty"`
+
+	Id string `json:"id,omitempty"`
+
+	Role *Role `json:"role,omitempty"`
+
+	Names []*string `json:"names,omitempty"`
+
+	HasPokemon *testutil.Pokemon `json:"hasPokemon,omitempty"`
+
+	Birthdate json.RawMessage `json:"birthdate,omitempty"`
+}
+
+func (v *UserQueryInput) MarshalJSON() ([]byte, error) {
+	premarshaled, err := v.__premarshalJSON()
+	if err != nil {
+		return nil, err
+	}
+	return json.Marshal(premarshaled)
+}
+
+func (v *UserQueryInput) __premarshalJSON() (*__premarshalUserQueryInput, error) {
+	var retval __premarshalUserQueryInput
+
+	retval.Email = v.Email
+	retval.Name = v.Name
+	retval.Id = v.Id
+	retval.Role = v.Role
+	retval.Names = v.Names
+	retval.HasPokemon = v.HasPokemon
+	{
+
+		dst := &retval.Birthdate
+		src := v.Birthdate
+		if src != nil {
+			var err error
+			*dst, err = testutil.MarshalDate(
+				src)
+			if err != nil {
+				return nil, fmt.Errorf(
+					"unable to marshal UserQueryInput.Birthdate: %w", err)
+			}
+		}
+	}
+	return &retval, nil
+}
+
+// __PointersOmitEmptyQueryInput is used internally by genqlient
+type __PointersOmitEmptyQueryInput struct {
+	Query *UserQueryInput `json:"query,omitempty"`
+	Dt    *time.Time      `json:"-"`
+	Tz    string          `json:"tz,omitempty"`
+}
+
+// GetQuery returns __PointersOmitEmptyQueryInput.Query, and is useful for accessing the field via an interface.
+func (v *__PointersOmitEmptyQueryInput) GetQuery() *UserQueryInput { return v.Query }
+
+// GetDt returns __PointersOmitEmptyQueryInput.Dt, and is useful for accessing the field via an interface.
+func (v *__PointersOmitEmptyQueryInput) GetDt() *time.Time { return v.Dt }
+
+// GetTz returns __PointersOmitEmptyQueryInput.Tz, and is useful for accessing the field via an interface.
+func (v *__PointersOmitEmptyQueryInput) GetTz() string { return v.Tz }
+
+func (v *__PointersOmitEmptyQueryInput) UnmarshalJSON(b []byte) error {
+
+	if string(b) == "null" {
+		return nil
+	}
+
+	var firstPass struct {
+		*__PointersOmitEmptyQueryInput
+		Dt json.RawMessage `json:"dt"`
+		graphql.NoUnmarshalJSON
+	}
+	firstPass.__PointersOmitEmptyQueryInput = v
+
+	err := json.Unmarshal(b, &firstPass)
+	if err != nil {
+		return err
+	}
+
+	{
+		dst := &v.Dt
+		src := firstPass.Dt
+		if len(src) != 0 && string(src) != "null" {
+			*dst = new(time.Time)
+			err = testutil.UnmarshalDate(
+				src, *dst)
+			if err != nil {
+				return fmt.Errorf(
+					"unable to unmarshal __PointersOmitEmptyQueryInput.Dt: %w", err)
+			}
+		}
+	}
+	return nil
+}
+
+type __premarshal__PointersOmitEmptyQueryInput struct {
+	Query *UserQueryInput `json:"query,omitempty"`
+
+	Dt json.RawMessage `json:"dt,omitempty"`
+
+	Tz string `json:"tz,omitempty"`
+}
+
+func (v *__PointersOmitEmptyQueryInput) MarshalJSON() ([]byte, error) {
+	premarshaled, err := v.__premarshalJSON()
+	if err != nil {
+		return nil, err
+	}
+	return json.Marshal(premarshaled)
+}
+
+func (v *__PointersOmitEmptyQueryInput) __premarshalJSON() (*__premarshal__PointersOmitEmptyQueryInput, error) {
+	var retval __premarshal__PointersOmitEmptyQueryInput
+
+	retval.Query = v.Query
+	{
+
+		dst := &retval.Dt
+		src := v.Dt
+		if src != nil {
+			var err error
+			*dst, err = testutil.MarshalDate(
+				src)
+			if err != nil {
+				return nil, fmt.Errorf(
+					"unable to marshal __PointersOmitEmptyQueryInput.Dt: %w", err)
+			}
+		}
+	}
+	retval.Tz = v.Tz
+	return &retval, nil
+}
+
+// The query executed by PointersOmitEmptyQuery.
+const PointersOmitEmptyQuery_Operation = `
+query PointersOmitEmptyQuery ($query: UserQueryInput, $dt: DateTime, $tz: String) {
+	user(query: $query) {
+		id
+		roles
+		name
+		emails
+		emailsNoPtr: emails
+	}
+	otherUser: user(query: $query) {
+		id
+	}
+	maybeConvert(dt: $dt, tz: $tz)
+}
+`
+
+func PointersOmitEmptyQuery(
+	ctx_ context.Context,
+	client_ graphql.Client,
+	query *UserQueryInput,
+	dt *time.Time,
+	tz string,
+) (data_ *PointersOmitEmptyQueryResponse, err_ error) {
+	req_ := &graphql.Request{
+		OpName: "PointersOmitEmptyQuery",
+		Query:  PointersOmitEmptyQuery_Operation,
+		Variables: &__PointersOmitEmptyQueryInput{
+			Query: query,
+			Dt:    dt,
+			Tz:    tz,
+		},
+	}
+
+	data_ = &PointersOmitEmptyQueryResponse{}
+	resp_ := &graphql.Response{Data: data_}
+
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
+	)
+
+	return data_, err_
+}
+
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointerOmitEmpty-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointerOmitEmpty-testdata-queries-generated.go
deleted file mode 100644
index 90cd6b4..0000000
--- a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalPointerOmitEmpty-testdata-queries-generated.go
+++ /dev/null
@@ -1,881 +0,0 @@
-// Code generated by github.com/Khan/genqlient, DO NOT EDIT.
-
-package queries
-
-import (
-	"context"
-	"encoding/json"
-	"fmt"
-	"time"
-
-	"github.com/Khan/genqlient/graphql"
-	"github.com/Khan/genqlient/internal/testutil"
-)
-
-// InputObjectQueryResponse is returned by InputObjectQuery on success.
-type InputObjectQueryResponse struct {
-	// user looks up a user by some stuff.
-	//
-	// See UserQueryInput for what stuff is supported.
-	// If query is null, returns the current user.
-	User *InputObjectQueryUser `json:"user"`
-}
-
-// GetUser returns InputObjectQueryResponse.User, and is useful for accessing the field via an interface.
-func (v *InputObjectQueryResponse) GetUser() *InputObjectQueryUser { return v.User }
-
-// InputObjectQueryUser includes the requested fields of the GraphQL type User.
-// The GraphQL type's documentation follows.
-//
-// A User is a user!
-type InputObjectQueryUser struct {
-	// id is the user's ID.
-	//
-	// It is stable, unique, and opaque, like all good IDs.
-	Id string `json:"id"`
-}
-
-// GetId returns InputObjectQueryUser.Id, and is useful for accessing the field via an interface.
-func (v *InputObjectQueryUser) GetId() string { return v.Id }
-
-// ListInputQueryResponse is returned by ListInputQuery on success.
-type ListInputQueryResponse struct {
-	// user looks up a user by some stuff.
-	//
-	// See UserQueryInput for what stuff is supported.
-	// If query is null, returns the current user.
-	User *ListInputQueryUser `json:"user"`
-}
-
-// GetUser returns ListInputQueryResponse.User, and is useful for accessing the field via an interface.
-func (v *ListInputQueryResponse) GetUser() *ListInputQueryUser { return v.User }
-
-// ListInputQueryUser includes the requested fields of the GraphQL type User.
-// The GraphQL type's documentation follows.
-//
-// A User is a user!
-type ListInputQueryUser struct {
-	// id is the user's ID.
-	//
-	// It is stable, unique, and opaque, like all good IDs.
-	Id string `json:"id"`
-}
-
-// GetId returns ListInputQueryUser.Id, and is useful for accessing the field via an interface.
-func (v *ListInputQueryUser) GetId() string { return v.Id }
-
-// OmitEmptyQueryResponse is returned by OmitEmptyQuery on success.
-type OmitEmptyQueryResponse struct {
-	// user looks up a user by some stuff.
-	//
-	// See UserQueryInput for what stuff is supported.
-	// If query is null, returns the current user.
-	User         *OmitEmptyQueryUser        `json:"user"`
-	Users        []*OmitEmptyQueryUsersUser `json:"users"`
-	MaybeConvert *time.Time                 `json:"-"`
-	Convert2     *time.Time                 `json:"-"`
-}
-
-// GetUser returns OmitEmptyQueryResponse.User, and is useful for accessing the field via an interface.
-func (v *OmitEmptyQueryResponse) GetUser() *OmitEmptyQueryUser { return v.User }
-
-// GetUsers returns OmitEmptyQueryResponse.Users, and is useful for accessing the field via an interface.
-func (v *OmitEmptyQueryResponse) GetUsers() []*OmitEmptyQueryUsersUser { return v.Users }
-
-// GetMaybeConvert returns OmitEmptyQueryResponse.MaybeConvert, and is useful for accessing the field via an interface.
-func (v *OmitEmptyQueryResponse) GetMaybeConvert() *time.Time { return v.MaybeConvert }
-
-// GetConvert2 returns OmitEmptyQueryResponse.Convert2, and is useful for accessing the field via an interface.
-func (v *OmitEmptyQueryResponse) GetConvert2() *time.Time { return v.Convert2 }
-
-func (v *OmitEmptyQueryResponse) UnmarshalJSON(b []byte) error {
-
-	if string(b) == "null" {
-		return nil
-	}
-
-	var firstPass struct {
-		*OmitEmptyQueryResponse
-		MaybeConvert json.RawMessage `json:"maybeConvert"`
-		Convert2     json.RawMessage `json:"convert2"`
-		graphql.NoUnmarshalJSON
-	}
-	firstPass.OmitEmptyQueryResponse = v
-
-	err := json.Unmarshal(b, &firstPass)
-	if err != nil {
-		return err
-	}
-
-	{
-		dst := &v.MaybeConvert
-		src := firstPass.MaybeConvert
-		if len(src) != 0 && string(src) != "null" {
-			*dst = new(time.Time)
-			err = testutil.UnmarshalDate(
-				src, *dst)
-			if err != nil {
-				return fmt.Errorf(
-					"unable to unmarshal OmitEmptyQueryResponse.MaybeConvert: %w", err)
-			}
-		}
-	}
-
-	{
-		dst := &v.Convert2
-		src := firstPass.Convert2
-		if len(src) != 0 && string(src) != "null" {
-			*dst = new(time.Time)
-			err = testutil.UnmarshalDate(
-				src, *dst)
-			if err != nil {
-				return fmt.Errorf(
-					"unable to unmarshal OmitEmptyQueryResponse.Convert2: %w", err)
-			}
-		}
-	}
-	return nil
-}
-
-type __premarshalOmitEmptyQueryResponse struct {
-	User *OmitEmptyQueryUser `json:"user"`
-
-	Users []*OmitEmptyQueryUsersUser `json:"users"`
-
-	MaybeConvert json.RawMessage `json:"maybeConvert"`
-
-	Convert2 json.RawMessage `json:"convert2"`
-}
-
-func (v *OmitEmptyQueryResponse) MarshalJSON() ([]byte, error) {
-	premarshaled, err := v.__premarshalJSON()
-	if err != nil {
-		return nil, err
-	}
-	return json.Marshal(premarshaled)
-}
-
-func (v *OmitEmptyQueryResponse) __premarshalJSON() (*__premarshalOmitEmptyQueryResponse, error) {
-	var retval __premarshalOmitEmptyQueryResponse
-
-	retval.User = v.User
-	retval.Users = v.Users
-	{
-
-		dst := &retval.MaybeConvert
-		src := v.MaybeConvert
-		if src != nil {
-			var err error
-			*dst, err = testutil.MarshalDate(
-				src)
-			if err != nil {
-				return nil, fmt.Errorf(
-					"unable to marshal OmitEmptyQueryResponse.MaybeConvert: %w", err)
-			}
-		}
-	}
-	{
-
-		dst := &retval.Convert2
-		src := v.Convert2
-		if src != nil {
-			var err error
-			*dst, err = testutil.MarshalDate(
-				src)
-			if err != nil {
-				return nil, fmt.Errorf(
-					"unable to marshal OmitEmptyQueryResponse.Convert2: %w", err)
-			}
-		}
-	}
-	return &retval, nil
-}
-
-// OmitEmptyQueryUser includes the requested fields of the GraphQL type User.
-// The GraphQL type's documentation follows.
-//
-// A User is a user!
-type OmitEmptyQueryUser struct {
-	// id is the user's ID.
-	//
-	// It is stable, unique, and opaque, like all good IDs.
-	Id string `json:"id"`
-}
-
-// GetId returns OmitEmptyQueryUser.Id, and is useful for accessing the field via an interface.
-func (v *OmitEmptyQueryUser) GetId() string { return v.Id }
-
-// OmitEmptyQueryUsersUser includes the requested fields of the GraphQL type User.
-// The GraphQL type's documentation follows.
-//
-// A User is a user!
-type OmitEmptyQueryUsersUser struct {
-	// id is the user's ID.
-	//
-	// It is stable, unique, and opaque, like all good IDs.
-	Id string `json:"id"`
-}
-
-// GetId returns OmitEmptyQueryUsersUser.Id, and is useful for accessing the field via an interface.
-func (v *OmitEmptyQueryUsersUser) GetId() string { return v.Id }
-
-// PointersOmitEmptyQueryOtherUser includes the requested fields of the GraphQL type User.
-// The GraphQL type's documentation follows.
-//
-// A User is a user!
-type PointersOmitEmptyQueryOtherUser struct {
-	// id is the user's ID.
-	//
-	// It is stable, unique, and opaque, like all good IDs.
-	Id string `json:"id"`
-}
-
-// GetId returns PointersOmitEmptyQueryOtherUser.Id, and is useful for accessing the field via an interface.
-func (v *PointersOmitEmptyQueryOtherUser) GetId() string { return v.Id }
-
-// PointersOmitEmptyQueryResponse is returned by PointersOmitEmptyQuery on success.
-type PointersOmitEmptyQueryResponse struct {
-	// user looks up a user by some stuff.
-	//
-	// See UserQueryInput for what stuff is supported.
-	// If query is null, returns the current user.
-	User *PointersOmitEmptyQueryUser `json:"user"`
-	// user looks up a user by some stuff.
-	//
-	// See UserQueryInput for what stuff is supported.
-	// If query is null, returns the current user.
-	OtherUser    *PointersOmitEmptyQueryOtherUser `json:"otherUser"`
-	MaybeConvert *time.Time                       `json:"-"`
-}
-
-// GetUser returns PointersOmitEmptyQueryResponse.User, and is useful for accessing the field via an interface.
-func (v *PointersOmitEmptyQueryResponse) GetUser() *PointersOmitEmptyQueryUser { return v.User }
-
-// GetOtherUser returns PointersOmitEmptyQueryResponse.OtherUser, and is useful for accessing the field via an interface.
-func (v *PointersOmitEmptyQueryResponse) GetOtherUser() *PointersOmitEmptyQueryOtherUser {
-	return v.OtherUser
-}
-
-// GetMaybeConvert returns PointersOmitEmptyQueryResponse.MaybeConvert, and is useful for accessing the field via an interface.
-func (v *PointersOmitEmptyQueryResponse) GetMaybeConvert() *time.Time { return v.MaybeConvert }
-
-func (v *PointersOmitEmptyQueryResponse) UnmarshalJSON(b []byte) error {
-
-	if string(b) == "null" {
-		return nil
-	}
-
-	var firstPass struct {
-		*PointersOmitEmptyQueryResponse
-		MaybeConvert json.RawMessage `json:"maybeConvert"`
-		graphql.NoUnmarshalJSON
-	}
-	firstPass.PointersOmitEmptyQueryResponse = v
-
-	err := json.Unmarshal(b, &firstPass)
-	if err != nil {
-		return err
-	}
-
-	{
-		dst := &v.MaybeConvert
-		src := firstPass.MaybeConvert
-		if len(src) != 0 && string(src) != "null" {
-			*dst = new(time.Time)
-			err = testutil.UnmarshalDate(
-				src, *dst)
-			if err != nil {
-				return fmt.Errorf(
-					"unable to unmarshal PointersOmitEmptyQueryResponse.MaybeConvert: %w", err)
-			}
-		}
-	}
-	return nil
-}
-
-type __premarshalPointersOmitEmptyQueryResponse struct {
-	User *PointersOmitEmptyQueryUser `json:"user"`
-
-	OtherUser *PointersOmitEmptyQueryOtherUser `json:"otherUser"`
-
-	MaybeConvert json.RawMessage `json:"maybeConvert"`
-}
-
-func (v *PointersOmitEmptyQueryResponse) MarshalJSON() ([]byte, error) {
-	premarshaled, err := v.__premarshalJSON()
-	if err != nil {
-		return nil, err
-	}
-	return json.Marshal(premarshaled)
-}
-
-func (v *PointersOmitEmptyQueryResponse) __premarshalJSON() (*__premarshalPointersOmitEmptyQueryResponse, error) {
-	var retval __premarshalPointersOmitEmptyQueryResponse
-
-	retval.User = v.User
-	retval.OtherUser = v.OtherUser
-	{
-
-		dst := &retval.MaybeConvert
-		src := v.MaybeConvert
-		if src != nil {
-			var err error
-			*dst, err = testutil.MarshalDate(
-				src)
-			if err != nil {
-				return nil, fmt.Errorf(
-					"unable to marshal PointersOmitEmptyQueryResponse.MaybeConvert: %w", err)
-			}
-		}
-	}
-	return &retval, nil
-}
-
-// PointersOmitEmptyQueryUser includes the requested fields of the GraphQL type User.
-// The GraphQL type's documentation follows.
-//
-// A User is a user!
-type PointersOmitEmptyQueryUser struct {
-	// id is the user's ID.
-	//
-	// It is stable, unique, and opaque, like all good IDs.
-	Id          *string  `json:"id"`
-	Roles       []Role   `json:"roles"`
-	Name        *string  `json:"name"`
-	Emails      []string `json:"emails"`
-	EmailsNoPtr []string `json:"emailsNoPtr"`
-}
-
-// GetId returns PointersOmitEmptyQueryUser.Id, and is useful for accessing the field via an interface.
-func (v *PointersOmitEmptyQueryUser) GetId() *string { return v.Id }
-
-// GetRoles returns PointersOmitEmptyQueryUser.Roles, and is useful for accessing the field via an interface.
-func (v *PointersOmitEmptyQueryUser) GetRoles() []Role { return v.Roles }
-
-// GetName returns PointersOmitEmptyQueryUser.Name, and is useful for accessing the field via an interface.
-func (v *PointersOmitEmptyQueryUser) GetName() *string { return v.Name }
-
-// GetEmails returns PointersOmitEmptyQueryUser.Emails, and is useful for accessing the field via an interface.
-func (v *PointersOmitEmptyQueryUser) GetEmails() []string { return v.Emails }
-
-// GetEmailsNoPtr returns PointersOmitEmptyQueryUser.EmailsNoPtr, and is useful for accessing the field via an interface.
-func (v *PointersOmitEmptyQueryUser) GetEmailsNoPtr() []string { return v.EmailsNoPtr }
-
-type PokemonInput struct {
-	Species string `json:"species"`
-	Level   int    `json:"level"`
-}
-
-// GetSpecies returns PokemonInput.Species, and is useful for accessing the field via an interface.
-func (v *PokemonInput) GetSpecies() string { return v.Species }
-
-// GetLevel returns PokemonInput.Level, and is useful for accessing the field via an interface.
-func (v *PokemonInput) GetLevel() int { return v.Level }
-
-// Role is a type a user may have.
-type Role string
-
-const (
-	// What is a student?
-	//
-	// A student is primarily a person enrolled in a school or other educational institution and who is under learning with goals of acquiring knowledge, developing professions and achieving employment at desired field. In the broader sense, a student is anyone who applies themselves to the intensive intellectual engagement with some matter necessary to master it as part of some practical affair in which such mastery is basic or decisive.
-	//
-	// (from [Wikipedia](https://en.wikipedia.org/wiki/Student))
-	RoleStudent Role = "STUDENT"
-	// Teacher is a teacher, who teaches the students.
-	RoleTeacher Role = "TEACHER"
-)
-
-var AllRole = []Role{
-	RoleStudent,
-	RoleTeacher,
-}
-
-// UserQueryInput is the argument to Query.users.
-//
-// Ideally this would support anything and everything!
-// Or maybe ideally it wouldn't.
-// Really I'm just talking to make this documentation longer.
-type UserQueryInput struct {
-	Email *string `json:"email,omitempty"`
-	Name  *string `json:"name,omitempty"`
-	// id looks the user up by ID.  It's a great way to look up users.
-	Id         *string       `json:"id,omitempty"`
-	Role       *Role         `json:"role,omitempty"`
-	Names      []*string     `json:"names,omitempty"`
-	HasPokemon *PokemonInput `json:"hasPokemon,omitempty"`
-	Birthdate  *time.Time    `json:"-"`
-}
-
-// GetEmail returns UserQueryInput.Email, and is useful for accessing the field via an interface.
-func (v *UserQueryInput) GetEmail() *string { return v.Email }
-
-// GetName returns UserQueryInput.Name, and is useful for accessing the field via an interface.
-func (v *UserQueryInput) GetName() *string { return v.Name }
-
-// GetId returns UserQueryInput.Id, and is useful for accessing the field via an interface.
-func (v *UserQueryInput) GetId() *string { return v.Id }
-
-// GetRole returns UserQueryInput.Role, and is useful for accessing the field via an interface.
-func (v *UserQueryInput) GetRole() *Role { return v.Role }
-
-// GetNames returns UserQueryInput.Names, and is useful for accessing the field via an interface.
-func (v *UserQueryInput) GetNames() []*string { return v.Names }
-
-// GetHasPokemon returns UserQueryInput.HasPokemon, and is useful for accessing the field via an interface.
-func (v *UserQueryInput) GetHasPokemon() *PokemonInput { return v.HasPokemon }
-
-// GetBirthdate returns UserQueryInput.Birthdate, and is useful for accessing the field via an interface.
-func (v *UserQueryInput) GetBirthdate() *time.Time { return v.Birthdate }
-
-func (v *UserQueryInput) UnmarshalJSON(b []byte) error {
-
-	if string(b) == "null" {
-		return nil
-	}
-
-	var firstPass struct {
-		*UserQueryInput
-		Birthdate json.RawMessage `json:"birthdate"`
-		graphql.NoUnmarshalJSON
-	}
-	firstPass.UserQueryInput = v
-
-	err := json.Unmarshal(b, &firstPass)
-	if err != nil {
-		return err
-	}
-
-	{
-		dst := &v.Birthdate
-		src := firstPass.Birthdate
-		if len(src) != 0 && string(src) != "null" {
-			*dst = new(time.Time)
-			err = testutil.UnmarshalDate(
-				src, *dst)
-			if err != nil {
-				return fmt.Errorf(
-					"unable to unmarshal UserQueryInput.Birthdate: %w", err)
-			}
-		}
-	}
-	return nil
-}
-
-type __premarshalUserQueryInput struct {
-	Email *string `json:"email,omitempty"`
-
-	Name *string `json:"name,omitempty"`
-
-	Id *string `json:"id,omitempty"`
-
-	Role *Role `json:"role,omitempty"`
-
-	Names []*string `json:"names,omitempty"`
-
-	HasPokemon *PokemonInput `json:"hasPokemon,omitempty"`
-
-	Birthdate json.RawMessage `json:"birthdate,omitempty"`
-}
-
-func (v *UserQueryInput) MarshalJSON() ([]byte, error) {
-	premarshaled, err := v.__premarshalJSON()
-	if err != nil {
-		return nil, err
-	}
-	return json.Marshal(premarshaled)
-}
-
-func (v *UserQueryInput) __premarshalJSON() (*__premarshalUserQueryInput, error) {
-	var retval __premarshalUserQueryInput
-
-	retval.Email = v.Email
-	retval.Name = v.Name
-	retval.Id = v.Id
-	retval.Role = v.Role
-	retval.Names = v.Names
-	retval.HasPokemon = v.HasPokemon
-	{
-
-		dst := &retval.Birthdate
-		src := v.Birthdate
-		if src != nil {
-			var err error
-			*dst, err = testutil.MarshalDate(
-				src)
-			if err != nil {
-				return nil, fmt.Errorf(
-					"unable to marshal UserQueryInput.Birthdate: %w", err)
-			}
-		}
-	}
-	return &retval, nil
-}
-
-// __InputObjectQueryInput is used internally by genqlient
-type __InputObjectQueryInput struct {
-	Query *UserQueryInput `json:"query,omitempty"`
-}
-
-// GetQuery returns __InputObjectQueryInput.Query, and is useful for accessing the field via an interface.
-func (v *__InputObjectQueryInput) GetQuery() *UserQueryInput { return v.Query }
-
-// __ListInputQueryInput is used internally by genqlient
-type __ListInputQueryInput struct {
-	Names []*string `json:"names,omitempty"`
-}
-
-// GetNames returns __ListInputQueryInput.Names, and is useful for accessing the field via an interface.
-func (v *__ListInputQueryInput) GetNames() []*string { return v.Names }
-
-// __OmitEmptyQueryInput is used internally by genqlient
-type __OmitEmptyQueryInput struct {
-	Query         *UserQueryInput   `json:"query,omitempty"`
-	Queries       []*UserQueryInput `json:"queries,omitempty"`
-	Dt            *time.Time        `json:"-"`
-	Tz            *string           `json:"tz,omitempty"`
-	TzNoOmitEmpty *string           `json:"tzNoOmitEmpty"`
-}
-
-// GetQuery returns __OmitEmptyQueryInput.Query, and is useful for accessing the field via an interface.
-func (v *__OmitEmptyQueryInput) GetQuery() *UserQueryInput { return v.Query }
-
-// GetQueries returns __OmitEmptyQueryInput.Queries, and is useful for accessing the field via an interface.
-func (v *__OmitEmptyQueryInput) GetQueries() []*UserQueryInput { return v.Queries }
-
-// GetDt returns __OmitEmptyQueryInput.Dt, and is useful for accessing the field via an interface.
-func (v *__OmitEmptyQueryInput) GetDt() *time.Time { return v.Dt }
-
-// GetTz returns __OmitEmptyQueryInput.Tz, and is useful for accessing the field via an interface.
-func (v *__OmitEmptyQueryInput) GetTz() *string { return v.Tz }
-
-// GetTzNoOmitEmpty returns __OmitEmptyQueryInput.TzNoOmitEmpty, and is useful for accessing the field via an interface.
-func (v *__OmitEmptyQueryInput) GetTzNoOmitEmpty() *string { return v.TzNoOmitEmpty }
-
-func (v *__OmitEmptyQueryInput) UnmarshalJSON(b []byte) error {
-
-	if string(b) == "null" {
-		return nil
-	}
-
-	var firstPass struct {
-		*__OmitEmptyQueryInput
-		Dt json.RawMessage `json:"dt"`
-		graphql.NoUnmarshalJSON
-	}
-	firstPass.__OmitEmptyQueryInput = v
-
-	err := json.Unmarshal(b, &firstPass)
-	if err != nil {
-		return err
-	}
-
-	{
-		dst := &v.Dt
-		src := firstPass.Dt
-		if len(src) != 0 && string(src) != "null" {
-			*dst = new(time.Time)
-			err = testutil.UnmarshalDate(
-				src, *dst)
-			if err != nil {
-				return fmt.Errorf(
-					"unable to unmarshal __OmitEmptyQueryInput.Dt: %w", err)
-			}
-		}
-	}
-	return nil
-}
-
-type __premarshal__OmitEmptyQueryInput struct {
-	Query *UserQueryInput `json:"query,omitempty"`
-
-	Queries []*UserQueryInput `json:"queries,omitempty"`
-
-	Dt json.RawMessage `json:"dt,omitempty"`
-
-	Tz *string `json:"tz,omitempty"`
-
-	TzNoOmitEmpty *string `json:"tzNoOmitEmpty"`
-}
-
-func (v *__OmitEmptyQueryInput) MarshalJSON() ([]byte, error) {
-	premarshaled, err := v.__premarshalJSON()
-	if err != nil {
-		return nil, err
-	}
-	return json.Marshal(premarshaled)
-}
-
-func (v *__OmitEmptyQueryInput) __premarshalJSON() (*__premarshal__OmitEmptyQueryInput, error) {
-	var retval __premarshal__OmitEmptyQueryInput
-
-	retval.Query = v.Query
-	retval.Queries = v.Queries
-	{
-
-		dst := &retval.Dt
-		src := v.Dt
-		if src != nil {
-			var err error
-			*dst, err = testutil.MarshalDate(
-				src)
-			if err != nil {
-				return nil, fmt.Errorf(
-					"unable to marshal __OmitEmptyQueryInput.Dt: %w", err)
-			}
-		}
-	}
-	retval.Tz = v.Tz
-	retval.TzNoOmitEmpty = v.TzNoOmitEmpty
-	return &retval, nil
-}
-
-// __PointersOmitEmptyQueryInput is used internally by genqlient
-type __PointersOmitEmptyQueryInput struct {
-	Query *UserQueryInput `json:"query,omitempty"`
-	Dt    *time.Time      `json:"-"`
-	Tz    string          `json:"tz,omitempty"`
-}
-
-// GetQuery returns __PointersOmitEmptyQueryInput.Query, and is useful for accessing the field via an interface.
-func (v *__PointersOmitEmptyQueryInput) GetQuery() *UserQueryInput { return v.Query }
-
-// GetDt returns __PointersOmitEmptyQueryInput.Dt, and is useful for accessing the field via an interface.
-func (v *__PointersOmitEmptyQueryInput) GetDt() *time.Time { return v.Dt }
-
-// GetTz returns __PointersOmitEmptyQueryInput.Tz, and is useful for accessing the field via an interface.
-func (v *__PointersOmitEmptyQueryInput) GetTz() string { return v.Tz }
-
-func (v *__PointersOmitEmptyQueryInput) UnmarshalJSON(b []byte) error {
-
-	if string(b) == "null" {
-		return nil
-	}
-
-	var firstPass struct {
-		*__PointersOmitEmptyQueryInput
-		Dt json.RawMessage `json:"dt"`
-		graphql.NoUnmarshalJSON
-	}
-	firstPass.__PointersOmitEmptyQueryInput = v
-
-	err := json.Unmarshal(b, &firstPass)
-	if err != nil {
-		return err
-	}
-
-	{
-		dst := &v.Dt
-		src := firstPass.Dt
-		if len(src) != 0 && string(src) != "null" {
-			*dst = new(time.Time)
-			err = testutil.UnmarshalDate(
-				src, *dst)
-			if err != nil {
-				return fmt.Errorf(
-					"unable to unmarshal __PointersOmitEmptyQueryInput.Dt: %w", err)
-			}
-		}
-	}
-	return nil
-}
-
-type __premarshal__PointersOmitEmptyQueryInput struct {
-	Query *UserQueryInput `json:"query,omitempty"`
-
-	Dt json.RawMessage `json:"dt,omitempty"`
-
-	Tz string `json:"tz,omitempty"`
-}
-
-func (v *__PointersOmitEmptyQueryInput) MarshalJSON() ([]byte, error) {
-	premarshaled, err := v.__premarshalJSON()
-	if err != nil {
-		return nil, err
-	}
-	return json.Marshal(premarshaled)
-}
-
-func (v *__PointersOmitEmptyQueryInput) __premarshalJSON() (*__premarshal__PointersOmitEmptyQueryInput, error) {
-	var retval __premarshal__PointersOmitEmptyQueryInput
-
-	retval.Query = v.Query
-	{
-
-		dst := &retval.Dt
-		src := v.Dt
-		if src != nil {
-			var err error
-			*dst, err = testutil.MarshalDate(
-				src)
-			if err != nil {
-				return nil, fmt.Errorf(
-					"unable to marshal __PointersOmitEmptyQueryInput.Dt: %w", err)
-			}
-		}
-	}
-	retval.Tz = v.Tz
-	return &retval, nil
-}
-
-// The query executed by InputObjectQuery.
-const InputObjectQuery_Operation = `
-query InputObjectQuery ($query: UserQueryInput) {
-	user(query: $query) {
-		id
-	}
-}
-`
-
-func InputObjectQuery(
-	ctx_ context.Context,
-	client_ graphql.Client,
-	query *UserQueryInput,
-) (data_ *InputObjectQueryResponse, err_ error) {
-	req_ := &graphql.Request{
-		OpName: "InputObjectQuery",
-		Query:  InputObjectQuery_Operation,
-		Variables: &__InputObjectQueryInput{
-			Query: query,
-		},
-	}
-
-	data_ = &InputObjectQueryResponse{}
-	resp_ := &graphql.Response{Data: data_}
-
-	err_ = client_.MakeRequest(
-		ctx_,
-		req_,
-		resp_,
-	)
-
-	return data_, err_
-}
-
-// The query executed by ListInputQuery.
-const ListInputQuery_Operation = `
-query ListInputQuery ($names: [String]) {
-	user(query: {names:$names}) {
-		id
-	}
-}
-`
-
-func ListInputQuery(
-	ctx_ context.Context,
-	client_ graphql.Client,
-	names []*string,
-) (data_ *ListInputQueryResponse, err_ error) {
-	req_ := &graphql.Request{
-		OpName: "ListInputQuery",
-		Query:  ListInputQuery_Operation,
-		Variables: &__ListInputQueryInput{
-			Names: names,
-		},
-	}
-
-	data_ = &ListInputQueryResponse{}
-	resp_ := &graphql.Response{Data: data_}
-
-	err_ = client_.MakeRequest(
-		ctx_,
-		req_,
-		resp_,
-	)
-
-	return data_, err_
-}
-
-// The query executed by OmitEmptyQuery.
-const OmitEmptyQuery_Operation = `
-query OmitEmptyQuery ($query: UserQueryInput, $queries: [UserQueryInput], $dt: DateTime, $tz: String, $tzNoOmitEmpty: String) {
-	user(query: $query) {
-		id
-	}
-	users(query: $queries) {
-		id
-	}
-	maybeConvert(dt: $dt, tz: $tz)
-	convert2: maybeConvert(dt: $dt, tz: $tzNoOmitEmpty)
-}
-`
-
-func OmitEmptyQuery(
-	ctx_ context.Context,
-	client_ graphql.Client,
-	query *UserQueryInput,
-	queries []*UserQueryInput,
-	dt *time.Time,
-	tz *string,
-	tzNoOmitEmpty *string,
-) (data_ *OmitEmptyQueryResponse, err_ error) {
-	req_ := &graphql.Request{
-		OpName: "OmitEmptyQuery",
-		Query:  OmitEmptyQuery_Operation,
-		Variables: &__OmitEmptyQueryInput{
-			Query:         query,
-			Queries:       queries,
-			Dt:            dt,
-			Tz:            tz,
-			TzNoOmitEmpty: tzNoOmitEmpty,
-		},
-	}
-
-	data_ = &OmitEmptyQueryResponse{}
-	resp_ := &graphql.Response{Data: data_}
-
-	err_ = client_.MakeRequest(
-		ctx_,
-		req_,
-		resp_,
-	)
-
-	return data_, err_
-}
-
-// The query executed by PointersOmitEmptyQuery.
-const PointersOmitEmptyQuery_Operation = `
-query PointersOmitEmptyQuery ($query: UserQueryInput, $dt: DateTime, $tz: String) {
-	user(query: $query) {
-		id
-		roles
-		name
-		emails
-		emailsNoPtr: emails
-	}
-	otherUser: user(query: $query) {
-		id
-	}
-	maybeConvert(dt: $dt, tz: $tz)
-}
-`
-
-func PointersOmitEmptyQuery(
-	ctx_ context.Context,
-	client_ graphql.Client,
-	query *UserQueryInput,
-	dt *time.Time,
-	tz string,
-) (data_ *PointersOmitEmptyQueryResponse, err_ error) {
-	req_ := &graphql.Request{
-		OpName: "PointersOmitEmptyQuery",
-		Query:  PointersOmitEmptyQuery_Operation,
-		Variables: &__PointersOmitEmptyQueryInput{
-			Query: query,
-			Dt:    dt,
-			Tz:    tz,
-		},
-	}
-
-	data_ = &PointersOmitEmptyQueryResponse{}
-	resp_ := &graphql.Response{Data: data_}
-
-	err_ = client_.MakeRequest(
-		ctx_,
-		req_,
-		resp_,
-	)
-
-	return data_, err_
-}
-
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalValue-ListInput.graphql-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalValue-ListInput.graphql-testdata-queries-generated.go
new file mode 100644
index 0000000..2e74bae
--- /dev/null
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalValue-ListInput.graphql-testdata-queries-generated.go
@@ -0,0 +1,78 @@
+// Code generated by github.com/Khan/genqlient, DO NOT EDIT.
+
+package queries
+
+import (
+	"context"
+
+	"github.com/Khan/genqlient/graphql"
+)
+
+// ListInputQueryResponse is returned by ListInputQuery on success.
+type ListInputQueryResponse struct {
+	// user looks up a user by some stuff.
+	//
+	// See UserQueryInput for what stuff is supported.
+	// If query is null, returns the current user.
+	User ListInputQueryUser `json:"user"`
+}
+
+// GetUser returns ListInputQueryResponse.User, and is useful for accessing the field via an interface.
+func (v *ListInputQueryResponse) GetUser() ListInputQueryUser { return v.User }
+
+// ListInputQueryUser includes the requested fields of the GraphQL type User.
+// The GraphQL type's documentation follows.
+//
+// A User is a user!
+type ListInputQueryUser struct {
+	// id is the user's ID.
+	//
+	// It is stable, unique, and opaque, like all good IDs.
+	Id string `json:"id"`
+}
+
+// GetId returns ListInputQueryUser.Id, and is useful for accessing the field via an interface.
+func (v *ListInputQueryUser) GetId() string { return v.Id }
+
+// __ListInputQueryInput is used internally by genqlient
+type __ListInputQueryInput struct {
+	Names []string `json:"names"`
+}
+
+// GetNames returns __ListInputQueryInput.Names, and is useful for accessing the field via an interface.
+func (v *__ListInputQueryInput) GetNames() []string { return v.Names }
+
+// The query executed by ListInputQuery.
+const ListInputQuery_Operation = `
+query ListInputQuery ($names: [String]) {
+	user(query: {names:$names}) {
+		id
+	}
+}
+`
+
+func ListInputQuery(
+	ctx_ context.Context,
+	client_ graphql.Client,
+	names []string,
+) (data_ *ListInputQueryResponse, err_ error) {
+	req_ := &graphql.Request{
+		OpName: "ListInputQuery",
+		Query:  ListInputQuery_Operation,
+		Variables: &__ListInputQueryInput{
+			Names: names,
+		},
+	}
+
+	data_ = &ListInputQueryResponse{}
+	resp_ := &graphql.Response{Data: data_}
+
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
+	)
+
+	return data_, err_
+}
+
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalValue-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalValue-QueryWithSlices.graphql-testdata-queries-generated.go
similarity index 56%
rename from generate/testdata/snapshots/TestGenerateWithConfig-OptionalValue-testdata-queries-generated.go
rename to generate/testdata/snapshots/TestGenerateWithConfig-OptionalValue-QueryWithSlices.graphql-testdata-queries-generated.go
index bdf9244..cbce648 100644
--- a/generate/testdata/snapshots/TestGenerateWithConfig-OptionalValue-testdata-queries-generated.go
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-OptionalValue-QueryWithSlices.graphql-testdata-queries-generated.go
@@ -8,32 +8,6 @@ import (
 	"github.com/Khan/genqlient/graphql"
 )
 
-// ListInputQueryResponse is returned by ListInputQuery on success.
-type ListInputQueryResponse struct {
-	// user looks up a user by some stuff.
-	//
-	// See UserQueryInput for what stuff is supported.
-	// If query is null, returns the current user.
-	User ListInputQueryUser `json:"user"`
-}
-
-// GetUser returns ListInputQueryResponse.User, and is useful for accessing the field via an interface.
-func (v *ListInputQueryResponse) GetUser() ListInputQueryUser { return v.User }
-
-// ListInputQueryUser includes the requested fields of the GraphQL type User.
-// The GraphQL type's documentation follows.
-//
-// A User is a user!
-type ListInputQueryUser struct {
-	// id is the user's ID.
-	//
-	// It is stable, unique, and opaque, like all good IDs.
-	Id string `json:"id"`
-}
-
-// GetId returns ListInputQueryUser.Id, and is useful for accessing the field via an interface.
-func (v *ListInputQueryUser) GetId() string { return v.Id }
-
 // QueryWithSlicesResponse is returned by QueryWithSlices on success.
 type QueryWithSlicesResponse struct {
 	// user looks up a user by some stuff.
@@ -69,48 +43,6 @@ func (v *QueryWithSlicesUser) GetEmailsWithNulls() []string { return v.EmailsWit
 // GetEmailsWithNullsOrNull returns QueryWithSlicesUser.EmailsWithNullsOrNull, and is useful for accessing the field via an interface.
 func (v *QueryWithSlicesUser) GetEmailsWithNullsOrNull() []string { return v.EmailsWithNullsOrNull }
 
-// __ListInputQueryInput is used internally by genqlient
-type __ListInputQueryInput struct {
-	Names []string `json:"names"`
-}
-
-// GetNames returns __ListInputQueryInput.Names, and is useful for accessing the field via an interface.
-func (v *__ListInputQueryInput) GetNames() []string { return v.Names }
-
-// The query executed by ListInputQuery.
-const ListInputQuery_Operation = `
-query ListInputQuery ($names: [String]) {
-	user(query: {names:$names}) {
-		id
-	}
-}
-`
-
-func ListInputQuery(
-	ctx_ context.Context,
-	client_ graphql.Client,
-	names []string,
-) (data_ *ListInputQueryResponse, err_ error) {
-	req_ := &graphql.Request{
-		OpName: "ListInputQuery",
-		Query:  ListInputQuery_Operation,
-		Variables: &__ListInputQueryInput{
-			Names: names,
-		},
-	}
-
-	data_ = &ListInputQueryResponse{}
-	resp_ := &graphql.Response{Data: data_}
-
-	err_ = client_.MakeRequest(
-		ctx_,
-		req_,
-		resp_,
-	)
-
-	return data_, err_
-}
-
 // The query executed by QueryWithSlices.
 const QueryWithSlices_Operation = `
 query QueryWithSlices {
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-PackageBindings-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-PackageBindings-SimpleQuery.graphql-testdata-queries-generated.go
similarity index 100%
rename from generate/testdata/snapshots/TestGenerateWithConfig-PackageBindings-testdata-queries-generated.go
rename to generate/testdata/snapshots/TestGenerateWithConfig-PackageBindings-SimpleQuery.graphql-testdata-queries-generated.go
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-PackageName-testdata-queries-myfile.go b/generate/testdata/snapshots/TestGenerateWithConfig-PackageName-SimpleQuery.graphql-testdata-queries-myfile.go
similarity index 100%
rename from generate/testdata/snapshots/TestGenerateWithConfig-PackageName-testdata-queries-myfile.go
rename to generate/testdata/snapshots/TestGenerateWithConfig-PackageName-SimpleQuery.graphql-testdata-queries-myfile.go
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-StructReferences-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-StructReferences-InputObject.graphql-testdata-queries-generated.go
similarity index 74%
rename from generate/testdata/snapshots/TestGenerateWithConfig-StructReferences-testdata-queries-generated.go
rename to generate/testdata/snapshots/TestGenerateWithConfig-StructReferences-InputObject.graphql-testdata-queries-generated.go
index 771a13e..4031d22 100644
--- a/generate/testdata/snapshots/TestGenerateWithConfig-StructReferences-testdata-queries-generated.go
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-StructReferences-InputObject.graphql-testdata-queries-generated.go
@@ -49,43 +49,6 @@ func (v *PokemonInput) GetSpecies() string { return v.Species }
 // GetLevel returns PokemonInput.Level, and is useful for accessing the field via an interface.
 func (v *PokemonInput) GetLevel() int { return v.Level }
 
-// QueryWithStructsResponse is returned by QueryWithStructs on success.
-type QueryWithStructsResponse struct {
-	// user looks up a user by some stuff.
-	//
-	// See UserQueryInput for what stuff is supported.
-	// If query is null, returns the current user.
-	User *QueryWithStructsUser `json:"user"`
-}
-
-// GetUser returns QueryWithStructsResponse.User, and is useful for accessing the field via an interface.
-func (v *QueryWithStructsResponse) GetUser() *QueryWithStructsUser { return v.User }
-
-// QueryWithStructsUser includes the requested fields of the GraphQL type User.
-// The GraphQL type's documentation follows.
-//
-// A User is a user!
-type QueryWithStructsUser struct {
-	AuthMethods []*QueryWithStructsUserAuthMethodsAuthMethod `json:"authMethods"`
-}
-
-// GetAuthMethods returns QueryWithStructsUser.AuthMethods, and is useful for accessing the field via an interface.
-func (v *QueryWithStructsUser) GetAuthMethods() []*QueryWithStructsUserAuthMethodsAuthMethod {
-	return v.AuthMethods
-}
-
-// QueryWithStructsUserAuthMethodsAuthMethod includes the requested fields of the GraphQL type AuthMethod.
-type QueryWithStructsUserAuthMethodsAuthMethod struct {
-	Provider string `json:"provider"`
-	Email    string `json:"email"`
-}
-
-// GetProvider returns QueryWithStructsUserAuthMethodsAuthMethod.Provider, and is useful for accessing the field via an interface.
-func (v *QueryWithStructsUserAuthMethodsAuthMethod) GetProvider() string { return v.Provider }
-
-// GetEmail returns QueryWithStructsUserAuthMethodsAuthMethod.Email, and is useful for accessing the field via an interface.
-func (v *QueryWithStructsUserAuthMethodsAuthMethod) GetEmail() string { return v.Email }
-
 // Role is a type a user may have.
 type Role string
 
@@ -265,36 +228,3 @@ func InputObjectQuery(
 	return data_, err_
 }
 
-// The query executed by QueryWithStructs.
-const QueryWithStructs_Operation = `
-query QueryWithStructs {
-	user {
-		authMethods {
-			provider
-			email
-		}
-	}
-}
-`
-
-func QueryWithStructs(
-	ctx_ context.Context,
-	client_ graphql.Client,
-) (data_ *QueryWithStructsResponse, err_ error) {
-	req_ := &graphql.Request{
-		OpName: "QueryWithStructs",
-		Query:  QueryWithStructs_Operation,
-	}
-
-	data_ = &QueryWithStructsResponse{}
-	resp_ := &graphql.Response{Data: data_}
-
-	err_ = client_.MakeRequest(
-		ctx_,
-		req_,
-		resp_,
-	)
-
-	return data_, err_
-}
-
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-StructReferences-QueryWithStructs.graphql-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-StructReferences-QueryWithStructs.graphql-testdata-queries-generated.go
new file mode 100644
index 0000000..d06681e
--- /dev/null
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-StructReferences-QueryWithStructs.graphql-testdata-queries-generated.go
@@ -0,0 +1,80 @@
+// Code generated by github.com/Khan/genqlient, DO NOT EDIT.
+
+package queries
+
+import (
+	"context"
+
+	"github.com/Khan/genqlient/graphql"
+)
+
+// QueryWithStructsResponse is returned by QueryWithStructs on success.
+type QueryWithStructsResponse struct {
+	// user looks up a user by some stuff.
+	//
+	// See UserQueryInput for what stuff is supported.
+	// If query is null, returns the current user.
+	User *QueryWithStructsUser `json:"user"`
+}
+
+// GetUser returns QueryWithStructsResponse.User, and is useful for accessing the field via an interface.
+func (v *QueryWithStructsResponse) GetUser() *QueryWithStructsUser { return v.User }
+
+// QueryWithStructsUser includes the requested fields of the GraphQL type User.
+// The GraphQL type's documentation follows.
+//
+// A User is a user!
+type QueryWithStructsUser struct {
+	AuthMethods []*QueryWithStructsUserAuthMethodsAuthMethod `json:"authMethods"`
+}
+
+// GetAuthMethods returns QueryWithStructsUser.AuthMethods, and is useful for accessing the field via an interface.
+func (v *QueryWithStructsUser) GetAuthMethods() []*QueryWithStructsUserAuthMethodsAuthMethod {
+	return v.AuthMethods
+}
+
+// QueryWithStructsUserAuthMethodsAuthMethod includes the requested fields of the GraphQL type AuthMethod.
+type QueryWithStructsUserAuthMethodsAuthMethod struct {
+	Provider string `json:"provider"`
+	Email    string `json:"email"`
+}
+
+// GetProvider returns QueryWithStructsUserAuthMethodsAuthMethod.Provider, and is useful for accessing the field via an interface.
+func (v *QueryWithStructsUserAuthMethodsAuthMethod) GetProvider() string { return v.Provider }
+
+// GetEmail returns QueryWithStructsUserAuthMethodsAuthMethod.Email, and is useful for accessing the field via an interface.
+func (v *QueryWithStructsUserAuthMethodsAuthMethod) GetEmail() string { return v.Email }
+
+// The query executed by QueryWithStructs.
+const QueryWithStructs_Operation = `
+query QueryWithStructs {
+	user {
+		authMethods {
+			provider
+			email
+		}
+	}
+}
+`
+
+func QueryWithStructs(
+	ctx_ context.Context,
+	client_ graphql.Client,
+) (data_ *QueryWithStructsResponse, err_ error) {
+	req_ := &graphql.Request{
+		OpName: "QueryWithStructs",
+		Query:  QueryWithStructs_Operation,
+	}
+
+	data_ = &QueryWithStructsResponse{}
+	resp_ := &graphql.Response{Data: data_}
+
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
+	)
+
+	return data_, err_
+}
+
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-StructReferencesAndOptionalPointer-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-StructReferencesAndOptionalPointer-InputObject.graphql-testdata-queries-generated.go
similarity index 75%
rename from generate/testdata/snapshots/TestGenerateWithConfig-StructReferencesAndOptionalPointer-testdata-queries-generated.go
rename to generate/testdata/snapshots/TestGenerateWithConfig-StructReferencesAndOptionalPointer-InputObject.graphql-testdata-queries-generated.go
index 7f866d3..3ad82de 100644
--- a/generate/testdata/snapshots/TestGenerateWithConfig-StructReferencesAndOptionalPointer-testdata-queries-generated.go
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-StructReferencesAndOptionalPointer-InputObject.graphql-testdata-queries-generated.go
@@ -49,43 +49,6 @@ func (v *PokemonInput) GetSpecies() string { return v.Species }
 // GetLevel returns PokemonInput.Level, and is useful for accessing the field via an interface.
 func (v *PokemonInput) GetLevel() int { return v.Level }
 
-// QueryWithStructsResponse is returned by QueryWithStructs on success.
-type QueryWithStructsResponse struct {
-	// user looks up a user by some stuff.
-	//
-	// See UserQueryInput for what stuff is supported.
-	// If query is null, returns the current user.
-	User *QueryWithStructsUser `json:"user"`
-}
-
-// GetUser returns QueryWithStructsResponse.User, and is useful for accessing the field via an interface.
-func (v *QueryWithStructsResponse) GetUser() *QueryWithStructsUser { return v.User }
-
-// QueryWithStructsUser includes the requested fields of the GraphQL type User.
-// The GraphQL type's documentation follows.
-//
-// A User is a user!
-type QueryWithStructsUser struct {
-	AuthMethods []*QueryWithStructsUserAuthMethodsAuthMethod `json:"authMethods"`
-}
-
-// GetAuthMethods returns QueryWithStructsUser.AuthMethods, and is useful for accessing the field via an interface.
-func (v *QueryWithStructsUser) GetAuthMethods() []*QueryWithStructsUserAuthMethodsAuthMethod {
-	return v.AuthMethods
-}
-
-// QueryWithStructsUserAuthMethodsAuthMethod includes the requested fields of the GraphQL type AuthMethod.
-type QueryWithStructsUserAuthMethodsAuthMethod struct {
-	Provider *string `json:"provider"`
-	Email    *string `json:"email"`
-}
-
-// GetProvider returns QueryWithStructsUserAuthMethodsAuthMethod.Provider, and is useful for accessing the field via an interface.
-func (v *QueryWithStructsUserAuthMethodsAuthMethod) GetProvider() *string { return v.Provider }
-
-// GetEmail returns QueryWithStructsUserAuthMethodsAuthMethod.Email, and is useful for accessing the field via an interface.
-func (v *QueryWithStructsUserAuthMethodsAuthMethod) GetEmail() *string { return v.Email }
-
 // Role is a type a user may have.
 type Role string
 
@@ -268,36 +231,3 @@ func InputObjectQuery(
 	return data_, err_
 }
 
-// The query executed by QueryWithStructs.
-const QueryWithStructs_Operation = `
-query QueryWithStructs {
-	user {
-		authMethods {
-			provider
-			email
-		}
-	}
-}
-`
-
-func QueryWithStructs(
-	ctx_ context.Context,
-	client_ graphql.Client,
-) (data_ *QueryWithStructsResponse, err_ error) {
-	req_ := &graphql.Request{
-		OpName: "QueryWithStructs",
-		Query:  QueryWithStructs_Operation,
-	}
-
-	data_ = &QueryWithStructsResponse{}
-	resp_ := &graphql.Response{Data: data_}
-
-	err_ = client_.MakeRequest(
-		ctx_,
-		req_,
-		resp_,
-	)
-
-	return data_, err_
-}
-
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-StructReferencesAndOptionalPointer-QueryWithStructs.graphql-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-StructReferencesAndOptionalPointer-QueryWithStructs.graphql-testdata-queries-generated.go
new file mode 100644
index 0000000..b6d0489
--- /dev/null
+++ b/generate/testdata/snapshots/TestGenerateWithConfig-StructReferencesAndOptionalPointer-QueryWithStructs.graphql-testdata-queries-generated.go
@@ -0,0 +1,80 @@
+// Code generated by github.com/Khan/genqlient, DO NOT EDIT.
+
+package queries
+
+import (
+	"context"
+
+	"github.com/Khan/genqlient/graphql"
+)
+
+// QueryWithStructsResponse is returned by QueryWithStructs on success.
+type QueryWithStructsResponse struct {
+	// user looks up a user by some stuff.
+	//
+	// See UserQueryInput for what stuff is supported.
+	// If query is null, returns the current user.
+	User *QueryWithStructsUser `json:"user"`
+}
+
+// GetUser returns QueryWithStructsResponse.User, and is useful for accessing the field via an interface.
+func (v *QueryWithStructsResponse) GetUser() *QueryWithStructsUser { return v.User }
+
+// QueryWithStructsUser includes the requested fields of the GraphQL type User.
+// The GraphQL type's documentation follows.
+//
+// A User is a user!
+type QueryWithStructsUser struct {
+	AuthMethods []*QueryWithStructsUserAuthMethodsAuthMethod `json:"authMethods"`
+}
+
+// GetAuthMethods returns QueryWithStructsUser.AuthMethods, and is useful for accessing the field via an interface.
+func (v *QueryWithStructsUser) GetAuthMethods() []*QueryWithStructsUserAuthMethodsAuthMethod {
+	return v.AuthMethods
+}
+
+// QueryWithStructsUserAuthMethodsAuthMethod includes the requested fields of the GraphQL type AuthMethod.
+type QueryWithStructsUserAuthMethodsAuthMethod struct {
+	Provider *string `json:"provider"`
+	Email    *string `json:"email"`
+}
+
+// GetProvider returns QueryWithStructsUserAuthMethodsAuthMethod.Provider, and is useful for accessing the field via an interface.
+func (v *QueryWithStructsUserAuthMethodsAuthMethod) GetProvider() *string { return v.Provider }
+
+// GetEmail returns QueryWithStructsUserAuthMethodsAuthMethod.Email, and is useful for accessing the field via an interface.
+func (v *QueryWithStructsUserAuthMethodsAuthMethod) GetEmail() *string { return v.Email }
+
+// The query executed by QueryWithStructs.
+const QueryWithStructs_Operation = `
+query QueryWithStructs {
+	user {
+		authMethods {
+			provider
+			email
+		}
+	}
+}
+`
+
+func QueryWithStructs(
+	ctx_ context.Context,
+	client_ graphql.Client,
+) (data_ *QueryWithStructsResponse, err_ error) {
+	req_ := &graphql.Request{
+		OpName: "QueryWithStructs",
+		Query:  QueryWithStructs_Operation,
+	}
+
+	data_ = &QueryWithStructsResponse{}
+	resp_ := &graphql.Response{Data: data_}
+
+	err_ = client_.MakeRequest(
+		ctx_,
+		req_,
+		resp_,
+	)
+
+	return data_, err_
+}
+
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-Subpackage-testdata-queries-mypkg-myfile.go b/generate/testdata/snapshots/TestGenerateWithConfig-Subpackage-SimpleQuery.graphql-testdata-queries-mypkg-myfile.go
similarity index 100%
rename from generate/testdata/snapshots/TestGenerateWithConfig-Subpackage-testdata-queries-mypkg-myfile.go
rename to generate/testdata/snapshots/TestGenerateWithConfig-Subpackage-SimpleQuery.graphql-testdata-queries-mypkg-myfile.go
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-SubpackageConfig-testdata-queries-mypkg-myfile.go b/generate/testdata/snapshots/TestGenerateWithConfig-SubpackageConfig-SimpleQuery.graphql-testdata-queries-mypkg-myfile.go
similarity index 100%
rename from generate/testdata/snapshots/TestGenerateWithConfig-SubpackageConfig-testdata-queries-mypkg-myfile.go
rename to generate/testdata/snapshots/TestGenerateWithConfig-SubpackageConfig-SimpleQuery.graphql-testdata-queries-mypkg-myfile.go
diff --git a/generate/testdata/snapshots/TestGenerateWithConfig-UseStructReference-testdata-queries-generated.go b/generate/testdata/snapshots/TestGenerateWithConfig-UseStructReference-UseStructReference.graphql-testdata-queries-generated.go
similarity index 100%
rename from generate/testdata/snapshots/TestGenerateWithConfig-UseStructReference-testdata-queries-generated.go
rename to generate/testdata/snapshots/TestGenerateWithConfig-UseStructReference-UseStructReference.graphql-testdata-queries-generated.go