gqli 0.1.0

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