more wiring for configurable context/client, theoretically should be good enough for khan use

This commit is contained in:
Ben Kraft
2021-03-22 19:17:06 -07:00
parent 59ca841a6b
commit dd85597577
18 changed files with 186 additions and 53 deletions
+10 -3
View File
@@ -21,14 +21,21 @@ const (
QueryWithEnumsUserRolesRoleTeacher QueryWithEnumsUserRolesRole = "TEACHER"
)
func QueryWithEnums(client *graphql.Client) (*QueryWithEnumsResponse, error) {
func QueryWithEnums(
client *graphql.Client,
) (*QueryWithEnumsResponse, error) {
var retval QueryWithEnumsResponse
err := client.MakeRequest(nil, `
err := client.MakeRequest(
nil,
`
query QueryWithEnums {
user {
roles
}
}
`, &retval, nil)
`,
&retval,
nil,
)
return &retval, err
}