From 1142d3429126759a8eacd4e7489b6374344784bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment?= Date: Mon, 22 Apr 2019 11:54:54 +0100 Subject: [PATCH] Remove supefluous check --- examples/call-graphql.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/examples/call-graphql.go b/examples/call-graphql.go index ab72c141..9ef6af54 100644 --- a/examples/call-graphql.go +++ b/examples/call-graphql.go @@ -61,12 +61,7 @@ func hasura(query string, variables interface{}, data interface{}) (err error) { return errors.New(http.StatusText(resp.StatusCode)) } - gqlQuery := GraphqlQuery{Data: data} - err = json.Unmarshal(b, &gqlQuery) - if err != nil { - return - } - return + return json.Unmarshal(b, &GraphqlQuery{Data: data}) } type User struct {