redo type naming

This commit is contained in:
Ben Kraft
2021-03-19 18:40:58 -07:00
parent 58f4aff83b
commit fed38e4f55
20 changed files with 210 additions and 164 deletions
+14 -14
View File
@@ -9,28 +9,28 @@ import (
)
type InputObjectQueryResponse struct {
User *User `json:"user"`
User *InputObjectQueryUser `json:"user"`
}
type Role string
const (
StudentRole Role = "STUDENT"
TeacherRole Role = "TEACHER"
)
type User struct {
type InputObjectQueryUser struct {
Id string `json:"id"`
}
type UserQueryInput struct {
Email *string `json:"email"`
Name *string `json:"name"`
Id *string `json:"id"`
Role *Role `json:"role"`
Names []*string `json:"names"`
Email *string `json:"email"`
Name *string `json:"name"`
Id *string `json:"id"`
Role *UserQueryInputRole `json:"role"`
Names []*string `json:"names"`
}
type UserQueryInputRole string
const (
UserQueryInputRoleStudent UserQueryInputRole = "STUDENT"
UserQueryInputRoleTeacher UserQueryInputRole = "TEACHER"
)
func InputObjectQuery(client *graphql.Client, query *UserQueryInput) (*InputObjectQueryResponse, error) {
variables := map[string]interface{}{
"query": query,