github.com/Desuuuu/genqlient@v0.5.3/generate/testdata/snapshots/TestGenerate-EmptyInterface.graphql-EmptyInterface.graphql.go (about)

     1  // Code generated by github.com/Desuuuu/genqlient, DO NOT EDIT.
     2  
     3  package test
     4  
     5  import (
     6  	"github.com/Desuuuu/genqlient/graphql"
     7  )
     8  
     9  // EmptyInterfaceResponse is returned by EmptyInterface on success.
    10  type EmptyInterfaceResponse struct {
    11  	GetJunk        interface{}                             `json:"getJunk"`
    12  	GetComplexJunk []map[string]*[]*map[string]interface{} `json:"getComplexJunk"`
    13  }
    14  
    15  // GetGetJunk returns EmptyInterfaceResponse.GetJunk, and is useful for accessing the field via an interface.
    16  func (v *EmptyInterfaceResponse) GetGetJunk() interface{} { return v.GetJunk }
    17  
    18  // GetGetComplexJunk returns EmptyInterfaceResponse.GetComplexJunk, and is useful for accessing the field via an interface.
    19  func (v *EmptyInterfaceResponse) GetGetComplexJunk() []map[string]*[]*map[string]interface{} {
    20  	return v.GetComplexJunk
    21  }
    22  
    23  func EmptyInterface(
    24  	client graphql.Client,
    25  ) (*EmptyInterfaceResponse, error) {
    26  	req := &graphql.Request{
    27  		OpName: "EmptyInterface",
    28  		Query: `
    29  query EmptyInterface {
    30  	getJunk
    31  	getComplexJunk
    32  }
    33  `,
    34  	}
    35  	var err error
    36  
    37  	var data EmptyInterfaceResponse
    38  	resp := &graphql.Response{Data: &data}
    39  
    40  	err = client.MakeRequest(
    41  		nil,
    42  		req,
    43  		resp,
    44  	)
    45  
    46  	return &data, err
    47  }
    48