Files
genqlient/generate/testdata/queries/ListInput.graphql.go
T
Ben Kraft d449acdda3 Clarify object type documentation
Craig pointed out this is a bit confusing when you don't have all the
fields.  Now we say so, but still include the type's description in case
it's useful.

Fixes #37.
2021-04-23 18:13:32 -07:00

54 lines
1.1 KiB
Go

package test
// Code generated by github.com/Khan/genqlient, DO NOT EDIT.
import (
"github.com/Khan/genqlient/graphql"
"github.com/me/mypkg"
)
// 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"`
}
// 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 mypkg.ID `json:"id"`
}
func ListInputQuery(
client graphql.Client,
names []string,
) (*ListInputQueryResponse, error) {
variables := map[string]interface{}{
"names": names,
}
var retval ListInputQueryResponse
err := client.MakeRequest(
nil,
"ListInputQuery",
`
query ListInputQuery ($names: [String]) {
user(query: {names:$names}) {
id
}
}
`,
&retval,
variables,
)
return &retval, err
}