Skip to content

Commit

Permalink
Fix #1776 : Edit and persist headers in GraphiQL (#1856)
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenACoffman authored Jan 29, 2022
1 parent e0b42f9 commit 7f5dce6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions graphql/playground/playground.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,12 @@ var page = template.Must(template.New("graphiql").Parse(`<!DOCTYPE html>
const subscriptionUrl = wsProto + '//' + location.host + '{{.endpoint}}';
const fetcher = GraphiQL.createFetcher({ url, subscriptionUrl });
ReactDOM.render(
React.createElement(GraphiQL, { fetcher: fetcher }),
React.createElement(GraphiQL, {
fetcher: fetcher,
headerEditorEnabled: true,
shouldPersistHeaders: true
}),
document.getElementById('graphiql'),
);
</script>
Expand Down

0 comments on commit 7f5dce6

Please sign in to comment.