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 {
21
21
*/
22
22
headerEditorEnabled ?: boolean ;
23
23
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
+
24
31
/**
25
32
* A websocket endpoint for subscription
26
33
*/
@@ -63,6 +70,7 @@ export function renderGraphiQL(
63
70
const operationName = data . operationName ;
64
71
const defaultQuery = options ?. defaultQuery ;
65
72
const headerEditorEnabled = options ?. headerEditorEnabled ;
73
+ const shouldPersistHeaders = options ?. shouldPersistHeaders ;
66
74
const subscriptionEndpoint = options ?. subscriptionEndpoint ;
67
75
const websocketClient = options ?. websocketClient ?? 'v0' ;
68
76
@@ -262,6 +270,7 @@ add "&raw" to the end of the URL within a browser.
262
270
operationName: ${ safeSerialize ( operationName ) } ,
263
271
defaultQuery: ${ safeSerialize ( defaultQuery ) } ,
264
272
headerEditorEnabled: ${ safeSerialize ( headerEditorEnabled ) } ,
273
+ shouldPersistHeaders: ${ safeSerialize ( shouldPersistHeaders ) }
265
274
}),
266
275
document.getElementById('graphiql')
267
276
);
You can’t perform that action at this time.
0 commit comments