shorten enum and input-object type-names
This commit is contained in:
+12
-12
@@ -6,6 +6,13 @@ import (
|
||||
"github.com/Khan/genqlient/graphql"
|
||||
)
|
||||
|
||||
type Role string
|
||||
|
||||
const (
|
||||
RoleStudent Role = "STUDENT"
|
||||
RoleTeacher Role = "TEACHER"
|
||||
)
|
||||
|
||||
type unexportedResponse struct {
|
||||
User unexportedUser `json:"user"`
|
||||
}
|
||||
@@ -15,20 +22,13 @@ type unexportedUser struct {
|
||||
}
|
||||
|
||||
type userQueryInput struct {
|
||||
Email string `json:"email"`
|
||||
Name string `json:"name"`
|
||||
Id string `json:"id"`
|
||||
Role userQueryInputRole `json:"role"`
|
||||
Names []string `json:"names"`
|
||||
Email string `json:"email"`
|
||||
Name string `json:"name"`
|
||||
Id string `json:"id"`
|
||||
Role Role `json:"role"`
|
||||
Names []string `json:"names"`
|
||||
}
|
||||
|
||||
type userQueryInputRole string
|
||||
|
||||
const (
|
||||
userQueryInputRoleStudent userQueryInputRole = "STUDENT"
|
||||
userQueryInputRoleTeacher userQueryInputRole = "TEACHER"
|
||||
)
|
||||
|
||||
func unexported(
|
||||
client graphql.Client,
|
||||
query userQueryInput,
|
||||
|
||||
Reference in New Issue
Block a user