diff --git a/ariadne/explorer/templates/graphiql.html b/ariadne/explorer/templates/graphiql.html index 505e238c..04ed91f2 100644 --- a/ariadne/explorer/templates/graphiql.html +++ b/ariadne/explorer/templates/graphiql.html @@ -82,10 +82,7 @@ '{% raw default_query %}', ); {% if enable_explorer_plugin %} - var explorerPlugin = GraphiQLPluginExplorer.useExplorerPlugin({ - query: query, - onEdit: setQuery, - }); + 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,