[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/graphql-mode 301d2419a0 012/122: Prompt the user for the G
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/graphql-mode 301d2419a0 012/122: Prompt the user for the GraphQL |
Date: |
Sat, 29 Jan 2022 08:03:29 -0500 (EST) |
branch: elpa/graphql-mode
commit 301d2419a012e8e7299e26b992a8aa4453ee1b3f
Author: David Vazquez Pua <davazp@gmail.com>
Commit: David Vazquez Pua <davazp@gmail.com>
Prompt the user for the GraphQL
If graphql-url is not set, prompt the user to set the value the first
time that a query is about to be evaluated.
---
graphql.el | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/graphql.el b/graphql.el
index d9b920e815..b4f031f074 100644
--- a/graphql.el
+++ b/graphql.el
@@ -29,8 +29,7 @@
(require 'url)
(defvar graphql-url
- "http://graphql-swapi.parseapp.com")
-
+ nil)
(defun graphql--query (query)
"Send QUERY to the server at `graphql-url' and return the
@@ -72,9 +71,11 @@ response from the server."
(defun graphql-send-query ()
(interactive)
+ (unless graphql-url
+ (setq graphql-url (read-string "GraphQL URL: " )))
(let* ((query (graphql-current-query))
(response (graphql--query query)))
- (with-current-buffer-window
+ (with-current-buffer-window
"*GraphQL*" 'display-buffer-pop-up-window nil
(erase-buffer)
(json-mode)
@@ -149,6 +150,7 @@ response from the server."
(define-derived-mode graphql-mode prog-mode "GraphQL"
""
+ (make-variable-buffer-local 'graphql-url)
(setq-local comment-start "# ")
(setq-local comment-start-skip "#+[\t ]*")
(setq-local indent-line-function 'graphql-indent-line)
- [nongnu] elpa/graphql-mode 52137014df 073/122: Update packages, (continued)
- [nongnu] elpa/graphql-mode 52137014df 073/122: Update packages, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode c3471642f5 072/122: Merge pull request #19 from cbowdon/master, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 880701685d 038/122: Add some types/field to the test schema, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 0f2b4b1604 077/122: Merge branch 'next', ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode d0a85fe1d3 067/122: Shorten long lines, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 7aa3532aed 026/122: Don't depend on json-mode, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 0b41444096 028/122: Add installation notes, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 43434aa6d5 061/122: Format some docs and docstrings, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 8b2fe76635 057/122: fix a recursive bug in graphql-current-operation, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode f3cfd9fc1e 062/122: Don't send the query as a query parameter, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 301d2419a0 012/122: Prompt the user for the GraphQL,
ELPA Syncer <=
- [nongnu] elpa/graphql-mode 17c2150ff6 058/122: rebase branch 'queries support' into branch 'next', ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 83e3a73f21 033/122: Fix: don't add slash between url and query parameters, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 22a4340ec3 044/122: add post body json support: query, operationName, variables, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 41df2a3140 019/122: Add docstring for graphql-mode, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode d5cfe9326c 074/122: Rename graphql-headers to graphql-extra-headers, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 5971b69c8c 076/122: Fix: respect local value of graphql-url when posting a request, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 5e7665dfc4 059/122: forget the actual changes, (I have two location to dev/test), ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 2326c1fb18 034/122: Merge pull request #7 from eoma/fix-url, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 04e56ae626 053/122: Disable json-mode for response temporarily, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode ab58192967 081/122: Merge pull request #23 from leoliu/master, ELPA Syncer, 2022/01/29