branch: elpa/graphql-mode
commit 5971b69c8cf080e6be70c2d0fbd079ff7818be8b
Author: David Vázquez Púa <[email protected]>
Commit: David Vázquez Púa <[email protected]>
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")