allow globbing, and extract queries from .go files

This commit is contained in:
Ben Kraft
2021-04-01 12:34:51 -07:00
parent ec6681e715
commit eae68e43c9
38 changed files with 256 additions and 21 deletions
+42
View File
@@ -0,0 +1,42 @@
package test
// Code generated by github.com/Khan/genqlient, DO NOT EDIT.
import (
"github.com/Khan/genqlient/graphql"
)
type QueryWithEnumsResponse struct {
User QueryWithEnumsUser `json:"user"`
}
type QueryWithEnumsUser struct {
Roles []QueryWithEnumsUserRolesRole `json:"roles"`
}
type QueryWithEnumsUserRolesRole string
const (
QueryWithEnumsUserRolesRoleStudent QueryWithEnumsUserRolesRole = "STUDENT"
QueryWithEnumsUserRolesRoleTeacher QueryWithEnumsUserRolesRole = "TEACHER"
)
func QueryWithEnums(
client graphql.Client,
) (*QueryWithEnumsResponse, error) {
var retval QueryWithEnumsResponse
err := client.MakeRequest(
nil,
"QueryWithEnums",
`
query QueryWithEnums {
user {
roles
}
}
`,
&retval,
nil,
)
return &retval, err
}