total rewrite to interface handling; not complete but it compiles
This commit is contained in:
+10
-6
@@ -8,16 +8,20 @@ import (
|
||||
"github.com/Khan/genql/graphql"
|
||||
)
|
||||
|
||||
type User struct {
|
||||
MyName *string
|
||||
}
|
||||
|
||||
type User1 struct {
|
||||
TheirName *string `json:"theirName"`
|
||||
}
|
||||
|
||||
type getUserResponse struct {
|
||||
User *struct {
|
||||
TheirName *string `json:"theirName"`
|
||||
} `json:"user"`
|
||||
User *User1 `json:"user"`
|
||||
}
|
||||
|
||||
type getViewerResponse struct {
|
||||
Viewer struct {
|
||||
MyName *string
|
||||
} `json:"viewer"`
|
||||
Viewer User `json:"viewer"`
|
||||
}
|
||||
|
||||
func getViewer(ctx context.Context, client *graphql.Client) (*getViewerResponse, error) {
|
||||
|
||||
Reference in New Issue
Block a user