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

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

[nongnu] elpa/graphql-mode c702483562 3/4: Merge pull request #58 from n


From: ELPA Syncer
Subject: [nongnu] elpa/graphql-mode c702483562 3/4: Merge pull request #58 from nverno/optional-prompt-for-query
Date: Sat, 23 Sep 2023 10:01:17 -0400 (EDT)

branch: elpa/graphql-mode
commit c702483562efb45b775ae4681149813c01a40bac
Merge: 0ad4ae0160 04b36bf125
Author: David Vázquez Púa <davazp@gmail.com>
Commit: GitHub <noreply@github.com>

    Merge pull request #58 from nverno/optional-prompt-for-query
    
    prompt for query url/variables with prefix
---
 graphql-mode.el | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/graphql-mode.el b/graphql-mode.el
index 2dbeb67cd5..9276f8f5d5 100644
--- a/graphql-mode.el
+++ b/graphql-mode.el
@@ -225,11 +225,15 @@ Please install it and try again."))
             (define-key map (kbd "q") 'quit-window)
             map))
 
-(defun graphql-send-query ()
-  "Send the current GraphQL query/mutation/subscription to server."
-  (interactive)
-  (let* ((url (or graphql-url (read-string "GraphQL URL: " )))
-         (var (or graphql-variables-file (read-file-name "GraphQL Variables: 
"))))
+(defun graphql-send-query (&optional prompt)
+  "Send the current GraphQL query/mutation/subscription to server.
+With \\[universal-argument] PROMPT, prompt for
+`graphql-url'/`graphql-variables-file'."
+  (interactive "P")
+  (let* ((url (or (and (not prompt) graphql-url)
+                  (read-string "GraphQL URL: " graphql-url)))
+         (var (or (and (not prompt) graphql-variables-file)
+                  (read-file-name "GraphQL Variables: " nil 
graphql-variables-file))))
     (let ((graphql-url url)
           (graphql-variables-file var))
 



reply via email to

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