gqli 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +7 -0
- data/.rspec +3 -0
- data/.rubocop.yml +31 -0
- data/.rubocop_todo.yml +44 -0
- data/.travis.yml +13 -0
- data/.yardopts +4 -0
- data/CHANGELOG.md +9 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +154 -0
- data/Guardfile +24 -0
- data/LICENSE.txt +21 -0
- data/README.md +284 -0
- data/Rakefile +33 -0
- data/coverage/.last_run.json +5 -0
- data/coverage/.resultset.json +512 -0
- data/coverage/.resultset.json.lock +0 -0
- data/coverage/assets/0.10.2/application.css +799 -0
- data/coverage/assets/0.10.2/application.js +1707 -0
- data/coverage/assets/0.10.2/colorbox/border.png +0 -0
- data/coverage/assets/0.10.2/colorbox/controls.png +0 -0
- data/coverage/assets/0.10.2/colorbox/loading.gif +0 -0
- data/coverage/assets/0.10.2/colorbox/loading_background.png +0 -0
- data/coverage/assets/0.10.2/favicon_green.png +0 -0
- data/coverage/assets/0.10.2/favicon_red.png +0 -0
- data/coverage/assets/0.10.2/favicon_yellow.png +0 -0
- data/coverage/assets/0.10.2/loading.gif +0 -0
- data/coverage/assets/0.10.2/magnify.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/coverage/index.html +3255 -0
- data/doc/GQLi/Base.html +628 -0
- data/doc/GQLi/Client.html +830 -0
- data/doc/GQLi/DSL.html +421 -0
- data/doc/GQLi/Fragment.html +405 -0
- data/doc/GQLi/Introspection.html +837 -0
- data/doc/GQLi/Node.html +413 -0
- data/doc/GQLi/Query.html +390 -0
- data/doc/GQLi/Response.html +370 -0
- data/doc/GQLi.html +157 -0
- data/doc/_index.html +236 -0
- data/doc/class_list.html +51 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +58 -0
- data/doc/css/style.css +496 -0
- data/doc/file.CHANGELOG.html +76 -0
- data/doc/file.LICENSE.html +70 -0
- data/doc/file.README.html +365 -0
- data/doc/file_list.html +66 -0
- data/doc/frames.html +17 -0
- data/doc/index.html +365 -0
- data/doc/js/app.js +292 -0
- data/doc/js/full_list.js +216 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +355 -0
- data/doc/top-level-namespace.html +110 -0
- data/gqli.gemspec +37 -0
- data/lib/gqli/base.rb +53 -0
- data/lib/gqli/client.rb +59 -0
- data/lib/gqli/dsl.rb +37 -0
- data/lib/gqli/fragment.rb +25 -0
- data/lib/gqli/introspection.rb +215 -0
- data/lib/gqli/node.rb +48 -0
- data/lib/gqli/query.rb +29 -0
- data/lib/gqli/response.rb +15 -0
- data/lib/gqli/version.rb +7 -0
- data/lib/gqli.rb +6 -0
- data/spec/fixtures/vcr_cassettes/catCollection.yml +63 -0
- data/spec/fixtures/vcr_cassettes/client.yml +171 -0
- data/spec/fixtures/vcr_cassettes/validation_error.yml +62 -0
- data/spec/lib/gqli/client_spec.rb +90 -0
- data/spec/lib/gqli/dsl_spec.rb +205 -0
- data/spec/lib/gqli/introspection_spec.rb +125 -0
- data/spec/spec_helper.rb +25 -0
- data/usage.rb +100 -0
- data/usage_introspection.rb +63 -0
- data/usage_with_inlined_dsl.rb +69 -0
- metadata +387 -0
@@ -0,0 +1,405 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Class: GQLi::Fragment
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.16
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "GQLi::Fragment";
|
19
|
+
relpath = '../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../_index.html">Index (F)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../GQLi.html" title="GQLi (module)">GQLi</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Fragment</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Class: GQLi::Fragment
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName"><span class='object_link'><a href="Base.html" title="GQLi::Base (class)">Base</a></span></span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next"><span class='object_link'><a href="Base.html" title="GQLi::Base (class)">Base</a></span></li>
|
78
|
+
|
79
|
+
<li class="next">GQLi::Fragment</li>
|
80
|
+
|
81
|
+
</ul>
|
82
|
+
<a href="#" class="inheritanceTree">show all</a>
|
83
|
+
|
84
|
+
</dd>
|
85
|
+
</dl>
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
<dl>
|
98
|
+
<dt>Defined in:</dt>
|
99
|
+
<dd>lib/gqli/fragment.rb</dd>
|
100
|
+
</dl>
|
101
|
+
|
102
|
+
</div>
|
103
|
+
|
104
|
+
<h2>Overview</h2><div class="docstring">
|
105
|
+
<div class="discussion">
|
106
|
+
|
107
|
+
<p>Fragment wrapper</p>
|
108
|
+
|
109
|
+
|
110
|
+
</div>
|
111
|
+
</div>
|
112
|
+
<div class="tags">
|
113
|
+
|
114
|
+
|
115
|
+
</div>
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
120
|
+
<ul class="summary">
|
121
|
+
|
122
|
+
<li class="public ">
|
123
|
+
<span class="summary_signature">
|
124
|
+
|
125
|
+
<a href="#__on_type-instance_method" title="#__on_type (instance method)">#<strong>__on_type</strong> ⇒ Object </a>
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
</span>
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
<span class="note title readonly">readonly</span>
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
<span class="summary_desc"><div class='inline'>
|
145
|
+
<p>Returns the value of attribute __on_type.</p>
|
146
|
+
</div></span>
|
147
|
+
|
148
|
+
</li>
|
149
|
+
|
150
|
+
|
151
|
+
</ul>
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Base.html" title="GQLi::Base (class)">Base</a></span></h3>
|
158
|
+
<p class="inherited"><span class='object_link'><a href="Base.html#__depth-instance_method" title="GQLi::Base#__depth (method)">#__depth</a></span>, <span class='object_link'><a href="Base.html#__name-instance_method" title="GQLi::Base#__name (method)">#__name</a></span>, <span class='object_link'><a href="Base.html#__nodes-instance_method" title="GQLi::Base#__nodes (method)">#__nodes</a></span></p>
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
<h2>
|
163
|
+
Instance Method Summary
|
164
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
165
|
+
</h2>
|
166
|
+
|
167
|
+
<ul class="summary">
|
168
|
+
|
169
|
+
<li class="public ">
|
170
|
+
<span class="summary_signature">
|
171
|
+
|
172
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(name, on, &block) ⇒ Fragment </a>
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
</span>
|
177
|
+
|
178
|
+
|
179
|
+
<span class="note title constructor">constructor</span>
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
<span class="summary_desc"><div class='inline'>
|
189
|
+
<p>A new instance of Fragment.</p>
|
190
|
+
</div></span>
|
191
|
+
|
192
|
+
</li>
|
193
|
+
|
194
|
+
|
195
|
+
<li class="public ">
|
196
|
+
<span class="summary_signature">
|
197
|
+
|
198
|
+
<a href="#to_gql-instance_method" title="#to_gql (instance method)">#<strong>to_gql</strong> ⇒ Object </a>
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
</span>
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
<span class="summary_desc"><div class='inline'>
|
213
|
+
<p>Serializes to a GraphQL string.</p>
|
214
|
+
</div></span>
|
215
|
+
|
216
|
+
</li>
|
217
|
+
|
218
|
+
|
219
|
+
</ul>
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Base.html" title="GQLi::Base (class)">Base</a></span></h3>
|
232
|
+
<p class="inherited"><span class='object_link'><a href="Base.html#___-instance_method" title="GQLi::Base#___ (method)">#___</a></span>, <span class='object_link'><a href="Base.html#__on-instance_method" title="GQLi::Base#__on (method)">#__on</a></span></p>
|
233
|
+
<div id="constructor_details" class="method_details_list">
|
234
|
+
<h2>Constructor Details</h2>
|
235
|
+
|
236
|
+
<div class="method_details first">
|
237
|
+
<h3 class="signature first" id="initialize-instance_method">
|
238
|
+
|
239
|
+
#<strong>initialize</strong>(name, on, &block) ⇒ <tt><span class='object_link'><a href="" title="GQLi::Fragment (class)">Fragment</a></span></tt>
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
</h3><div class="docstring">
|
246
|
+
<div class="discussion">
|
247
|
+
|
248
|
+
<p>Returns a new instance of Fragment</p>
|
249
|
+
|
250
|
+
|
251
|
+
</div>
|
252
|
+
</div>
|
253
|
+
<div class="tags">
|
254
|
+
|
255
|
+
|
256
|
+
</div><table class="source_code">
|
257
|
+
<tr>
|
258
|
+
<td>
|
259
|
+
<pre class="lines">
|
260
|
+
|
261
|
+
|
262
|
+
11
|
263
|
+
12
|
264
|
+
13
|
265
|
+
14</pre>
|
266
|
+
</td>
|
267
|
+
<td>
|
268
|
+
<pre class="code"><span class="info file"># File 'lib/gqli/fragment.rb', line 11</span>
|
269
|
+
|
270
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_on'>on</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
271
|
+
<span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='int'>0</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
272
|
+
<span class='ivar'>@__on_type</span> <span class='op'>=</span> <span class='id identifier rubyid_on'>on</span>
|
273
|
+
<span class='kw'>end</span></pre>
|
274
|
+
</td>
|
275
|
+
</tr>
|
276
|
+
</table>
|
277
|
+
</div>
|
278
|
+
|
279
|
+
</div>
|
280
|
+
<div id="method_missing_details" class="method_details_list">
|
281
|
+
<h2>Dynamic Method Handling</h2>
|
282
|
+
<p class="notice super">
|
283
|
+
This class handles dynamic methods through the <tt>method_missing</tt> method
|
284
|
+
|
285
|
+
in the class <span class='object_link'>GQLi::Base</span>
|
286
|
+
|
287
|
+
</p>
|
288
|
+
|
289
|
+
</div>
|
290
|
+
|
291
|
+
<div id="instance_attr_details" class="attr_details">
|
292
|
+
<h2>Instance Attribute Details</h2>
|
293
|
+
|
294
|
+
|
295
|
+
<span id=""></span>
|
296
|
+
<div class="method_details first">
|
297
|
+
<h3 class="signature first" id="__on_type-instance_method">
|
298
|
+
|
299
|
+
#<strong>__on_type</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
</h3><div class="docstring">
|
306
|
+
<div class="discussion">
|
307
|
+
|
308
|
+
<p>Returns the value of attribute __on_type</p>
|
309
|
+
|
310
|
+
|
311
|
+
</div>
|
312
|
+
</div>
|
313
|
+
<div class="tags">
|
314
|
+
|
315
|
+
|
316
|
+
</div><table class="source_code">
|
317
|
+
<tr>
|
318
|
+
<td>
|
319
|
+
<pre class="lines">
|
320
|
+
|
321
|
+
|
322
|
+
9
|
323
|
+
10
|
324
|
+
11</pre>
|
325
|
+
</td>
|
326
|
+
<td>
|
327
|
+
<pre class="code"><span class="info file"># File 'lib/gqli/fragment.rb', line 9</span>
|
328
|
+
|
329
|
+
<span class='kw'>def</span> <span class='id identifier rubyid___on_type'>__on_type</span>
|
330
|
+
<span class='ivar'>@__on_type</span>
|
331
|
+
<span class='kw'>end</span></pre>
|
332
|
+
</td>
|
333
|
+
</tr>
|
334
|
+
</table>
|
335
|
+
</div>
|
336
|
+
|
337
|
+
</div>
|
338
|
+
|
339
|
+
|
340
|
+
<div id="instance_method_details" class="method_details_list">
|
341
|
+
<h2>Instance Method Details</h2>
|
342
|
+
|
343
|
+
|
344
|
+
<div class="method_details first">
|
345
|
+
<h3 class="signature first" id="to_gql-instance_method">
|
346
|
+
|
347
|
+
#<strong>to_gql</strong> ⇒ <tt>Object</tt>
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
|
352
|
+
|
353
|
+
</h3><div class="docstring">
|
354
|
+
<div class="discussion">
|
355
|
+
|
356
|
+
<p>Serializes to a GraphQL string</p>
|
357
|
+
|
358
|
+
|
359
|
+
</div>
|
360
|
+
</div>
|
361
|
+
<div class="tags">
|
362
|
+
|
363
|
+
|
364
|
+
</div><table class="source_code">
|
365
|
+
<tr>
|
366
|
+
<td>
|
367
|
+
<pre class="lines">
|
368
|
+
|
369
|
+
|
370
|
+
17
|
371
|
+
18
|
372
|
+
19
|
373
|
+
20
|
374
|
+
21
|
375
|
+
22
|
376
|
+
23</pre>
|
377
|
+
</td>
|
378
|
+
<td>
|
379
|
+
<pre class="code"><span class="info file"># File 'lib/gqli/fragment.rb', line 17</span>
|
380
|
+
|
381
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_gql'>to_gql</span>
|
382
|
+
<span class='heredoc_beg'><<~GQL</span>
|
383
|
+
<span class='tstring_content'> fragment </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid___name'>__name</span><span class='embexpr_end'>}</span><span class='tstring_content'> on </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid___on_type'>__on_type</span><span class='embexpr_end'>}</span><span class='tstring_content'> {
|
384
|
+
</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid___nodes'>__nodes</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbeg'>:</span><span class='id identifier rubyid_to_gql'>to_gql</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>
|
385
|
+
</span><span class='tstring_content'> }
|
386
|
+
</span><span class='heredoc_end'> GQL
|
387
|
+
</span><span class='kw'>end</span></pre>
|
388
|
+
</td>
|
389
|
+
</tr>
|
390
|
+
</table>
|
391
|
+
</div>
|
392
|
+
|
393
|
+
</div>
|
394
|
+
|
395
|
+
</div>
|
396
|
+
|
397
|
+
<div id="footer">
|
398
|
+
Generated on Mon Oct 15 13:10:42 2018 by
|
399
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
400
|
+
0.9.16 (ruby-2.5.1).
|
401
|
+
</div>
|
402
|
+
|
403
|
+
</div>
|
404
|
+
</body>
|
405
|
+
</html>
|