Open fabiangfd opened 1 year ago
Same here, but I do not think it is due to GraphQLTransportWSHandler
because when I switch to ExplorerApollo or Playground it all works wonderful. So maybe just configuration of GraphiQL?
A quick hack:
--- ariadne/explorer/templates/graphiql.html.orig
+++ ariadne/explorer/templates/graphiql.html
@@ -70,6 +70,7 @@
<script>
var fetcher = GraphiQL.createFetcher({
url: window.location.href,
+ subscriptionUrl: `${(window.location.protocol === 'https:' ? 'wss' : 'ws')}://${window.location.host}${window.location.pathname}`,
});
function AriadneGraphiQL() {
Hi,
I am using the latest Ariadne 0.19 and just switched from the deprecated
subscriptions-transport-ws
protocol tographql-ws
for my GraphQL subscriptions. The change went smoothly for my client application, but now GraphiQL explorer displays the following error message, when I try to test a subscription via GraphiQL:Here is how I initialize my GraphQL ASGI-App: