diff --git a/src/renderGraphiQL.ts b/src/renderGraphiQL.ts index a62edd4..9730ec8 100644 --- a/src/renderGraphiQL.ts +++ b/src/renderGraphiQL.ts @@ -21,6 +21,13 @@ export interface GraphiQLOptions { */ headerEditorEnabled?: boolean; + /** + * An optional boolean which enables headers to be saved to local + * storage when true. + * Defaults to false. + */ + shouldPersistHeaders?: boolean; + /** * By passing an object you may change the theme of GraphiQL. */ @@ -105,6 +112,7 @@ export function renderGraphiQL( const operationName = data.operationName; const defaultQuery = options?.defaultQuery; const headerEditorEnabled = options?.headerEditorEnabled; + const shouldPersistHeaders = options?.shouldPersistHeaders; const editorTheme = getEditorThemeParams(options?.editorTheme); return `