This repository was archived by the owner on Mar 20, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,13 @@ export interface GraphiQLOptions {
2121 */
2222 headerEditorEnabled ?: boolean ;
2323
24+ /**
25+ * An optional boolean which enables headers to be saved to local
26+ * storage when true.
27+ * Defaults to false.
28+ */
29+ shouldPersistHeaders ?: boolean ;
30+
2431 /**
2532 * A websocket endpoint for subscription
2633 */
@@ -63,6 +70,7 @@ export function renderGraphiQL(
6370 const operationName = data . operationName ;
6471 const defaultQuery = options ?. defaultQuery ;
6572 const headerEditorEnabled = options ?. headerEditorEnabled ;
73+ const shouldPersistHeaders = options ?. shouldPersistHeaders ;
6674 const subscriptionEndpoint = options ?. subscriptionEndpoint ;
6775 const websocketClient = options ?. websocketClient ?? 'v0' ;
6876
@@ -262,6 +270,7 @@ add "&raw" to the end of the URL within a browser.
262270 operationName: ${ safeSerialize ( operationName ) } ,
263271 defaultQuery: ${ safeSerialize ( defaultQuery ) } ,
264272 headerEditorEnabled: ${ safeSerialize ( headerEditorEnabled ) } ,
273+ shouldPersistHeaders: ${ safeSerialize ( shouldPersistHeaders ) }
265274 }),
266275 document.getElementById('graphiql')
267276 );
You can’t perform that action at this time.
0 commit comments