Skip to content

Commit

Permalink
Fix #1776 : Edit and persist headers in GraphiQL
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenACoffman authored Jan 26, 2022
1 parent c161ab3 commit b2ecd8b
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 b2ecd8b

Please sign in to comment.