Add shouldPersistHeaders = true to GraphiQL options

This option allows GraphiQL to persist custom-defined HTTP headers
to local storage. This avoid developers to type those headers again each
time the page is refreshed.

Closes gh-257
This commit is contained in:
Marcel Overdijk
2022-01-15 14:54:22 +01:00
committed by Brian Clozel
parent ed8c27923f
commit d8c2babdde

View File

@@ -40,7 +40,8 @@
React.createElement(GraphiQL, {
fetcher: gqlFetcher,
defaultVariableEditorOpen: true,
headerEditorEnabled: true
headerEditorEnabled: true,
shouldPersistHeaders: true
}),
document.getElementById('graphiql'),
);