52 lines
794 B
Go
52 lines
794 B
Go
package test
|
|
|
|
// Code generated by github.com/Khan/genql, DO NOT EDIT.
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/Khan/genql/graphql"
|
|
)
|
|
|
|
type Role string
|
|
|
|
const (
|
|
StudentRole Role = "STUDENT"
|
|
TeacherRole Role = "TEACHER"
|
|
)
|
|
|
|
type Role1 string
|
|
|
|
const (
|
|
StudentRole1 Role1 = "STUDENT"
|
|
TeacherRole1 Role1 = "TEACHER"
|
|
)
|
|
|
|
type User struct {
|
|
Roles []Role `json:"roles"`
|
|
}
|
|
|
|
type User1 struct {
|
|
Roles []Role1 `json:"roles"`
|
|
}
|
|
|
|
type UsesEnumTwiceQueryResponse struct {
|
|
Me *User
|
|
OtherUser *User1
|
|
}
|
|
|
|
func UsesEnumTwiceQuery(client *graphql.Client) (*UsesEnumTwiceQueryResponse, error) {
|
|
var retval UsesEnumTwiceQueryResponse
|
|
err := client.MakeRequest(context.Background(), `
|
|
query UsesEnumTwiceQuery {
|
|
Me: user {
|
|
roles
|
|
}
|
|
OtherUser: user {
|
|
roles
|
|
}
|
|
}
|
|
`, &retval, nil)
|
|
return &retval, err
|
|
}
|