[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/graphql-mode fb84a08434 069/122: Make the dependency on re
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/graphql-mode fb84a08434 069/122: Make the dependency on request optional |
Date: |
Sat, 29 Jan 2022 08:03:33 -0500 (EST) |
branch: elpa/graphql-mode
commit fb84a08434a3a4fd8a0c2914bdd92f35d29bef22
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
Make the dependency on request optional
The functionality for making a request is not directly related to the
major-mode. Users should be able to use the major-mode without having
to install `request'.
---
graphql-mode.el | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/graphql-mode.el b/graphql-mode.el
index b82c7248b2..38b72275b5 100644
--- a/graphql-mode.el
+++ b/graphql-mode.el
@@ -4,7 +4,7 @@
;; Author: David Vazquez Pua <davazp@gmail.com>
;; Keywords: languages
-;; Package-Requires: ((emacs "24.3") (request "20170131.1747"))
+;; Package-Requires: ((emacs "24.3"))
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@@ -40,7 +40,6 @@
(require 'json)
(require 'url)
(require 'cl-lib)
-(require 'request)
;;; User Customizations:
@@ -89,6 +88,9 @@ of the variables used in the query."
(with-temp-buffer
(graphql-post-request graphql-url query operation variables)))
+(declare-function request "request")
+(declare-function request-response-data "request")
+
(defun graphql-post-request (url query &optional operation variables)
"Make post request to graphql server with url and body.
@@ -96,6 +98,9 @@ URL hostname, path, search parameters, such as operationName
and variables
QUERY query definition(s) of query, mutation, and/or subscription
OPERATION name of the operation if multiple definition is given in QUERY
VARIABLES list of variables for query operation"
+ (or (require 'request nil t)
+ (error "graphql-post-request needs the request package. \
+Please install it and try again."))
(let* ((body (graphql-encode-json query operation variables))
(response (request
url
- [nongnu] elpa/graphql-mode 8e58196e21 023/122: Merge pull request #1 from syohex/fix-package, (continued)
- [nongnu] elpa/graphql-mode 8e58196e21 023/122: Merge pull request #1 from syohex/fix-package, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 2ee89d4e05 080/122: Fix Error during redisplay, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 0b4152d485 051/122: Fix tests to use variables, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 74ee772a62 087/122: Merge pull request #26 from Malabarba/master, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode ebd6502c09 085/122: Merge pull request #25 from Malabarba/operation-bug, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode f1be68cea4 108/122: Add key binding for editing headers, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 3cbaa5ef35 041/122: Add multiple queries definition and variables support, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 4c942986fa 086/122: Also insert response headers in the buffer (with comment face), ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 6f6b303af4 084/122: Merge pull request #24 from Malabarba/master, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 301a218674 090/122: Enable json-mode for the output buffer., ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode fb84a08434 069/122: Make the dependency on request optional,
ELPA Syncer <=
- [nongnu] elpa/graphql-mode e757919fe3 093/122: Merge pull request #30 from conao3/fix-warning, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 2371316a75 116/122: Merge pull request #42 from adimit/headers-buffer, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode c176b16a41 112/122: Fix header line documentation, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 942d3c739a 113/122: Fix typo in key binding, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 3e27ae34cd 115/122: Remember parent buffer & set g-e-h locally therein, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode d9d3bba569 088/122: added support for 'extend', 'scalar' and 'union' keywords, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode fe8d7e2db5 117/122: Add version attribute to package header, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 6308d80a2c 121/122: Update parameter regex to match graphql standard, ELPA Syncer, 2022/01/29