From b10ceb42b1e30029bb90ae695457159f915565f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Esp=C3=ADn?= Date: Sun, 9 Jul 2023 00:46:10 +0200 Subject: [PATCH 1/2] docs: Fix graphql example --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 7b6f77fd..d604afc8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1035,7 +1035,7 @@ impl Octocrab { /// ```no_run ///# async fn run() -> octocrab::Result<()> { /// let response: serde_json::Value = octocrab::instance() - /// .graphql("{ 'query': '{ viewer { login }}' }") + /// .graphql(serde_json::json!({ "query": "{ viewer { login }}" })) /// .await?; ///# Ok(()) ///# } From 2e2eb6aa0e6a0bda3c25a012ff7ff71c90ec337c Mon Sep 17 00:00:00 2001 From: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com> Date: Sun, 9 Jul 2023 09:13:03 +0200 Subject: [PATCH 2/2] Add reference --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index d604afc8..986d525f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1035,7 +1035,7 @@ impl Octocrab { /// ```no_run ///# async fn run() -> octocrab::Result<()> { /// let response: serde_json::Value = octocrab::instance() - /// .graphql(serde_json::json!({ "query": "{ viewer { login }}" })) + /// .graphql(&serde_json::json!({ "query": "{ viewer { login }}" })) /// .await?; ///# Ok(()) ///# }