-
Notifications
You must be signed in to change notification settings - Fork 139
Expand file tree
/
Copy pathTestGenerateWithConfig-OptionalPointerOmitEmpty-ListInputOmitempty.graphql-testdata-queries-generated.go
More file actions
78 lines (63 loc) · 2.15 KB
/
TestGenerateWithConfig-OptionalPointerOmitEmpty-ListInputOmitempty.graphql-testdata-queries-generated.go
File metadata and controls
78 lines (63 loc) · 2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// Code generated by github.com/Khan/genqlient, DO NOT EDIT.
package queries
import (
"context"
"github.com/Khan/genqlient/graphql"
)
// ListInputOmitemptyQueryResponse is returned by ListInputOmitemptyQuery on success.
type ListInputOmitemptyQueryResponse 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 *ListInputOmitemptyQueryUser `json:"user"`
}
// GetUser returns ListInputOmitemptyQueryResponse.User, and is useful for accessing the field via an interface.
func (v *ListInputOmitemptyQueryResponse) GetUser() *ListInputOmitemptyQueryUser { return v.User }
// ListInputOmitemptyQueryUser includes the requested fields of the GraphQL type User.
// The GraphQL type's documentation follows.
//
// A User is a user!
type ListInputOmitemptyQueryUser struct {
// id is the user's ID.
//
// It is stable, unique, and opaque, like all good IDs.
Id string `json:"id"`
}
// GetId returns ListInputOmitemptyQueryUser.Id, and is useful for accessing the field via an interface.
func (v *ListInputOmitemptyQueryUser) GetId() string { return v.Id }
// __ListInputOmitemptyQueryInput is used internally by genqlient
type __ListInputOmitemptyQueryInput struct {
Names []string `json:"names,omitempty"`
}
// GetNames returns __ListInputOmitemptyQueryInput.Names, and is useful for accessing the field via an interface.
func (v *__ListInputOmitemptyQueryInput) GetNames() []string { return v.Names }
// The query executed by ListInputOmitemptyQuery.
const ListInputOmitemptyQuery_Operation = `
query ListInputOmitemptyQuery ($names: [String!]) {
user(query: {names:$names}) {
id
}
}
`
func ListInputOmitemptyQuery(
ctx_ context.Context,
client_ graphql.Client,
names []string,
) (data_ *ListInputOmitemptyQueryResponse, err_ error) {
req_ := &graphql.Request{
OpName: "ListInputOmitemptyQuery",
Query: ListInputOmitemptyQuery_Operation,
Variables: &__ListInputOmitemptyQueryInput{
Names: names,
},
}
data_ = &ListInputOmitemptyQueryResponse{}
resp_ := &graphql.Response{Data: data_}
err_ = client_.MakeRequest(
ctx_,
req_,
resp_,
)
return data_, err_
}