branch: elpa/graphql-mode
commit 033f6a074c909410f6a329745f77f818f8525536
Author: Artur Malabarba <[email protected]>
Commit: Artur Malabarba <[email protected]>

    Don't use temp buffer, as it breaks local variables
    
    In the previous implementation, setting `graphql-extra-headers` as a
    local variable didn't work because the variable was used inside
    `graphql-post-request` which was called inside a temp buffer.
    
    Removing the temp buffer solves this issue.
---
 graphql-mode.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/graphql-mode.el b/graphql-mode.el
index c61768903e..5e800ad5b8 100644
--- a/graphql-mode.el
+++ b/graphql-mode.el
@@ -94,8 +94,7 @@ of the variables used in the query."
   ;; 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))))
+    (graphql-post-request url query operation variables)))
 
 (declare-function request "request")
 (declare-function request-response-data "request")

Reply via email to