Files
genqlient/generate/testdata/snapshots/TestGenerate-Recursion.graphql-Recursion.graphql.go
T
Jan-Hendrik BollandGitHub b2422452a1 Add GraphQL Extensions (#184)
This enables accessing the Extensions field, as defined in the response
format: https://spec.graphql.org/October2021/#sec-Response-Format

Extensions can be enabled using configuration option use_extensions.
This will change the return parameters of the generated client
functions. Making it a breaking change if enabled.

Since extensions are untyped as defined in the spec, the Client will
return an interface of type map[string]interface{}.
2022-03-30 13:48:01 -07:00

108 lines
3.3 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"
)
// RecursionRecurRecursive includes the requested fields of the GraphQL type Recursive.
type RecursionRecurRecursive struct {
Rec RecursionRecurRecursiveRecRecursive `json:"rec"`
}
// GetRec returns RecursionRecurRecursive.Rec, and is useful for accessing the field via an interface.
func (v *RecursionRecurRecursive) GetRec() RecursionRecurRecursiveRecRecursive { return v.Rec }
// RecursionRecurRecursiveRecRecursive includes the requested fields of the GraphQL type Recursive.
type RecursionRecurRecursiveRecRecursive struct {
Rec RecursionRecurRecursiveRecRecursiveRecRecursive `json:"rec"`
}
// GetRec returns RecursionRecurRecursiveRecRecursive.Rec, and is useful for accessing the field via an interface.
func (v *RecursionRecurRecursiveRecRecursive) GetRec() RecursionRecurRecursiveRecRecursiveRecRecursive {
return v.Rec
}
// RecursionRecurRecursiveRecRecursiveRecRecursive includes the requested fields of the GraphQL type Recursive.
type RecursionRecurRecursiveRecRecursiveRecRecursive struct {
Rec RecursionRecurRecursiveRecRecursiveRecRecursiveRecRecursive `json:"rec"`
}
// GetRec returns RecursionRecurRecursiveRecRecursiveRecRecursive.Rec, and is useful for accessing the field via an interface.
func (v *RecursionRecurRecursiveRecRecursiveRecRecursive) GetRec() RecursionRecurRecursiveRecRecursiveRecRecursiveRecRecursive {
return v.Rec
}
// RecursionRecurRecursiveRecRecursiveRecRecursiveRecRecursive includes the requested fields of the GraphQL type Recursive.
type RecursionRecurRecursiveRecRecursiveRecRecursiveRecRecursive struct {
Id testutil.ID `json:"id"`
}
// GetId returns RecursionRecurRecursiveRecRecursiveRecRecursiveRecRecursive.Id, and is useful for accessing the field via an interface.
func (v *RecursionRecurRecursiveRecRecursiveRecRecursiveRecRecursive) GetId() testutil.ID {
return v.Id
}
// RecursionResponse is returned by Recursion on success.
type RecursionResponse struct {
Recur RecursionRecurRecursive `json:"recur"`
}
// GetRecur returns RecursionResponse.Recur, and is useful for accessing the field via an interface.
func (v *RecursionResponse) GetRecur() RecursionRecurRecursive { return v.Recur }
type RecursiveInput struct {
Rec []RecursiveInput `json:"rec"`
}
// GetRec returns RecursiveInput.Rec, and is useful for accessing the field via an interface.
func (v *RecursiveInput) GetRec() []RecursiveInput { return v.Rec }
// __RecursionInput is used internally by genqlient
type __RecursionInput struct {
Input RecursiveInput `json:"input"`
}
// GetInput returns __RecursionInput.Input, and is useful for accessing the field via an interface.
func (v *__RecursionInput) GetInput() RecursiveInput { return v.Input }
func Recursion(
client graphql.Client,
input RecursiveInput,
) (*RecursionResponse, error) {
req := &graphql.Request{
OpName: "Recursion",
Query: `
query Recursion ($input: RecursiveInput!) {
recur(input: $input) {
rec {
rec {
rec {
id
}
}
}
}
}
`,
Variables: &__RecursionInput{
Input: input,
},
}
var err error
var data RecursionResponse
resp := &graphql.Response{Data: &data}
err = client.MakeRequest(
nil,
req,
resp,
)
return &data, err
}