From d8c2babdded7518b99696ec16c9c3e1a8680b445 Mon Sep 17 00:00:00 2001 From: Marcel Overdijk Date: Sat, 15 Jan 2022 14:54:22 +0100 Subject: [PATCH] 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 --- spring-graphql/src/main/resources/graphiql/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spring-graphql/src/main/resources/graphiql/index.html b/spring-graphql/src/main/resources/graphiql/index.html index bf1dbee9..bdcf2883 100644 --- a/spring-graphql/src/main/resources/graphiql/index.html +++ b/spring-graphql/src/main/resources/graphiql/index.html @@ -40,7 +40,8 @@ React.createElement(GraphiQL, { fetcher: gqlFetcher, defaultVariableEditorOpen: true, - headerEditorEnabled: true + headerEditorEnabled: true, + shouldPersistHeaders: true }), document.getElementById('graphiql'), );