From ed328e3cf42ae911f3477beb503ae630d2c02f31 Mon Sep 17 00:00:00 2001 From: Artem Shcherbatiuk Date: Fri, 24 Jan 2025 13:51:45 +0100 Subject: [PATCH] updated graphiQL version --- graphiql.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/graphiql.go b/graphiql.go index b024086..32b7103 100644 --- a/graphiql.go +++ b/graphiql.go @@ -66,7 +66,7 @@ func renderGraphiQL(w http.ResponseWriter, params graphql.Params) { } // graphiqlVersion is the current version of GraphiQL -const graphiqlVersion = "0.11.11" +const graphiqlVersion = "3.8.3" // tmpl is the page template to render GraphiQL const graphiqlTemplate = ` @@ -100,8 +100,8 @@ add "&raw" to the end of the URL within a browser. - - + + @@ -143,12 +143,13 @@ add "&raw" to the end of the URL within a browser. var fetchURL = locationQuery(otherParams); // Defines a GraphQL fetcher using the fetch API. - function graphQLFetcher(graphQLParams) { + function graphQLFetcher(graphQLParams, opts = {headers: {}}) { return fetch(fetchURL, { method: 'post', headers: { 'Accept': 'application/json', - 'Content-Type': 'application/json' + 'Content-Type': 'application/json', + ...opts.headers }, body: JSON.stringify(graphQLParams), credentials: 'include',