From 2e3155683bcb2128a240455ebac9409d530b38c9 Mon Sep 17 00:00:00 2001 From: iafilin Date: Sat, 1 Mar 2025 22:55:44 +0300 Subject: [PATCH 1/3] Fixed using GraphiQLPluginExplorer --- ariadne/explorer/templates/graphiql.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ariadne/explorer/templates/graphiql.html b/ariadne/explorer/templates/graphiql.html index 505e238c..89f24861 100644 --- a/ariadne/explorer/templates/graphiql.html +++ b/ariadne/explorer/templates/graphiql.html @@ -82,7 +82,7 @@ '{% raw default_query %}', ); {% if enable_explorer_plugin %} - var explorerPlugin = GraphiQLPluginExplorer.useExplorerPlugin({ + var explorerPlugin = GraphiQLPluginExplorer.explorerPlugin({ query: query, onEdit: setQuery, }); From 1aaaa3f887f03f20b03d38ac74c82f39f9558aaa Mon Sep 17 00:00:00 2001 From: iafilin Date: Sat, 1 Mar 2025 23:15:35 +0300 Subject: [PATCH 2/3] Fixed bug using GraphiQLPluginExplorer --- ariadne/explorer/templates/graphiql.html | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ariadne/explorer/templates/graphiql.html b/ariadne/explorer/templates/graphiql.html index 89f24861..43b0cd1f 100644 --- a/ariadne/explorer/templates/graphiql.html +++ b/ariadne/explorer/templates/graphiql.html @@ -82,10 +82,8 @@ '{% raw default_query %}', ); {% if enable_explorer_plugin %} - var explorerPlugin = GraphiQLPluginExplorer.explorerPlugin({ - query: query, - onEdit: setQuery, - }); + var explorerPlugin = GraphiQLPluginExplorer.explorerPlugin(); + {% endif %} return React.createElement(GraphiQL, { fetcher: fetcher, From 79b95d4a69c37c087ff938d6e480863b1411d026 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Jagodzi=C5=84ski?= Date: Fri, 16 Jan 2026 13:43:20 +0100 Subject: [PATCH 3/3] fix(GraphiQLPluginExplorer): Fix unittests --- ariadne/explorer/templates/graphiql.html | 1 - tests/explorers/__snapshots__/test_explorers.ambr | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/ariadne/explorer/templates/graphiql.html b/ariadne/explorer/templates/graphiql.html index 43b0cd1f..04ed91f2 100644 --- a/ariadne/explorer/templates/graphiql.html +++ b/ariadne/explorer/templates/graphiql.html @@ -83,7 +83,6 @@ ); {% if enable_explorer_plugin %} var explorerPlugin = GraphiQLPluginExplorer.explorerPlugin(); - {% endif %} return React.createElement(GraphiQL, { fetcher: fetcher, diff --git a/tests/explorers/__snapshots__/test_explorers.ambr b/tests/explorers/__snapshots__/test_explorers.ambr index 84132a5d..8cf92800 100644 --- a/tests/explorers/__snapshots__/test_explorers.ambr +++ b/tests/explorers/__snapshots__/test_explorers.ambr @@ -231,10 +231,7 @@ '#\n# GraphiQL is an in -browser tool for writing, validating, and\n# testing GraphQL queries.\n#\n# Type queries into this side of the screen, and you will see intelligent\n# typeaheads aware of the current GraphQL type schema and live syntax and\n# validation errors highlighted within the text.\n#\n# GraphQL queries typically start with a "{" character. Lines that start\n# with a # are ignored.\n#\n# An example GraphQL query might look like:\n#\n# {\n# field(arg: "value") {\n# subField\n#\n# }\n#\n# }\n#\n# Keyboard shortcuts:\n#\n# Prettify query: Shift - Ctrl - P(or press the prettify button)\n#\n# Merge fragments: Shift - Ctrl - M(or press the merge button)\n#\n# Run Query: Ctrl - Enter(or press the play button)\n#\n# Auto Complete: Ctrl - Space(or just start typing)\n#', ); - var explorerPlugin = GraphiQLPluginExplorer.useExplorerPlugin({ - query: query, - onEdit: setQuery, - }); + var explorerPlugin = GraphiQLPluginExplorer.explorerPlugin(); return React.createElement(GraphiQL, { fetcher: fetcher,