[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/graphql-mode 04b36bf125 2/4: prompt for query url/variable
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/graphql-mode 04b36bf125 2/4: prompt for query url/variables with prefix |
Date: |
Sat, 23 Sep 2023 10:01:17 -0400 (EDT) |
branch: elpa/graphql-mode
commit 04b36bf125e2392c66d5448de99069d831599491
Author: nverno <noah.v.peart@gmail.com>
Commit: nverno <noah.v.peart@gmail.com>
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))