github.com/codykaup/genqlient@v0.6.2/generate/testdata/snapshots/TestGenerate-Hasura.graphql-Hasura.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 "github.com/codykaup/genqlient/internal/testutil" 8 ) 9 10 type GetPokemonBoolExp struct { 11 And []*GetPokemonBoolExp `json:"_and"` 12 Not *GetPokemonBoolExp `json:"_not"` 13 Or []*GetPokemonBoolExp `json:"_or"` 14 Level *IntComparisonExp `json:"level"` 15 } 16 17 // GetAnd returns GetPokemonBoolExp.And, and is useful for accessing the field via an interface. 18 func (v *GetPokemonBoolExp) GetAnd() []*GetPokemonBoolExp { return v.And } 19 20 // GetNot returns GetPokemonBoolExp.Not, and is useful for accessing the field via an interface. 21 func (v *GetPokemonBoolExp) GetNot() *GetPokemonBoolExp { return v.Not } 22 23 // GetOr returns GetPokemonBoolExp.Or, and is useful for accessing the field via an interface. 24 func (v *GetPokemonBoolExp) GetOr() []*GetPokemonBoolExp { return v.Or } 25 26 // GetLevel returns GetPokemonBoolExp.Level, and is useful for accessing the field via an interface. 27 func (v *GetPokemonBoolExp) GetLevel() *IntComparisonExp { return v.Level } 28 29 // GetPokemonResponse is returned by GetPokemon on success. 30 type GetPokemonResponse struct { 31 GetPokemon []*testutil.Pokemon `json:"getPokemon"` 32 } 33 34 // GetGetPokemon returns GetPokemonResponse.GetPokemon, and is useful for accessing the field via an interface. 35 func (v *GetPokemonResponse) GetGetPokemon() []*testutil.Pokemon { return v.GetPokemon } 36 37 type IntComparisonExp struct { 38 Eq *int `json:"_eq"` 39 Gt *int `json:"_gt"` 40 Gte *int `json:"_gte"` 41 In []*int `json:"_in"` 42 IsNull *bool `json:"_isNull"` 43 Lt *int `json:"_lt"` 44 Lte *int `json:"_lte"` 45 Neq *int `json:"_neq"` 46 Nin []*int `json:"_nin"` 47 } 48 49 // GetEq returns IntComparisonExp.Eq, and is useful for accessing the field via an interface. 50 func (v *IntComparisonExp) GetEq() *int { return v.Eq } 51 52 // GetGt returns IntComparisonExp.Gt, and is useful for accessing the field via an interface. 53 func (v *IntComparisonExp) GetGt() *int { return v.Gt } 54 55 // GetGte returns IntComparisonExp.Gte, and is useful for accessing the field via an interface. 56 func (v *IntComparisonExp) GetGte() *int { return v.Gte } 57 58 // GetIn returns IntComparisonExp.In, and is useful for accessing the field via an interface. 59 func (v *IntComparisonExp) GetIn() []*int { return v.In } 60 61 // GetIsNull returns IntComparisonExp.IsNull, and is useful for accessing the field via an interface. 62 func (v *IntComparisonExp) GetIsNull() *bool { return v.IsNull } 63 64 // GetLt returns IntComparisonExp.Lt, and is useful for accessing the field via an interface. 65 func (v *IntComparisonExp) GetLt() *int { return v.Lt } 66 67 // GetLte returns IntComparisonExp.Lte, and is useful for accessing the field via an interface. 68 func (v *IntComparisonExp) GetLte() *int { return v.Lte } 69 70 // GetNeq returns IntComparisonExp.Neq, and is useful for accessing the field via an interface. 71 func (v *IntComparisonExp) GetNeq() *int { return v.Neq } 72 73 // GetNin returns IntComparisonExp.Nin, and is useful for accessing the field via an interface. 74 func (v *IntComparisonExp) GetNin() []*int { return v.Nin } 75 76 // __GetPokemonInput is used internally by genqlient 77 type __GetPokemonInput struct { 78 Where *GetPokemonBoolExp `json:"where"` 79 } 80 81 // GetWhere returns __GetPokemonInput.Where, and is useful for accessing the field via an interface. 82 func (v *__GetPokemonInput) GetWhere() *GetPokemonBoolExp { return v.Where } 83 84 // The query or mutation executed by GetPokemon. 85 const GetPokemon_Operation = ` 86 query GetPokemon ($where: getPokemonBoolExp!) { 87 getPokemon(where: $where) { 88 species 89 level 90 } 91 } 92 ` 93 94 func GetPokemon( 95 client_ graphql.Client, 96 where *GetPokemonBoolExp, 97 ) (*GetPokemonResponse, error) { 98 req_ := &graphql.Request{ 99 OpName: "GetPokemon", 100 Query: GetPokemon_Operation, 101 Variables: &__GetPokemonInput{ 102 Where: where, 103 }, 104 } 105 var err_ error 106 107 var data_ GetPokemonResponse 108 resp_ := &graphql.Response{Data: &data_} 109 110 err_ = client_.MakeRequest( 111 nil, 112 req_, 113 resp_, 114 ) 115 116 return &data_, err_ 117 } 118