Try example without viewer
This commit is contained in:
@@ -48,12 +48,6 @@ func Main() {
|
|||||||
}
|
}
|
||||||
graphqlClient := graphql.NewClient("https://api.github.com/graphql", &httpClient)
|
graphqlClient := graphql.NewClient("https://api.github.com/graphql", &httpClient)
|
||||||
|
|
||||||
viewerResp, err := getViewer(context.Background(), graphqlClient)
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
fmt.Println("you are", *viewerResp.Viewer.MyName)
|
|
||||||
|
|
||||||
userResp, err := getUser(context.Background(), graphqlClient, username)
|
userResp, err := getUser(context.Background(), graphqlClient, username)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user