Files
genqlient/generate/testdata/snapshots/TestGenerate-ListInput.graphql-ListInput.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

70 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"
)
// 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 testutil.ID `json:"id"`
}
// GetId returns ListInputQueryUser.Id, and is useful for accessing the field via an interface.
func (v *ListInputQueryUser) GetId() testutil.ID { 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 }
func ListInputQuery(
client graphql.Client,
names []string,
) (*ListInputQueryResponse, error) {
__input := __ListInputQueryInput{
Names: names,
}
var err error
var retval ListInputQueryResponse
err = client.MakeRequest(
nil,
"ListInputQuery",
`
query ListInputQuery ($names: [String]) {
user(query: {names:$names}) {
id
}
}
`,
&retval,
&__input,
)
return &retval, err
}