graph-rework
noah metz 2023-06-18 22:05:47 -06:00
parent 83a8c742e9
commit 04e4574cd3
1 changed files with 2 additions and 2 deletions

@ -80,7 +80,7 @@ func GraphiQLHandler() func(http.ResponseWriter, *http.Request) {
root.render( root.render(
React.createElement(GraphiQL, { React.createElement(GraphiQL, {
fetcher: GraphiQL.createFetcher({ fetcher: GraphiQL.createFetcher({
url: 'http://%s/gql', url: '/gql',
}), }),
defaultEditorToolsVisibility: true, defaultEditorToolsVisibility: true,
}), }),
@ -88,7 +88,7 @@ func GraphiQLHandler() func(http.ResponseWriter, *http.Request) {
</script> </script>
</body> </body>
</html> </html>
`, r.Host) `)
w.Header().Set("Content-Type", "text/html; charset=utf-8") w.Header().Set("Content-Type", "text/html; charset=utf-8")
w.WriteHeader(http.StatusOK) w.WriteHeader(http.StatusOK)