From 7965e9ac30651fc37dcafa4a17c447d965ec2286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kurk=C3=B3=20Mih=C3=A1ly?= Date: Mon, 17 Jun 2019 15:52:32 +0300 Subject: [PATCH] graphql: change HandleFunc to Handle --- graphql/graphiql.go | 2 +- graphql/graphql.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/graphql/graphiql.go b/graphql/graphiql.go index dfb6b6169b..96810fa0bc 100644 --- a/graphql/graphiql.go +++ b/graphql/graphiql.go @@ -52,7 +52,7 @@ func errorJSON(msg string) []byte { return buf.Bytes() } -func (h GraphiQL) webHandler(w http.ResponseWriter, r *http.Request) { +func (h GraphiQL) ServeHTTP(w http.ResponseWriter, r *http.Request) { if r.Method != "GET" { respond(w, errorJSON("only GET requests are supported"), http.StatusMethodNotAllowed) return diff --git a/graphql/graphql.go b/graphql/graphql.go index c031bb0534..d22a3afb6f 100644 --- a/graphql/graphql.go +++ b/graphql/graphql.go @@ -1158,7 +1158,7 @@ func NewHandler(be *eth.EthAPIBackend) (http.Handler, error) { h := &relay.Handler{Schema: s} mux := http.NewServeMux() - mux.HandleFunc("/", (GraphiQL{}).webHandler) + mux.Handle("/", GraphiQL{}) mux.Handle("/graphql", h) mux.Handle("/graphql/", h) return mux, nil