From e82345243ca5197e550df03d93286bac552255d9 Mon Sep 17 00:00:00 2001
From: tyranron <tyranron@gmail.com>
Date: Wed, 25 May 2022 11:11:28 +0200
Subject: [PATCH 1/2] Release `juniper_rocket` 0.8.2 backporting upgrade to
 `rocket` 0.5.0-rc.2

---
 juniper_rocket/CHANGELOG.md              |  4 ++++
 juniper_rocket/Cargo.toml                |  4 ++--
 juniper_rocket/examples/rocket_server.rs |  6 +++---
 juniper_rocket/src/lib.rs                | 15 +++++++++------
 4 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/juniper_rocket/CHANGELOG.md b/juniper_rocket/CHANGELOG.md
index 064bca28..49b3bf27 100644
--- a/juniper_rocket/CHANGELOG.md
+++ b/juniper_rocket/CHANGELOG.md
@@ -2,6 +2,10 @@
 
 - Compatibility with the latest `juniper`.
 
+# [[0.8.2] 2022-05-25](https://github.com/graphql-rust/juniper/releases/tag/juniper_rocket-v0.8.2)
+
+- `rocket` version is now `0.5.0-rc.2`.
+
 # [[0.8.1] 2022-03-29](https://github.com/graphql-rust/juniper/releases/tag/juniper_rocket-v0.8.1)
 
 - Ability to set custom request body size limit ([#1044](https://github.com/graphql-rust/juniper/pull/1044)).
diff --git a/juniper_rocket/Cargo.toml b/juniper_rocket/Cargo.toml
index d330b51d..fe36d6e2 100644
--- a/juniper_rocket/Cargo.toml
+++ b/juniper_rocket/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "juniper_rocket"
-version = "0.8.1"
+version = "0.8.2"
 edition = "2018"
 authors = [
     "Magnus Hallin <mhallin@fastmail.com>",
@@ -14,7 +14,7 @@ repository = "https://github.com/graphql-rust/juniper"
 [dependencies]
 futures = "0.3.1"
 juniper = { version = "0.15.7", path = "../juniper", default-features = false }
-rocket = { version = "0.5.0-rc.1", default-features = false }
+rocket = { version = "=0.5.0-rc.2", default-features = false }
 serde_json = "1.0.2"
 
 [dev-dependencies]
diff --git a/juniper_rocket/examples/rocket_server.rs b/juniper_rocket/examples/rocket_server.rs
index 76a6b296..16ae6d12 100644
--- a/juniper_rocket/examples/rocket_server.rs
+++ b/juniper_rocket/examples/rocket_server.rs
@@ -2,12 +2,12 @@ use juniper::{
     tests::fixtures::starwars::schema::{Database, Query},
     EmptyMutation, EmptySubscription, RootNode,
 };
-use rocket::{response::content, Rocket, State};
+use rocket::{response::content, State};
 
 type Schema = RootNode<'static, Query, EmptyMutation<Database>, EmptySubscription<Database>>;
 
 #[rocket::get("/")]
-fn graphiql() -> content::Html<String> {
+fn graphiql() -> content::RawHtml<String> {
     juniper_rocket::graphiql_source("/graphql", None)
 }
 
@@ -31,7 +31,7 @@ fn post_graphql_handler(
 
 #[rocket::main]
 async fn main() {
-    Rocket::build()
+    let _ = rocket::build()
         .manage(Database::new())
         .manage(Schema::new(
             Query,
diff --git a/juniper_rocket/src/lib.rs b/juniper_rocket/src/lib.rs
index 71b52ebe..827c43f6 100644
--- a/juniper_rocket/src/lib.rs
+++ b/juniper_rocket/src/lib.rs
@@ -36,7 +36,7 @@ Check the LICENSE file for details.
 
 */
 
-#![doc(html_root_url = "https://docs.rs/juniper_rocket/0.7.1")]
+#![doc(html_root_url = "https://docs.rs/juniper_rocket/0.8.2")]
 
 use std::{borrow::Cow, io::Cursor};
 
@@ -72,8 +72,8 @@ pub struct GraphQLResponse(pub Status, pub String);
 pub fn graphiql_source(
     graphql_endpoint_url: &str,
     subscriptions_endpoint_url: Option<&str>,
-) -> content::Html<String> {
-    content::Html(juniper::http::graphiql::graphiql_source(
+) -> content::RawHtml<String> {
+    content::RawHtml(juniper::http::graphiql::graphiql_source(
         graphql_endpoint_url,
         subscriptions_endpoint_url,
     ))
@@ -83,8 +83,8 @@ pub fn graphiql_source(
 pub fn playground_source(
     graphql_endpoint_url: &str,
     subscriptions_endpoint_url: Option<&str>,
-) -> content::Html<String> {
-    content::Html(juniper::http::playground::playground_source(
+) -> content::RawHtml<String> {
+    content::RawHtml(juniper::http::playground::playground_source(
         graphql_endpoint_url,
         subscriptions_endpoint_url,
     ))
@@ -337,7 +337,10 @@ where
         };
 
         Box::pin(async move {
-            let limit = req.limits().get("graphql").unwrap_or(BODY_LIMIT.bytes());
+            let limit = req
+                .limits()
+                .get("graphql")
+                .unwrap_or_else(|| BODY_LIMIT.bytes());
             let mut reader = data.open(limit);
             let mut body = String::new();
             if let Err(e) = reader.read_to_string(&mut body).await {

From 4dd5150bcbb10a420e00d74fc67e550735bc68fc Mon Sep 17 00:00:00 2001
From: tyranron <tyranron@gmail.com>
Date: Wed, 25 May 2022 17:58:38 +0200
Subject: [PATCH 2/2] Create `pr` CI job for auto-merging PRs

---
 .github/workflows/ci.yml | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 313a4f4f..d5319058 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -16,6 +16,28 @@ env:
 
 jobs:
 
+  ################
+  # Pull Request #
+  ################
+
+  pr:
+    if: ${{ github.event_name == 'pull_request'
+            && !contains(github.event.head_commit.message, '[skip ci]') }}
+    needs:
+      - clippy
+      - example
+      - feature
+      - release-check
+      - rustfmt
+      - test
+      - wasm
+    runs-on: ubuntu-latest
+    steps:
+      - run: true
+
+
+
+
   ##########################
   # Linting and formatting #
   ##########################