github.com/codykaup/genqlient@v0.6.2/generate/testdata/snapshots/TestGenerate-QueryWithDoubleAlias.graphql-QueryWithDoubleAlias.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  // QueryWithDoubleAliasResponse is returned by QueryWithDoubleAlias on success.
    11  type QueryWithDoubleAliasResponse struct {
    12  	// user looks up a user by some stuff.
    13  	//
    14  	// See UserQueryInput for what stuff is supported.
    15  	// If query is null, returns the current user.
    16  	User QueryWithDoubleAliasUser `json:"user"`
    17  }
    18  
    19  // GetUser returns QueryWithDoubleAliasResponse.User, and is useful for accessing the field via an interface.
    20  func (v *QueryWithDoubleAliasResponse) GetUser() QueryWithDoubleAliasUser { return v.User }
    21  
    22  // QueryWithDoubleAliasUser includes the requested fields of the GraphQL type User.
    23  // The GraphQL type's documentation follows.
    24  //
    25  // A User is a user!
    26  type QueryWithDoubleAliasUser struct {
    27  	// id is the user's ID.
    28  	//
    29  	// It is stable, unique, and opaque, like all good IDs.
    30  	ID testutil.ID `json:"ID"`
    31  	// id is the user's ID.
    32  	//
    33  	// It is stable, unique, and opaque, like all good IDs.
    34  	AlsoID testutil.ID `json:"AlsoID"`
    35  }
    36  
    37  // GetID returns QueryWithDoubleAliasUser.ID, and is useful for accessing the field via an interface.
    38  func (v *QueryWithDoubleAliasUser) GetID() testutil.ID { return v.ID }
    39  
    40  // GetAlsoID returns QueryWithDoubleAliasUser.AlsoID, and is useful for accessing the field via an interface.
    41  func (v *QueryWithDoubleAliasUser) GetAlsoID() testutil.ID { return v.AlsoID }
    42  
    43  // The query or mutation executed by QueryWithDoubleAlias.
    44  const QueryWithDoubleAlias_Operation = `
    45  query QueryWithDoubleAlias {
    46  	user {
    47  		ID: id
    48  		AlsoID: id
    49  	}
    50  }
    51  `
    52  
    53  func QueryWithDoubleAlias(
    54  	client_ graphql.Client,
    55  ) (*QueryWithDoubleAliasResponse, error) {
    56  	req_ := &graphql.Request{
    57  		OpName: "QueryWithDoubleAlias",
    58  		Query:  QueryWithDoubleAlias_Operation,
    59  	}
    60  	var err_ error
    61  
    62  	var data_ QueryWithDoubleAliasResponse
    63  	resp_ := &graphql.Response{Data: &data_}
    64  
    65  	err_ = client_.MakeRequest(
    66  		nil,
    67  		req_,
    68  		resp_,
    69  	)
    70  
    71  	return &data_, err_
    72  }
    73