diff --git a/go.mod b/go.mod index 05720f0..8687144 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,5 @@ module github.com/graphql-go/handler -go 1.14 +go 1.16 + +require github.com/graphql-go/graphql v0.8.0 diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..a02c8ea --- /dev/null +++ b/go.sum @@ -0,0 +1,2 @@ +github.com/graphql-go/graphql v0.8.0 h1:JHRQMeQjofwqVvGwYnr8JnPTY0AxgVy1HpHSGPLdH0I= +github.com/graphql-go/graphql v0.8.0/go.mod h1:nKiHzRM0qopJEwCITUuIsxk9PlVlwIiiI8pnJEhordQ= diff --git a/graphiql.go b/graphiql.go index b024086..40f986e 100644 --- a/graphiql.go +++ b/graphiql.go @@ -97,12 +97,13 @@ add "&raw" to the end of the URL within a browser. height: 100vh; } </style> - <link href="//cdn.jsdelivr.net/npm/graphiql@{{ .GraphiqlVersion }}/graphiql.css" rel="stylesheet" /> + <link href="https://unpkg.com/graphiql/graphiql.min.css" rel="stylesheet" /> <script src="//cdn.jsdelivr.net/es6-promise/4.0.5/es6-promise.auto.min.js"></script> <script src="//cdn.jsdelivr.net/fetch/0.9.0/fetch.min.js"></script> - <script src="//cdn.jsdelivr.net/react/15.4.2/react.min.js"></script> - <script src="//cdn.jsdelivr.net/react/15.4.2/react-dom.min.js"></script> - <script src="//cdn.jsdelivr.net/npm/graphiql@{{ .GraphiqlVersion }}/graphiql.min.js"></script> + <script crossorigin src="https://unpkg.com/react/umd/react.production.min.js"></script> + <script crossorigin src="https://unpkg.com/react-dom/umd/react-dom.production.min.js"></script> + <script crossorigin src="https://unpkg.com/graphiql/graphiql.min.js"></script> + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.23.0/theme/solarized.css" /> </head> <body> <div id="graphiql">Loading...</div> @@ -195,6 +196,8 @@ add "&raw" to the end of the URL within a browser. response: {{ .ResultString }}, variables: {{ .VariablesString }}, operationName: {{ .OperationName }}, + shouldPersistHeaders: true, + headerEditorEnabled: true, }), document.getElementById('graphiql') );