[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/graphql 4338f9b280 44/56: Fix checkdoc and package-lint
From: |
ELPA Syncer |
Subject: |
[elpa] externals/graphql 4338f9b280 44/56: Fix checkdoc and package-lint errors |
Date: |
Sat, 29 Oct 2022 13:58:11 -0400 (EDT) |
branch: externals/graphql
commit 4338f9b28000218e4cbcd194d336114ea7c3363a
Author: Sean Allred <code@seanallred.com>
Commit: Sean Allred <code@seanallred.com>
Fix checkdoc and package-lint errors
---
graphql.el | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
diff --git a/graphql.el b/graphql.el
index a63d4738ba..29d90f4c9e 100644
--- a/graphql.el
+++ b/graphql.el
@@ -4,6 +4,7 @@
;; Author: Sean Allred <code@seanallred.com>
;; Keywords: hypermedia, tools, lisp
+;; Homepage: https://github.com/vermiculus/graphql.el
;; Package-Version: 0
;; Package-Requires: ((emacs "25"))
@@ -31,6 +32,7 @@
(require 'pcase)
(defun graphql--encode-object (obj)
+ "Encode OBJ as a GraphQL string."
(cond
((stringp obj)
obj)
@@ -43,9 +45,12 @@
(symbol-name (car obj)))))
(defun graphql--encode-argument-spec (spec)
+ "Encode an argument spec SPEC.
+SPEC is of the form..."
(graphql--encode-argument (car spec) (cdr spec)))
(defun graphql--encode-argument (key value)
+ "Encode an argument KEY with value VALUE."
(format "%s:%s" key (graphql--encode-argument-value value)))
(defun graphql--encode-argument-value (value)
@@ -58,8 +63,7 @@ VALUE is expected to be one of the following:
* a string
* a vector of values (e.g., symbols)
* a number
-* something encode-able by `graphql-encode'
-"
+* something encode-able by `graphql-encode'."
(cond
((symbolp value)
(symbol-name value))
@@ -107,6 +111,9 @@ parameter."
(nthcdr 2 spec))))
(defun graphql--encode-parameter (name type &optional required default)
+ "Encode a GraphQL parameter with a NAME and TYPE.
+If REQUIRED is non-nil, mark the parameter as required.
+If DEFAULT is non-nil, is the default value of the parameter."
(format "$%s:%s%s%s"
(symbol-name name)
(symbol-name type)
@@ -173,6 +180,12 @@ and the second is a 'clean' copy of G."
(_ (mapcar #'graphql-simplify-response-edges data))))
(defun graphql--genform-operation (args kind)
+ "Generate the Lisp form for an operation.
+ARGS is is a list ([NAME [PARAMETERS]] GRAPH) where NAME is the
+name of the operation, PARAMETERS are its parameters, and GRAPH
+is the form of the actual operation.
+
+KIND can be `query' or `mutation'."
(pcase args
(`(,name ,parameters ,graph)
`(graphql-encode '(,kind :op-name ,name
@@ -186,16 +199,18 @@ and the second is a 'clean' copy of G."
(`(,graph)
`(graphql-encode '(,kind ,@graph)))
- (_ (error "bad form"))))
+ (_ (error "Bad form"))))
(defmacro graphql-query (&rest args)
"Construct a Query object.
+ARGS is a listof the form described by `graphql--genform-operation'.
\(fn [NAME] [(PARAMETER-SPEC...)] GRAPH)"
(graphql--genform-operation args 'query))
(defmacro graphql-mutation (&rest args)
"Construct a Mutation object.
+ARGS is a listof the form described by `graphql--genform-operation'.
\(fn [NAME] [(PARAMETER-SPEC...)] GRAPH)"
(graphql--genform-operation args 'mutation))
- [elpa] externals/graphql d1a8e478b3 21/56: Finish renaming test file, (continued)
- [elpa] externals/graphql d1a8e478b3 21/56: Finish renaming test file, ELPA Syncer, 2022/10/29
- [elpa] externals/graphql 98f9131b27 29/56: Use graphql-encode instead of removed graphql--encode, ELPA Syncer, 2022/10/29
- [elpa] externals/graphql 32933981a9 32/56: Add support for specifying GraphQL lists using Lisp vector syntax, ELPA Syncer, 2022/10/29
- [elpa] externals/graphql 8d45c98e9f 24/56: Run tests on Travis, ELPA Syncer, 2022/10/29
- [elpa] externals/graphql 57a3dfe5bf 33/56: Correct capitalization, ELPA Syncer, 2022/10/29
- [elpa] externals/graphql b3db1ff740 34/56: Response form should mirror input form when using macros, ELPA Syncer, 2022/10/29
- [elpa] externals/graphql 3eb2416913 36/56: Make sure 'plain' cons cell keys are not cons cells themselves, ELPA Syncer, 2022/10/29
- [elpa] externals/graphql d71e6b218c 39/56: Require subr-x for thread-last in examples.el, ELPA Syncer, 2022/10/29
- [elpa] externals/graphql 8b29e7e335 41/56: Fix emacs build on CI, ELPA Syncer, 2022/10/29
- [elpa] externals/graphql 093c761981 43/56: Switch to the real Emake, ELPA Syncer, 2022/10/29
- [elpa] externals/graphql 4338f9b280 44/56: Fix checkdoc and package-lint errors,
ELPA Syncer <=
- [elpa] externals/graphql 4a6e055723 46/56: Test 26.1 on CI, ELPA Syncer, 2022/10/29
- [elpa] externals/graphql ea85c2b32b 47/56: Allow makefile to be run locally without duplication, ELPA Syncer, 2022/10/29
- [elpa] externals/graphql a9ab8d7186 50/56: Fix version check, ELPA Syncer, 2022/10/29
- [elpa] externals/graphql 672dd9ebd7 51/56: Release version 0.1.1, ELPA Syncer, 2022/10/29
- [elpa] externals/graphql c16c8e9a1b 52/56: Add badges, ELPA Syncer, 2022/10/29
- [elpa] externals/graphql d2bb248d2c 54/56: Use new version of Emake, ELPA Syncer, 2022/10/29