Files
genqlient/generate/testdata/snapshots/TestGenerate-QueryWithDoubleAlias.graphql-QueryWithDoubleAlias.graphql.go
T
Adam Babik f0c2ac17a9 Move 'Code generated by' disclaimer up (#161)
`Code generated by` disclaimer should be at the top of the file, as it is demonstrated in [this article](https://go.dev/blog/generate) on The Go Blog.

The current placing breaks integration with some code formatters and linters which do no skip files generated by `genqlient`.
2021-12-20 10:04:13 -05:00

66 lines
1.8 KiB
Go

// Code generated by github.com/Khan/genqlient, DO NOT EDIT.
package test
import (
"github.com/Khan/genqlient/graphql"
"github.com/Khan/genqlient/internal/testutil"
)
// QueryWithDoubleAliasResponse is returned by QueryWithDoubleAlias on success.
type QueryWithDoubleAliasResponse 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 QueryWithDoubleAliasUser `json:"user"`
}
// GetUser returns QueryWithDoubleAliasResponse.User, and is useful for accessing the field via an interface.
func (v *QueryWithDoubleAliasResponse) GetUser() QueryWithDoubleAliasUser { return v.User }
// QueryWithDoubleAliasUser includes the requested fields of the GraphQL type User.
// The GraphQL type's documentation follows.
//
// A User is a user!
type QueryWithDoubleAliasUser struct {
// id is the user's ID.
//
// It is stable, unique, and opaque, like all good IDs.
ID testutil.ID `json:"ID"`
// id is the user's ID.
//
// It is stable, unique, and opaque, like all good IDs.
AlsoID testutil.ID `json:"AlsoID"`
}
// GetID returns QueryWithDoubleAliasUser.ID, and is useful for accessing the field via an interface.
func (v *QueryWithDoubleAliasUser) GetID() testutil.ID { return v.ID }
// GetAlsoID returns QueryWithDoubleAliasUser.AlsoID, and is useful for accessing the field via an interface.
func (v *QueryWithDoubleAliasUser) GetAlsoID() testutil.ID { return v.AlsoID }
func QueryWithDoubleAlias(
client graphql.Client,
) (*QueryWithDoubleAliasResponse, error) {
var err error
var retval QueryWithDoubleAliasResponse
err = client.MakeRequest(
nil,
"QueryWithDoubleAlias",
`
query QueryWithDoubleAlias {
user {
ID: id
AlsoID: id
}
}
`,
&retval,
nil,
)
return &retval, err
}