github.com/codykaup/genqlient@v0.6.2/generate/testdata/snapshots/TestGenerate-QueryWithSlices.graphql-QueryWithSlices.graphql.go (about) 1 // Code generated by github.com/codykaup/genqlient, DO NOT EDIT. 2 3 package test 4 5 import ( 6 "github.com/codykaup/genqlient/graphql" 7 ) 8 9 // QueryWithSlicesResponse is returned by QueryWithSlices on success. 10 type QueryWithSlicesResponse struct { 11 // user looks up a user by some stuff. 12 // 13 // See UserQueryInput for what stuff is supported. 14 // If query is null, returns the current user. 15 User QueryWithSlicesUser `json:"user"` 16 } 17 18 // GetUser returns QueryWithSlicesResponse.User, and is useful for accessing the field via an interface. 19 func (v *QueryWithSlicesResponse) GetUser() QueryWithSlicesUser { return v.User } 20 21 // QueryWithSlicesUser includes the requested fields of the GraphQL type User. 22 // The GraphQL type's documentation follows. 23 // 24 // A User is a user! 25 type QueryWithSlicesUser struct { 26 Emails []string `json:"emails"` 27 EmailsOrNull []string `json:"emailsOrNull"` 28 EmailsWithNulls []string `json:"emailsWithNulls"` 29 EmailsWithNullsOrNull []string `json:"emailsWithNullsOrNull"` 30 } 31 32 // GetEmails returns QueryWithSlicesUser.Emails, and is useful for accessing the field via an interface. 33 func (v *QueryWithSlicesUser) GetEmails() []string { return v.Emails } 34 35 // GetEmailsOrNull returns QueryWithSlicesUser.EmailsOrNull, and is useful for accessing the field via an interface. 36 func (v *QueryWithSlicesUser) GetEmailsOrNull() []string { return v.EmailsOrNull } 37 38 // GetEmailsWithNulls returns QueryWithSlicesUser.EmailsWithNulls, and is useful for accessing the field via an interface. 39 func (v *QueryWithSlicesUser) GetEmailsWithNulls() []string { return v.EmailsWithNulls } 40 41 // GetEmailsWithNullsOrNull returns QueryWithSlicesUser.EmailsWithNullsOrNull, and is useful for accessing the field via an interface. 42 func (v *QueryWithSlicesUser) GetEmailsWithNullsOrNull() []string { return v.EmailsWithNullsOrNull } 43 44 // The query or mutation executed by QueryWithSlices. 45 const QueryWithSlices_Operation = ` 46 query QueryWithSlices { 47 user { 48 emails 49 emailsOrNull 50 emailsWithNulls 51 emailsWithNullsOrNull 52 } 53 } 54 ` 55 56 func QueryWithSlices( 57 client_ graphql.Client, 58 ) (*QueryWithSlicesResponse, error) { 59 req_ := &graphql.Request{ 60 OpName: "QueryWithSlices", 61 Query: QueryWithSlices_Operation, 62 } 63 var err_ error 64 65 var data_ QueryWithSlicesResponse 66 resp_ := &graphql.Response{Data: &data_} 67 68 err_ = client_.MakeRequest( 69 nil, 70 req_, 71 resp_, 72 ) 73 74 return &data_, err_ 75 } 76