587f77046b
This allows client code to see the operation (query or mutation) exactly
as genqlient sends it over the wire. This data was already available in
the generated safelist.json file, but now it's easily available from Go
code as well.
Fixes #236
I have:
- [x] Written a clear PR title and description (above)
- [x] Signed the [Khan Academy CLA](https://www.khanacademy.org/r/cla)
- [x] Added tests covering my changes, if applicable
- [x] Included a link to the issue fixed, if applicable
- [x] Included documentation, for new features
- [x] Added an entry to the changelog
52 lines
1.3 KiB
Go
52 lines
1.3 KiB
Go
// Code generated by github.com/Khan/genqlient, DO NOT EDIT.
|
|
|
|
package test
|
|
|
|
import (
|
|
"github.com/Khan/genqlient/graphql"
|
|
)
|
|
|
|
// EmptyInterfaceResponse is returned by EmptyInterface on success.
|
|
type EmptyInterfaceResponse struct {
|
|
GetJunk interface{} `json:"getJunk"`
|
|
GetComplexJunk []map[string]*[]*map[string]interface{} `json:"getComplexJunk"`
|
|
}
|
|
|
|
// GetGetJunk returns EmptyInterfaceResponse.GetJunk, and is useful for accessing the field via an interface.
|
|
func (v *EmptyInterfaceResponse) GetGetJunk() interface{} { return v.GetJunk }
|
|
|
|
// GetGetComplexJunk returns EmptyInterfaceResponse.GetComplexJunk, and is useful for accessing the field via an interface.
|
|
func (v *EmptyInterfaceResponse) GetGetComplexJunk() []map[string]*[]*map[string]interface{} {
|
|
return v.GetComplexJunk
|
|
}
|
|
|
|
// The query or mutation executed by EmptyInterface.
|
|
const EmptyInterfaceOperation = `
|
|
query EmptyInterface {
|
|
getJunk
|
|
getComplexJunk
|
|
}
|
|
`
|
|
|
|
func EmptyInterface(
|
|
client graphql.Client,
|
|
) (*EmptyInterfaceResponse, error) {
|
|
req := &graphql.Request{
|
|
OpName: "EmptyInterface",
|
|
Query: EmptyInterfaceOperation,
|
|
}
|
|
var err error
|
|
|
|
var data EmptyInterfaceResponse
|
|
resp := &graphql.Response{Data: &data}
|
|
|
|
err = client.MakeRequest(
|
|
nil,
|
|
req,
|
|
resp,
|
|
)
|
|
|
|
return &data, err
|
|
}
|
|
|