From 40ad17c5400bbbffb8a40f94a2748de5ecb06035 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jord=C3=A3o=20Rodrigues=20Oliveira=20Rosario?= Date: Thu, 4 Jun 2020 14:45:19 -0700 Subject: [PATCH] Normalize subscriptions endpoint in `graphiql_source` (#628) The objective here is to make the Playground and GraphiQL have the same behavior with the endpoint arguments. --- juniper/CHANGELOG.md | 3 +++ juniper/src/http/graphiql.rs | 18 +++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/juniper/CHANGELOG.md b/juniper/CHANGELOG.md index 72b79bc3..1584f925 100644 --- a/juniper/CHANGELOG.md +++ b/juniper/CHANGELOG.md @@ -2,6 +2,9 @@ ## Features +- Normalization for the subscriptions_endpoint_url in the `graphiql_source`. +(See [#628](https://github.com/graphql-rust/juniper/pull/628) for more details) + - Support raw identifiers in field and argument names. (`#[object]` macro) - Most error types now implement `std::error::Error`: diff --git a/juniper/src/http/graphiql.rs b/juniper/src/http/graphiql.rs index d1cd12ce..71f56170 100644 --- a/juniper/src/http/graphiql.rs +++ b/juniper/src/http/graphiql.rs @@ -31,7 +31,23 @@ pub fn graphiql_source( let fetcher_source = r#"