move everything into snapshot-based testing; update it a bit

This commit is contained in:
Ben Kraft
2020-07-16 13:42:58 -07:00
parent cf7136ca65
commit 036d39622d
10 changed files with 176 additions and 199 deletions
+33
View File
@@ -0,0 +1,33 @@
package test
// Code generated by github.com/Khan/genql, DO NOT EDIT.
import (
"context"
"github.com/Khan/genql/graphql"
)
type SimpleInputQueryResponse struct {
User *User `json:"user"`
}
type User struct {
Id string `json:"id"`
}
func SimpleInputQuery(client *graphql.Client, name string) (*SimpleInputQueryResponse, error) {
variables := map[string]interface{}{
"name": name,
}
var retval SimpleInputQueryResponse
err := client.MakeRequest(context.Background(), `
query SimpleInputQuery ($name: String!) {
user(query: {name:$name}) {
id
}
}
`, &retval, variables)
return &retval, err
}