mirror of https://github.com/Chizi123/.emacs.d.git

Chizi123
2018-11-18 8f6f2705a38e2515b6c57fda12c5be29fb9a798f
commit | author | age
5cb5f7 1 ;ELC
C 2 ;;; Compiled
3 ;;; in Emacs version 26.1
4 ;;; with all optimizations.
5
6 ;;; This file uses dynamic docstrings, first added in Emacs 19.29.
7
8 ;;; This file does not contain utf-8 non-ASCII characters,
9 ;;; and so can be loaded in Emacs versions earlier than 23.
10
11 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
13
14
15 (require 'pcase)
16 #@43 Encode OBJ as a GraphQL string.
17
18 (fn OBJ)
19 (defalias 'graphql--encode-object #[257 "\211;\203\207\2119\203\300!\207\211\247\203\301!\207\211:\205(\211A:?\205(\300@!\207" [symbol-name number-to-string] 3 (#$ . 425)])
20 #@65 Encode an argument spec SPEC.
21 SPEC is of the form...
22
23 (fn SPEC)
24 (defalias 'graphql--encode-argument-spec #[257 "\300@A\"\207" [graphql--encode-argument] 4 (#$ . 657)])
25 #@58 Encode an argument KEY with value VALUE.
26
27 (fn KEY VALUE)
28 (defalias 'graphql--encode-argument #[514 "\300\301\302!#\207" [format "%s:%s" graphql--encode-argument-value] 7 (#$ . 833)])
29 #@272 Encode an argument value VALUE.
30 VALUE is expected to be one of the following:
31
32 * a symbol
33 * a 'variable', i.e. \='($ variableName)
34 * an object (as a list)
35 * a string
36 * a vector of values (e.g., symbols)
37 * a number
38 * something encode-able by `graphql-encode'.
39
40 (fn VALUE)
41 (defalias 'graphql--encode-argument-value #[257 "\2119\203    \300!\207\211\242\301=\203\302\303A@\"\207\211<\203%\302\304\305\306\307#\"\207\211;\203/\302\310\"\207\311!\203>\302\312\305\313\307#\"\207\211\247\203G\314!\207\313!\207" [symbol-name $ format "$%s" "{%s}" mapconcat graphql--encode-argument-spec "," "\"%s\"" vectorp "[%s]" graphql-encode number-to-string] 7 (#$ . 1025)])
42 #@369 Encode a parameter SPEC.
43 SPEC is expected to be of the following form:
44
45    (NAME TYPE [REQUIRED] . [DEFAULT])
46
47 NAME is the name of the parameter.
48
49 TYPE is the parameter's type.
50
51 A non-nil value for REQUIRED will indicate the parameter is
52 required.  A value of `!' is recommended.
53
54 A non-nil value for DEFAULT will provide a default value for the
55 parameter.
56
57 (fn SPEC)
58 (defalias 'graphql--encode-parameter-spec #[257 "\300!AA=\203\301@A@\300!@\300!A$\207\301@A@\302AA$\207" [last graphql--encode-parameter nil] 7 (#$ . 1702)])
59 #@211 Encode a GraphQL parameter with a NAME and TYPE.
60 If REQUIRED is non-nil, mark the parameter as required.
61 If DEFAULT is non-nil, is the default value of the parameter.
62
63 (fn NAME TYPE &optional REQUIRED DEFAULT)
64 (defalias 'graphql--encode-parameter #[1026 "\300\301\302!\302!\203\303\202\304\203 \305\306!P\202!\304%\207" [format "$%s:%s%s%s" symbol-name "!" "" "=" graphql--encode-argument-value] 12 (#$ . 2246)])
65 #@153 Get the keyword arguments from a graph G.
66 Returns a list where the first element is a plist of arguments
67 and the second is a 'clean' copy of G.
68
69 (fn G)
70 (defalias 'graphql--get-keys #[257 "\211:\204 \300D\206A\300\211\203;\301@!\203.\211A\262\242\211A\262\242BB\266\203\202 \211A\262\242B\262\202 \211\237D\266\202\207" [nil keywordp] 7 (#$ . 2680)])
71 #@45 Encode graph G as a GraphQL string.
72
73 (fn G)
74 (defalias 'graphql-encode #[257 "\300!\211:\205m\211@A\211:\205k\211@A\211?\205i\242\206\"\301\302\"\301\303\"\301\304\"\243\305!\205<\306\307\"\205I\306\310\311\312\313#\"\205V\306\310\311\314    \313#\"\205c\306\315\311\316\317#\"\260\266\205\266\202\266\202\266\202\207" [graphql--get-keys alist-get :op-name :op-params :arguments graphql--encode-object format " %S" "(%s)" mapconcat graphql--encode-argument-spec "," graphql--encode-parameter-spec "{%s}" graphql-encode " "] 23 (#$ . 3057)])
75 #@62 Simplify DATA to collapse edges into their nodes.
76
77 (fn DATA)
78 (defalias 'graphql-simplify-response-edges #[257 "\300:\203c@A\211:\203\211@\211:\203\323\211@\211\301=\203\211AA\211\2048\211\302\303\302\304\"\"B\266\202\202\204\211:?\262\203n\211:?\262\203U\211B\266\202\202\204\2119\262\203f\211\262\202\204\302\303    \"\202\204\2119\262\203\211\262\202\204!\266\202\202\316\211:?\262\203\273\211:?\262\203\245\211B\266\202\202\316\2119\262\203\264\211\262\202\316!\202\316\2119\262\203\312\211\262\202\316!\262\202\211:?\262\203\211:?\262\203\357\211B\266\202\202\2119\262\203\376\211\262\202!\202\2119\262\203\211\262\202!\262\202^\211:?\262\203L\211\211:?\262\2037\211\211B\266\202\202^\2119\262\203F\211\262\202^!\202^\2119\262\203[\211\262\202^!\266\202\202u\2119\262\203r\211\262\202u\211!\207" [#[257 "\300\301\"\207" [mapcar graphql-simplify-response-edges] 4 "\n\n(fn DATA)"] edges mapcar graphql-simplify-response-edges #[257 "\300\301\"\207" [alist-get node] 4 "\n\n(fn EDGE)"]] 16 (#$ . 3632)])
79 #@259 Generate the Lisp form for an operation.
80 ARGS is is a list ([NAME [PARAMETERS]] GRAPH) where NAME is the
81 name of the operation, PARAMETERS are its parameters, and GRAPH
82 is the form of the actual operation.
83
84 KIND can be `query' or `mutation'.
85
86 (fn ARGS KIND)
87 (defalias 'graphql--genform-operation #[514 ":\203w@A\211:\203b\211@A\211:\203B\211@A\211\204:\300\301 \302\303    BBBBBDD\266\203\202=\304\305!\266\202\202]\211\204Z\300\301\302BBBDD\266\202\202]\304\305!\266\202\202v\211\204s\300\301BDD\262\202v\304\305!\207\304\305!\207" [graphql-encode quote :op-name :op-params error "Bad form"] 19 (#$ . 4796)])
88 #@137 Construct a Query object.
89 ARGS is a listof the form described by `graphql--genform-operation'.
90
91 (fn [NAME] [(PARAMETER-SPEC...)] GRAPH)
92 (defalias 'graphql-query '(macro . #[128 "\300\301\"\207" [graphql--genform-operation query] 4 (#$ . 5446)]))
93 #@140 Construct a Mutation object.
94 ARGS is a listof the form described by `graphql--genform-operation'.
95
96 (fn [NAME] [(PARAMETER-SPEC...)] GRAPH)
97 (defalias 'graphql-mutation '(macro . #[128 "\300\301\"\207" [graphql--genform-operation mutation] 4 (#$ . 5700)]))
98 (provide 'graphql)