From 97e2e50fd53b55ecf545ed10b1089f069935e2ac Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Sun, 18 Jun 2023 21:34:02 -0600 Subject: [PATCH] Updated gql.go to use requesturi --- gql.go | 134 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 67 insertions(+), 67 deletions(-) diff --git a/gql.go b/gql.go index b9ca2c8..369833a 100644 --- a/gql.go +++ b/gql.go @@ -19,77 +19,77 @@ import ( ) func GraphiQLHandler() func(http.ResponseWriter, *http.Request) { - graphiql_string := ` - - - - - GraphiQL - - + return func(w http.ResponseWriter, r * http.Request) { + graphiql_string := fmt.Sprintf(` - - - - - - - - -
Loading...
- - + + + + + + + +
Loading...
+ + - - -` + ); + + + + `, r.RequestURI) - return func(w http.ResponseWriter, r * http.Request) { w.Header().Set("Content-Type", "text/html; charset=utf-8") w.WriteHeader(http.StatusOK) io.WriteString(w, graphiql_string)