From 5d54c554902f4850d5387ffb8f063ea32f211020 Mon Sep 17 00:00:00 2001
From: Fabian Diehm <59868556+fabiangfd@users.noreply.github.com>
Date: Mon, 23 Oct 2023 09:46:45 +0200
Subject: [PATCH 01/15] Added subscription_url parameter for graphiql-explorer
---
ariadne/explorer/graphiql.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/ariadne/explorer/graphiql.py b/ariadne/explorer/graphiql.py
index 8d8915a6d..c177d0c0e 100644
--- a/ariadne/explorer/graphiql.py
+++ b/ariadne/explorer/graphiql.py
@@ -43,6 +43,7 @@ def __init__(
title: str = "Ariadne GraphQL",
explorer_plugin: bool = False,
default_query: str = DEFAULT_QUERY,
+ subscription_url: str = "",
) -> None:
self.parsed_html = render_template(
GRAPHIQL_HTML,
@@ -50,6 +51,7 @@ def __init__(
"title": title,
"enable_explorer_plugin": explorer_plugin,
"default_query": escape_default_query(default_query),
+ "subscription_url": subscription_url,
},
)
From 3a72a20b39c810a898a2079e3fc57e37fb9a4acc Mon Sep 17 00:00:00 2001
From: Fabian Diehm <59868556+fabiangfd@users.noreply.github.com>
Date: Mon, 23 Oct 2023 09:49:51 +0200
Subject: [PATCH 02/15] Extended graphiql template to use subscription_url
parameter (if provided) and use default subscription url (if subscription_url
is not provided)
---
ariadne/explorer/templates/graphiql.html | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/ariadne/explorer/templates/graphiql.html b/ariadne/explorer/templates/graphiql.html
index b52fbdb41..2643d4ae8 100644
--- a/ariadne/explorer/templates/graphiql.html
+++ b/ariadne/explorer/templates/graphiql.html
@@ -70,6 +70,11 @@
\n \n\n \n\n \n\n \n