emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/graphql-mode 5971b69c8c 076/122: Fix: respect local value


From: ELPA Syncer
Subject: [nongnu] elpa/graphql-mode 5971b69c8c 076/122: Fix: respect local value of graphql-url when posting a request
Date: Sat, 29 Jan 2022 08:03:34 -0500 (EST)

branch: elpa/graphql-mode
commit 5971b69c8cf080e6be70c2d0fbd079ff7818be8b
Author: David Vázquez Púa <davazp@gmail.com>
Commit: David Vázquez Púa <davazp@gmail.com>

    Fix: respect local value of graphql-url when posting a request
    
    This should fixes the issue described at #21
---
 graphql-mode.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/graphql-mode.el b/graphql-mode.el
index 1e653a182f..197867d027 100644
--- a/graphql-mode.el
+++ b/graphql-mode.el
@@ -91,8 +91,11 @@ The query is sent as a HTTP POST request to the URL at
 mutation or subscription).  OPERATION is a name for the
 operation.  VARIABLES is the JSON string that specifies the values
 of the variables used in the query."
-  (with-temp-buffer
-    (graphql-post-request graphql-url query operation variables)))
+  ;; Note that we need to get the value of graphql-url in the current
+  ;; before before we switch to the temporary one.
+  (let ((url graphql-url))
+    (with-temp-buffer
+      (graphql-post-request url query operation variables))))
 
 (declare-function request "request")
 (declare-function request-response-data "request")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]