coverage/index.html in gqli-0.6.1 vs coverage/index.html in gqli-1.0.0
- old
+ new
@@ -12,31 +12,31 @@
<body>
<div id="loading">
<img src="./assets/0.10.2/loading.gif" alt="loading"/>
</div>
<div id="wrapper" style="display:none;">
- <div class="timestamp">Generated <abbr class="timeago" title="2019-02-22T13:09:51-08:00">2019-02-22T13:09:51-08:00</abbr></div>
+ <div class="timestamp">Generated <abbr class="timeago" title="2019-05-03T15:26:01+02:00">2019-05-03T15:26:01+02:00</abbr></div>
<ul class="group_tabs"></ul>
<div id="content">
<div class="file_list_container" id="AllFiles">
<h2>
<span class="group_name">All Files</span>
- (<span class="covered_percent"><span class="green">98.23%</span></span>
+ (<span class="covered_percent"><span class="green">98.53%</span></span>
covered at
<span class="covered_strength">
<span class="green">
- 35.68
+ 39.75
</span>
</span> hits/line)
</h2>
<a name="AllFiles"></a>
<div>
- <b>17</b> files in total.
- <b>678</b> relevant lines.
- <span class="green"><b>666</b> lines covered</span> and
- <span class="red"><b>12</b> lines missed </span>
+ <b>18</b> files in total.
+ <b>746</b> relevant lines.
+ <span class="green"><b>735</b> lines covered</span> and
+ <span class="red"><b>11</b> lines missed </span>
</div>
<table class="file_list">
<thead>
<tr>
<th>File</th>
@@ -65,21 +65,21 @@
<td class="green strong">100.0 %</td>
<td>64</td>
<td>31</td>
<td>31</td>
<td>0</td>
- <td>103.8</td>
+ <td>108.8</td>
</tr>
<tr>
<td class="strong"><a href="#68dcd39c86205e255ffb6dcb92fa9f24c6f7d923" class="src_link" title="lib/gqli/client.rb">lib/gqli/client.rb</a></td>
<td class="green strong">93.75 %</td>
<td>71</td>
<td>32</td>
<td>30</td>
<td>2</td>
- <td>9.4</td>
+ <td>10.3</td>
</tr>
<tr>
<td class="strong"><a href="#256fff82f19c25133275deedd45d6d640936f554" class="src_link" title="lib/gqli/clients.rb">lib/gqli/clients.rb</a></td>
<td class="green strong">100.0 %</td>
@@ -105,21 +105,21 @@
<td class="green strong">100.0 %</td>
<td>17</td>
<td>4</td>
<td>4</td>
<td>0</td>
- <td>1.0</td>
+ <td>1.8</td>
</tr>
<tr>
<td class="strong"><a href="#9abd05ccff4ad7a4f5b1bb75901af6e008bc9c5d" class="src_link" title="lib/gqli/dsl.rb">lib/gqli/dsl.rb</a></td>
<td class="green strong">100.0 %</td>
- <td>67</td>
- <td>22</td>
- <td>22</td>
+ <td>82</td>
+ <td>27</td>
+ <td>27</td>
<td>0</td>
- <td>2.9</td>
+ <td>2.7</td>
</tr>
<tr>
<td class="strong"><a href="#8599aaf43ba4686fbd793a6b54bdf898bbb28978" class="src_link" title="lib/gqli/enum_value.rb">lib/gqli/enum_value.rb</a></td>
<td class="green strong">100.0 %</td>
@@ -145,41 +145,51 @@
<td class="green strong">100.0 %</td>
<td>97</td>
<td>63</td>
<td>63</td>
<td>0</td>
- <td>3.6</td>
+ <td>3.9</td>
</tr>
<tr>
+ <td class="strong"><a href="#c40220bd28640b7a696c273e3498791096d73ce9" class="src_link" title="lib/gqli/mutation.rb">lib/gqli/mutation.rb</a></td>
+ <td class="yellow strong">88.89 %</td>
+ <td>27</td>
+ <td>9</td>
+ <td>8</td>
+ <td>1</td>
+ <td>2.6</td>
+ </tr>
+
+ <tr>
<td class="strong"><a href="#827311add0f30734381233709eff6f2feef29107" class="src_link" title="lib/gqli/node.rb">lib/gqli/node.rb</a></td>
<td class="green strong">100.0 %</td>
<td>61</td>
<td>31</td>
<td>31</td>
<td>0</td>
- <td>467.3</td>
+ <td>527.1</td>
</tr>
<tr>
<td class="strong"><a href="#add3b96d53406d04d830c517b925e60e5592500d" class="src_link" title="lib/gqli/query.rb">lib/gqli/query.rb</a></td>
<td class="green strong">100.0 %</td>
<td>29</td>
<td>10</td>
<td>10</td>
<td>0</td>
- <td>9.4</td>
+ <td>10.0</td>
</tr>
<tr>
<td class="strong"><a href="#fc631e4d066aa11a78ad288ef5341c2bc5e2fd9d" class="src_link" title="lib/gqli/response.rb">lib/gqli/response.rb</a></td>
<td class="green strong">100.0 %</td>
<td>15</td>
<td>7</td>
<td>7</td>
<td>0</td>
- <td>8.1</td>
+ <td>9.0</td>
</tr>
<tr>
<td class="strong"><a href="#3b534dd15131bb6d8770662787bf8f8099b5cf25" class="src_link" title="lib/gqli/subscription.rb">lib/gqli/subscription.rb</a></td>
<td class="yellow strong">88.89 %</td>
@@ -190,34 +200,34 @@
<td>2.6</td>
</tr>
<tr>
<td class="strong"><a href="#4c31f7a77052c02790c8c5c06fd2085c7022ac23" class="src_link" title="lib/gqli/validation.rb">lib/gqli/validation.rb</a></td>
- <td class="green strong">91.51 %</td>
- <td>200</td>
- <td>106</td>
+ <td class="green strong">93.27 %</td>
+ <td>203</td>
+ <td>104</td>
<td>97</td>
- <td>9</td>
- <td>48.4</td>
+ <td>7</td>
+ <td>80.9</td>
</tr>
<tr>
<td class="strong"><a href="#8f4756eb3921bfb6ba841bdb3a8d508fd15e06f8" class="src_link" title="spec/lib/gqli/dsl_spec.rb">spec/lib/gqli/dsl_spec.rb</a></td>
<td class="green strong">100.0 %</td>
- <td>398</td>
- <td>147</td>
- <td>147</td>
+ <td>468</td>
+ <td>174</td>
+ <td>174</td>
<td>0</td>
<td>1.1</td>
</tr>
<tr>
<td class="strong"><a href="#a6d1c1911a021a8ab76d6b8afd1ba662a68cd017" class="src_link" title="spec/lib/gqli/introspection_spec.rb">spec/lib/gqli/introspection_spec.rb</a></td>
<td class="green strong">100.0 %</td>
- <td>326</td>
- <td>186</td>
- <td>186</td>
+ <td>380</td>
+ <td>215</td>
+ <td>215</td>
<td>0</td>
<td>1.6</td>
</tr>
</tbody>
@@ -369,30 +379,30 @@
<span class="hits">1</span>
<code class="ruby"> def initialize(name = nil, depth = 0, &block)</code>
</li>
- <li class="covered" data-hits="378" data-linenumber="11">
- <span class="hits">378</span>
+ <li class="covered" data-hits="401" data-linenumber="11">
+ <span class="hits">401</span>
<code class="ruby"> @__name = name</code>
</li>
- <li class="covered" data-hits="378" data-linenumber="12">
- <span class="hits">378</span>
+ <li class="covered" data-hits="401" data-linenumber="12">
+ <span class="hits">401</span>
<code class="ruby"> @__depth = depth</code>
</li>
- <li class="covered" data-hits="378" data-linenumber="13">
- <span class="hits">378</span>
+ <li class="covered" data-hits="401" data-linenumber="13">
+ <span class="hits">401</span>
<code class="ruby"> @__nodes = []</code>
</li>
- <li class="covered" data-hits="378" data-linenumber="14">
- <span class="hits">378</span>
+ <li class="covered" data-hits="401" data-linenumber="14">
+ <span class="hits">401</span>
<code class="ruby"> instance_eval(&block) unless block.nil?</code>
</li>
<li class="never" data-hits="" data-linenumber="15">
@@ -477,18 +487,18 @@
<span class="hits">1</span>
<code class="ruby"> def __node(name, params = {}, &block)</code>
</li>
- <li class="covered" data-hits="158" data-linenumber="29">
- <span class="hits">158</span>
+ <li class="covered" data-hits="174" data-linenumber="29">
+ <span class="hits">174</span>
<code class="ruby"> require_relative './node'</code>
</li>
- <li class="covered" data-hits="158" data-linenumber="30">
- <span class="hits">158</span>
+ <li class="covered" data-hits="174" data-linenumber="30">
+ <span class="hits">174</span>
<code class="ruby"> @__nodes << Node.new(name, params, __depth + 1, &block)</code>
</li>
<li class="never" data-hits="" data-linenumber="31">
@@ -645,12 +655,12 @@
<span class="hits">1</span>
<code class="ruby"> def __params_from_args(args)</code>
</li>
- <li class="covered" data-hits="149" data-linenumber="57">
- <span class="hits">149</span>
+ <li class="covered" data-hits="165" data-linenumber="57">
+ <span class="hits">165</span>
<code class="ruby"> args.empty? ? {} : args[0]</code>
</li>
<li class="never" data-hits="" data-linenumber="58">
@@ -669,12 +679,12 @@
<span class="hits">1</span>
<code class="ruby"> def method_missing(name, *args, &block)</code>
</li>
- <li class="covered" data-hits="149" data-linenumber="61">
- <span class="hits">149</span>
+ <li class="covered" data-hits="165" data-linenumber="61">
+ <span class="hits">165</span>
<code class="ruby"> __node(name.to_s, __params_from_args(args), &block)</code>
</li>
<li class="never" data-hits="" data-linenumber="62">
@@ -796,42 +806,42 @@
<span class="hits">1</span>
<code class="ruby"> def initialize(url, params: {}, headers: {}, validate_query: true)</code>
</li>
- <li class="covered" data-hits="27" data-linenumber="15">
- <span class="hits">27</span>
+ <li class="covered" data-hits="30" data-linenumber="15">
+ <span class="hits">30</span>
<code class="ruby"> @url = url</code>
</li>
- <li class="covered" data-hits="27" data-linenumber="16">
- <span class="hits">27</span>
+ <li class="covered" data-hits="30" data-linenumber="16">
+ <span class="hits">30</span>
<code class="ruby"> @params = params</code>
</li>
- <li class="covered" data-hits="27" data-linenumber="17">
- <span class="hits">27</span>
+ <li class="covered" data-hits="30" data-linenumber="17">
+ <span class="hits">30</span>
<code class="ruby"> @headers = headers</code>
</li>
- <li class="covered" data-hits="27" data-linenumber="18">
- <span class="hits">27</span>
+ <li class="covered" data-hits="30" data-linenumber="18">
+ <span class="hits">30</span>
<code class="ruby"> @validate_query = validate_query</code>
</li>
<li class="never" data-hits="" data-linenumber="19">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="27" data-linenumber="20">
- <span class="hits">27</span>
+ <li class="covered" data-hits="30" data-linenumber="20">
+ <span class="hits">30</span>
<code class="ruby"> @schema = Introspection.new(self) if validate_query</code>
</li>
<li class="never" data-hits="" data-linenumber="21">
@@ -928,48 +938,48 @@
<span class="hits">1</span>
<code class="ruby"> def execute!(query)</code>
</li>
- <li class="covered" data-hits="28" data-linenumber="37">
- <span class="hits">28</span>
+ <li class="covered" data-hits="31" data-linenumber="37">
+ <span class="hits">31</span>
<code class="ruby"> http_response = HTTP.headers(request_headers).post(@url, params: @params, json: { query: query.to_gql })</code>
</li>
<li class="never" data-hits="" data-linenumber="38">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="28" data-linenumber="39">
- <span class="hits">28</span>
+ <li class="covered" data-hits="31" data-linenumber="39">
+ <span class="hits">31</span>
<code class="ruby"> fail "Error: #{http_response.reason}\nBody: #{http_response.body}" if http_response.status >= 300</code>
</li>
<li class="never" data-hits="" data-linenumber="40">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="26" data-linenumber="41">
- <span class="hits">26</span>
+ <li class="covered" data-hits="29" data-linenumber="41">
+ <span class="hits">29</span>
<code class="ruby"> data = JSON.parse(http_response.to_s)['data']</code>
</li>
<li class="never" data-hits="" data-linenumber="42">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="26" data-linenumber="43">
- <span class="hits">26</span>
+ <li class="covered" data-hits="29" data-linenumber="43">
+ <span class="hits">29</span>
<code class="ruby"> Response.new(data, query)</code>
</li>
<li class="never" data-hits="" data-linenumber="44">
@@ -1102,25 +1112,25 @@
<code class="ruby"> {</code>
</li>
- <li class="never" data-hits="" data-linenumber="66">
+ <li class="covered" data-hits="31" data-linenumber="66">
+ <span class="hits">31</span>
-
<code class="ruby"> accept: 'application/json',</code>
</li>
<li class="never" data-hits="" data-linenumber="67">
<code class="ruby"> user_agent: "gqli.rb/#{VERSION}; http.rb/#{HTTP::VERSION}"</code>
</li>
- <li class="covered" data-hits="28" data-linenumber="68">
- <span class="hits">28</span>
+ <li class="never" data-hits="" data-linenumber="68">
+
<code class="ruby"> }.merge(@headers)</code>
</li>
<li class="never" data-hits="" data-linenumber="69">
@@ -1381,12 +1391,12 @@
<span class="hits">1</span>
<code class="ruby"> def self.create(access_token, validate_query: true)</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="8">
- <span class="hits">1</span>
+ <li class="covered" data-hits="4" data-linenumber="8">
+ <span class="hits">4</span>
<code class="ruby"> GQLi::Client.new(</code>
</li>
<li class="never" data-hits="" data-linenumber="9">
@@ -1451,12 +1461,12 @@
<div class="source_table" id="9abd05ccff4ad7a4f5b1bb75901af6e008bc9c5d">
<div class="header">
<h3>lib/gqli/dsl.rb</h3>
<h4><span class="green">100.0 %</span> covered</h4>
<div>
- <b>22</b> relevant lines.
- <span class="green"><b>22</b> lines covered</span> and
+ <b>27</b> relevant lines.
+ <span class="green"><b>27</b> lines covered</span> and
<span class="red"><b>0</b> lines missed.</span>
</div>
</div>
<pre>
@@ -1481,386 +1491,476 @@
</li>
<li class="covered" data-hits="1" data-linenumber="4">
<span class="hits">1</span>
- <code class="ruby">require_relative './subscription'</code>
+ <code class="ruby">require_relative './mutation'</code>
</li>
<li class="covered" data-hits="1" data-linenumber="5">
<span class="hits">1</span>
- <code class="ruby">require_relative './fragment'</code>
+ <code class="ruby">require_relative './subscription'</code>
</li>
<li class="covered" data-hits="1" data-linenumber="6">
<span class="hits">1</span>
+ <code class="ruby">require_relative './fragment'</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="7">
+ <span class="hits">1</span>
+
<code class="ruby">require_relative './enum_value'</code>
</li>
- <li class="never" data-hits="" data-linenumber="7">
+ <li class="never" data-hits="" data-linenumber="8">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="8">
+ <li class="covered" data-hits="1" data-linenumber="9">
<span class="hits">1</span>
<code class="ruby">module GQLi</code>
</li>
- <li class="never" data-hits="" data-linenumber="9">
+ <li class="never" data-hits="" data-linenumber="10">
<code class="ruby"> # GraphQL-like DSL methods</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="10">
+ <li class="covered" data-hits="1" data-linenumber="11">
<span class="hits">1</span>
<code class="ruby"> module DSL</code>
</li>
- <li class="never" data-hits="" data-linenumber="11">
+ <li class="never" data-hits="" data-linenumber="12">
<code class="ruby"> # Creates a Query object</code>
</li>
- <li class="never" data-hits="" data-linenumber="12">
+ <li class="never" data-hits="" data-linenumber="13">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="13">
+ <li class="never" data-hits="" data-linenumber="14">
<code class="ruby"> # Can be used at a class level</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="14">
+ <li class="covered" data-hits="1" data-linenumber="15">
<span class="hits">1</span>
<code class="ruby"> def self.query(name = nil, &block)</code>
</li>
- <li class="covered" data-hits="34" data-linenumber="15">
+ <li class="covered" data-hits="34" data-linenumber="16">
<span class="hits">34</span>
<code class="ruby"> Query.new(name, &block)</code>
</li>
- <li class="never" data-hits="" data-linenumber="16">
+ <li class="never" data-hits="" data-linenumber="17">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="17">
+ <li class="never" data-hits="" data-linenumber="18">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="18">
+ <li class="never" data-hits="" data-linenumber="19">
<code class="ruby"> # Creates a Subscription object</code>
</li>
- <li class="never" data-hits="" data-linenumber="19">
+ <li class="never" data-hits="" data-linenumber="20">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="20">
+ <li class="never" data-hits="" data-linenumber="21">
<code class="ruby"> # Can be used at a class level</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="21">
+ <li class="covered" data-hits="1" data-linenumber="22">
<span class="hits">1</span>
<code class="ruby"> def self.subscription(name = nil, &block)</code>
</li>
- <li class="covered" data-hits="2" data-linenumber="22">
+ <li class="covered" data-hits="2" data-linenumber="23">
<span class="hits">2</span>
<code class="ruby"> Subscription.new(name, &block)</code>
</li>
- <li class="never" data-hits="" data-linenumber="23">
+ <li class="never" data-hits="" data-linenumber="24">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="24">
+ <li class="never" data-hits="" data-linenumber="25">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="25">
+ <li class="never" data-hits="" data-linenumber="26">
+ <code class="ruby"> # Creates a Mutation object</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="27">
+
+
+ <code class="ruby"> #</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="28">
+
+
+ <code class="ruby"> # Can be used at a class level</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="29">
+ <span class="hits">1</span>
+
+ <code class="ruby"> def self.mutation(name = nil, &block)</code>
+ </li>
+
+ <li class="covered" data-hits="5" data-linenumber="30">
+ <span class="hits">5</span>
+
+ <code class="ruby"> Mutation.new(name, &block)</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="31">
+
+
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="32">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="33">
+
+
<code class="ruby"> # Creates a Fragment object</code>
</li>
- <li class="never" data-hits="" data-linenumber="26">
+ <li class="never" data-hits="" data-linenumber="34">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="27">
+ <li class="never" data-hits="" data-linenumber="35">
<code class="ruby"> # Can be used at a class level</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="28">
+ <li class="covered" data-hits="1" data-linenumber="36">
<span class="hits">1</span>
<code class="ruby"> def self.fragment(name, on, &block)</code>
</li>
- <li class="covered" data-hits="3" data-linenumber="29">
+ <li class="covered" data-hits="3" data-linenumber="37">
<span class="hits">3</span>
<code class="ruby"> Fragment.new(name, on, &block)</code>
</li>
- <li class="never" data-hits="" data-linenumber="30">
+ <li class="never" data-hits="" data-linenumber="38">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="31">
+ <li class="never" data-hits="" data-linenumber="39">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="32">
+ <li class="never" data-hits="" data-linenumber="40">
<code class="ruby"> # Creates a EnumValue object</code>
</li>
- <li class="never" data-hits="" data-linenumber="33">
+ <li class="never" data-hits="" data-linenumber="41">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="34">
+ <li class="never" data-hits="" data-linenumber="42">
<code class="ruby"> # Can be used at a class level</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="35">
+ <li class="covered" data-hits="1" data-linenumber="43">
<span class="hits">1</span>
<code class="ruby"> def self.enum(value)</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="36">
+ <li class="covered" data-hits="1" data-linenumber="44">
<span class="hits">1</span>
<code class="ruby"> EnumValue.new(value)</code>
</li>
- <li class="never" data-hits="" data-linenumber="37">
+ <li class="never" data-hits="" data-linenumber="45">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="38">
+ <li class="never" data-hits="" data-linenumber="46">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="39">
+ <li class="never" data-hits="" data-linenumber="47">
<code class="ruby"> # Creates a Query object</code>
</li>
- <li class="never" data-hits="" data-linenumber="40">
+ <li class="never" data-hits="" data-linenumber="48">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="41">
+ <li class="never" data-hits="" data-linenumber="49">
<code class="ruby"> # Can be used at an instance level</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="42">
+ <li class="covered" data-hits="1" data-linenumber="50">
<span class="hits">1</span>
<code class="ruby"> def query(name = nil, &block)</code>
</li>
- <li class="covered" data-hits="3" data-linenumber="43">
+ <li class="covered" data-hits="3" data-linenumber="51">
<span class="hits">3</span>
<code class="ruby"> Query.new(name, &block)</code>
</li>
- <li class="never" data-hits="" data-linenumber="44">
+ <li class="never" data-hits="" data-linenumber="52">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="45">
+ <li class="never" data-hits="" data-linenumber="53">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="46">
+ <li class="never" data-hits="" data-linenumber="54">
+ <code class="ruby"> # Creates a Mutation object</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="55">
+
+
+ <code class="ruby"> #</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="56">
+
+
+ <code class="ruby"> # Can be used at a instance level</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="57">
+ <span class="hits">1</span>
+
+ <code class="ruby"> def mutation(name = nil, &block)</code>
+ </li>
+
+ <li class="covered" data-hits="2" data-linenumber="58">
+ <span class="hits">2</span>
+
+ <code class="ruby"> Mutation.new(name, &block)</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="59">
+
+
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="60">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="61">
+
+
<code class="ruby"> # Creates a Subscription object</code>
</li>
- <li class="never" data-hits="" data-linenumber="47">
+ <li class="never" data-hits="" data-linenumber="62">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="48">
+ <li class="never" data-hits="" data-linenumber="63">
- <code class="ruby"> # Can be used at a class level</code>
+ <code class="ruby"> # Can be used at a instance level</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="49">
+ <li class="covered" data-hits="1" data-linenumber="64">
<span class="hits">1</span>
<code class="ruby"> def subscription(name = nil, &block)</code>
</li>
- <li class="covered" data-hits="2" data-linenumber="50">
+ <li class="covered" data-hits="2" data-linenumber="65">
<span class="hits">2</span>
<code class="ruby"> Subscription.new(name, &block)</code>
</li>
- <li class="never" data-hits="" data-linenumber="51">
+ <li class="never" data-hits="" data-linenumber="66">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="52">
+ <li class="never" data-hits="" data-linenumber="67">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="53">
+ <li class="never" data-hits="" data-linenumber="68">
<code class="ruby"> # Creates a Fragment object</code>
</li>
- <li class="never" data-hits="" data-linenumber="54">
+ <li class="never" data-hits="" data-linenumber="69">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="55">
+ <li class="never" data-hits="" data-linenumber="70">
<code class="ruby"> # Can be used at an instance level</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="56">
+ <li class="covered" data-hits="1" data-linenumber="71">
<span class="hits">1</span>
<code class="ruby"> def fragment(name, on, &block)</code>
</li>
- <li class="covered" data-hits="4" data-linenumber="57">
+ <li class="covered" data-hits="4" data-linenumber="72">
<span class="hits">4</span>
<code class="ruby"> Fragment.new(name, on, &block)</code>
</li>
- <li class="never" data-hits="" data-linenumber="58">
+ <li class="never" data-hits="" data-linenumber="73">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="59">
+ <li class="never" data-hits="" data-linenumber="74">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="60">
+ <li class="never" data-hits="" data-linenumber="75">
<code class="ruby"> # Creates a EnumValue object</code>
</li>
- <li class="never" data-hits="" data-linenumber="61">
+ <li class="never" data-hits="" data-linenumber="76">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="62">
+ <li class="never" data-hits="" data-linenumber="77">
<code class="ruby"> # Can be used at an instance level</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="63">
+ <li class="covered" data-hits="1" data-linenumber="78">
<span class="hits">1</span>
<code class="ruby"> def enum(value)</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="64">
+ <li class="covered" data-hits="1" data-linenumber="79">
<span class="hits">1</span>
<code class="ruby"> EnumValue.new(value)</code>
</li>
- <li class="never" data-hits="" data-linenumber="65">
+ <li class="never" data-hits="" data-linenumber="80">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="66">
+ <li class="never" data-hits="" data-linenumber="81">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="67">
+ <li class="never" data-hits="" data-linenumber="82">
<code class="ruby">end</code>
</li>
@@ -2645,36 +2745,36 @@
<span class="hits">1</span>
<code class="ruby"> def initialize(client)</code>
</li>
- <li class="covered" data-hits="24" data-linenumber="80">
- <span class="hits">24</span>
+ <li class="covered" data-hits="27" data-linenumber="80">
+ <span class="hits">27</span>
<code class="ruby"> @schema = client.execute!(IntrospectionQuery).data.__schema</code>
</li>
- <li class="covered" data-hits="24" data-linenumber="81">
- <span class="hits">24</span>
+ <li class="covered" data-hits="27" data-linenumber="81">
+ <span class="hits">27</span>
<code class="ruby"> @query_type = schema.queryType</code>
</li>
- <li class="covered" data-hits="24" data-linenumber="82">
- <span class="hits">24</span>
+ <li class="covered" data-hits="27" data-linenumber="82">
+ <span class="hits">27</span>
<code class="ruby"> @mutation_type = schema.mutationType</code>
</li>
- <li class="covered" data-hits="24" data-linenumber="83">
- <span class="hits">24</span>
+ <li class="covered" data-hits="27" data-linenumber="83">
+ <span class="hits">27</span>
<code class="ruby"> @subscription_type = schema.subscriptionType</code>
</li>
- <li class="covered" data-hits="24" data-linenumber="84">
- <span class="hits">24</span>
+ <li class="covered" data-hits="27" data-linenumber="84">
+ <span class="hits">27</span>
<code class="ruby"> @types = schema.types</code>
</li>
<li class="never" data-hits="" data-linenumber="85">
@@ -2699,12 +2799,12 @@
<span class="hits">1</span>
<code class="ruby"> def validate(query)</code>
</li>
- <li class="covered" data-hits="31" data-linenumber="89">
- <span class="hits">31</span>
+ <li class="covered" data-hits="34" data-linenumber="89">
+ <span class="hits">34</span>
<code class="ruby"> Validation.new(self, query)</code>
</li>
<li class="never" data-hits="" data-linenumber="90">
@@ -2758,10 +2858,191 @@
</ol>
</pre>
</div>
+ <div class="source_table" id="c40220bd28640b7a696c273e3498791096d73ce9">
+ <div class="header">
+ <h3>lib/gqli/mutation.rb</h3>
+ <h4><span class="yellow">88.89 %</span> covered</h4>
+ <div>
+ <b>9</b> relevant lines.
+ <span class="green"><b>8</b> lines covered</span> and
+ <span class="red"><b>1</b> lines missed.</span>
+ </div>
+ </div>
+
+ <pre>
+ <ol>
+
+ <li class="never" data-hits="" data-linenumber="1">
+
+
+ <code class="ruby"># frozen_string_literal: true</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="2">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="3">
+ <span class="hits">1</span>
+
+ <code class="ruby">module GQLi</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="4">
+
+
+ <code class="ruby"> # Mutation node</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="5">
+ <span class="hits">1</span>
+
+ <code class="ruby"> class Mutation < Base</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="6">
+
+
+ <code class="ruby"> # Serializes to a GraphQL string</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="7">
+ <span class="hits">1</span>
+
+ <code class="ruby"> def to_gql</code>
+ </li>
+
+ <li class="covered" data-hits="8" data-linenumber="8">
+ <span class="hits">8</span>
+
+ <code class="ruby"> result = <<~GQL</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="9">
+
+
+ <code class="ruby"> mutation #{__name ? __name + ' ' : ''}{</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="10">
+
+
+ <code class="ruby"> #{__nodes.map(&:to_gql).join("\n")}</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="11">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="12">
+
+
+ <code class="ruby"> GQL</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="13">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="covered" data-hits="8" data-linenumber="14">
+ <span class="hits">8</span>
+
+ <code class="ruby"> result.lstrip</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="15">
+
+
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="16">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="17">
+
+
+ <code class="ruby"> # Delegates itself to the client to be executed</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="18">
+ <span class="hits">1</span>
+
+ <code class="ruby"> def __execute(client)</code>
+ </li>
+
+ <li class="missed" data-hits="0" data-linenumber="19">
+
+
+ <code class="ruby"> client.execute(self)</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="20">
+
+
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="21">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="22">
+
+
+ <code class="ruby"> # Serializes to a GraphQL string</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="23">
+ <span class="hits">1</span>
+
+ <code class="ruby"> def to_s</code>
+ </li>
+
+ <li class="covered" data-hits="2" data-linenumber="24">
+ <span class="hits">2</span>
+
+ <code class="ruby"> to_gql</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="25">
+
+
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="26">
+
+
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="27">
+
+
+ <code class="ruby">end</code>
+ </li>
+
+ </ol>
+ </pre>
+</div>
+
+
<div class="source_table" id="827311add0f30734381233709eff6f2feef29107">
<div class="header">
<h3>lib/gqli/node.rb</h3>
<h4><span class="green">100.0 %</span> covered</h4>
<div>
@@ -2832,18 +3113,18 @@
<span class="hits">1</span>
<code class="ruby"> def initialize(name, params = {}, depth = 1, &block)</code>
</li>
- <li class="covered" data-hits="330" data-linenumber="11">
- <span class="hits">330</span>
+ <li class="covered" data-hits="346" data-linenumber="11">
+ <span class="hits">346</span>
<code class="ruby"> super(name, depth, &block)</code>
</li>
- <li class="covered" data-hits="330" data-linenumber="12">
- <span class="hits">330</span>
+ <li class="covered" data-hits="346" data-linenumber="12">
+ <span class="hits">346</span>
<code class="ruby"> @__params = params</code>
</li>
<li class="never" data-hits="" data-linenumber="13">
@@ -2868,42 +3149,42 @@
<span class="hits">1</span>
<code class="ruby"> def to_gql</code>
</li>
- <li class="covered" data-hits="2677" data-linenumber="17">
- <span class="hits">2677</span>
+ <li class="covered" data-hits="3020" data-linenumber="17">
+ <span class="hits">3020</span>
<code class="ruby"> result = ' ' * __depth + __name</code>
</li>
- <li class="covered" data-hits="2677" data-linenumber="18">
- <span class="hits">2677</span>
+ <li class="covered" data-hits="3020" data-linenumber="18">
+ <span class="hits">3020</span>
<code class="ruby"> result += __params_to_s(__params, true) unless __params.empty?</code>
</li>
- <li class="covered" data-hits="2677" data-linenumber="19">
- <span class="hits">2677</span>
+ <li class="covered" data-hits="3020" data-linenumber="19">
+ <span class="hits">3020</span>
<code class="ruby"> unless __nodes.empty?</code>
</li>
- <li class="covered" data-hits="863" data-linenumber="20">
- <span class="hits">863</span>
+ <li class="covered" data-hits="976" data-linenumber="20">
+ <span class="hits">976</span>
<code class="ruby"> result += " {\n"</code>
</li>
- <li class="covered" data-hits="863" data-linenumber="21">
- <span class="hits">863</span>
+ <li class="covered" data-hits="976" data-linenumber="21">
+ <span class="hits">976</span>
<code class="ruby"> result += __nodes.map(&:to_gql).join("\n")</code>
</li>
- <li class="covered" data-hits="863" data-linenumber="22">
- <span class="hits">863</span>
+ <li class="covered" data-hits="976" data-linenumber="22">
+ <span class="hits">976</span>
<code class="ruby"> result += "\n#{' ' * __depth}}"</code>
</li>
<li class="never" data-hits="" data-linenumber="23">
@@ -2916,12 +3197,12 @@
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="2677" data-linenumber="25">
- <span class="hits">2677</span>
+ <li class="covered" data-hits="3020" data-linenumber="25">
+ <span class="hits">3020</span>
<code class="ruby"> result</code>
</li>
<li class="never" data-hits="" data-linenumber="26">
@@ -2952,12 +3233,12 @@
<span class="hits">1</span>
<code class="ruby"> def __directive?(params)</code>
</li>
- <li class="covered" data-hits="65" data-linenumber="31">
- <span class="hits">65</span>
+ <li class="covered" data-hits="79" data-linenumber="31">
+ <span class="hits">79</span>
<code class="ruby"> params.size == 1 && params.keys.first.to_s.start_with?('@')</code>
</li>
<li class="never" data-hits="" data-linenumber="32">
@@ -3012,42 +3293,42 @@
<span class="hits">1</span>
<code class="ruby"> def __params_to_s(params, initial = false)</code>
</li>
- <li class="covered" data-hits="126" data-linenumber="41">
- <span class="hits">126</span>
+ <li class="covered" data-hits="154" data-linenumber="41">
+ <span class="hits">154</span>
<code class="ruby"> case params</code>
</li>
<li class="never" data-hits="" data-linenumber="42">
<code class="ruby"> when ::Hash</code>
</li>
- <li class="covered" data-hits="65" data-linenumber="43">
- <span class="hits">65</span>
+ <li class="covered" data-hits="79" data-linenumber="43">
+ <span class="hits">79</span>
<code class="ruby"> return __directive(params) if __directive?(params)</code>
</li>
<li class="never" data-hits="" data-linenumber="44">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="63" data-linenumber="45">
- <span class="hits">63</span>
+ <li class="covered" data-hits="77" data-linenumber="45">
+ <span class="hits">77</span>
<code class="ruby"> result = params.map do |k, v|</code>
</li>
- <li class="covered" data-hits="64" data-linenumber="46">
- <span class="hits">64</span>
+ <li class="covered" data-hits="78" data-linenumber="46">
+ <span class="hits">78</span>
<code class="ruby"> "#{k}: #{__params_to_s(v)}"</code>
</li>
<li class="never" data-hits="" data-linenumber="47">
@@ -3060,12 +3341,12 @@
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="63" data-linenumber="49">
- <span class="hits">63</span>
+ <li class="covered" data-hits="77" data-linenumber="49">
+ <span class="hits">77</span>
<code class="ruby"> return "(#{result})" if initial</code>
</li>
<li class="never" data-hits="" data-linenumber="50">
@@ -3096,24 +3377,24 @@
<code class="ruby"> when ::String</code>
</li>
- <li class="covered" data-hits="4" data-linenumber="55">
- <span class="hits">4</span>
+ <li class="covered" data-hits="12" data-linenumber="55">
+ <span class="hits">12</span>
<code class="ruby"> "\"#{params}\""</code>
</li>
<li class="never" data-hits="" data-linenumber="56">
<code class="ruby"> else</code>
</li>
- <li class="covered" data-hits="56" data-linenumber="57">
- <span class="hits">56</span>
+ <li class="covered" data-hits="62" data-linenumber="57">
+ <span class="hits">62</span>
<code class="ruby"> params.to_s</code>
</li>
<li class="never" data-hits="" data-linenumber="58">
@@ -3211,12 +3492,12 @@
<span class="hits">1</span>
<code class="ruby"> def to_gql</code>
</li>
- <li class="covered" data-hits="43" data-linenumber="10">
- <span class="hits">43</span>
+ <li class="covered" data-hits="46" data-linenumber="10">
+ <span class="hits">46</span>
<code class="ruby"> result = <<~GQL</code>
</li>
<li class="never" data-hits="" data-linenumber="11">
@@ -3247,12 +3528,12 @@
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="43" data-linenumber="16">
- <span class="hits">43</span>
+ <li class="covered" data-hits="46" data-linenumber="16">
+ <span class="hits">46</span>
<code class="ruby"> result.lstrip</code>
</li>
<li class="never" data-hits="" data-linenumber="17">
@@ -3410,18 +3691,18 @@
<span class="hits">1</span>
<code class="ruby"> def initialize(data, query)</code>
</li>
- <li class="covered" data-hits="26" data-linenumber="11">
- <span class="hits">26</span>
+ <li class="covered" data-hits="29" data-linenumber="11">
+ <span class="hits">29</span>
<code class="ruby"> @data = Hashie::Mash.new(data)</code>
</li>
- <li class="covered" data-hits="26" data-linenumber="12">
- <span class="hits">26</span>
+ <li class="covered" data-hits="29" data-linenumber="12">
+ <span class="hits">29</span>
<code class="ruby"> @query = query</code>
</li>
<li class="never" data-hits="" data-linenumber="13">
@@ -3480,11 +3761,11 @@
</li>
<li class="never" data-hits="" data-linenumber="4">
- <code class="ruby"> # Query node</code>
+ <code class="ruby"> # Subscription node</code>
</li>
<li class="covered" data-hits="1" data-linenumber="5">
<span class="hits">1</span>
@@ -3629,15 +3910,15 @@
<div class="source_table" id="4c31f7a77052c02790c8c5c06fd2085c7022ac23">
<div class="header">
<h3>lib/gqli/validation.rb</h3>
- <h4><span class="green">91.51 %</span> covered</h4>
+ <h4><span class="green">93.27 %</span> covered</h4>
<div>
- <b>106</b> relevant lines.
+ <b>104</b> relevant lines.
<span class="green"><b>97</b> lines covered</span> and
- <span class="red"><b>9</b> lines missed.</span>
+ <span class="red"><b>7</b> lines missed.</span>
</div>
</div>
<pre>
<ol>
@@ -3673,11 +3954,11 @@
</li>
<li class="covered" data-hits="1" data-linenumber="6">
<span class="hits">1</span>
- <code class="ruby"> attr_reader :schema, :query, :errors</code>
+ <code class="ruby"> attr_reader :schema, :root, :errors</code>
</li>
<li class="never" data-hits="" data-linenumber="7">
@@ -3685,39 +3966,39 @@
</li>
<li class="covered" data-hits="1" data-linenumber="8">
<span class="hits">1</span>
- <code class="ruby"> def initialize(schema, query)</code>
+ <code class="ruby"> def initialize(schema, root)</code>
</li>
- <li class="covered" data-hits="31" data-linenumber="9">
- <span class="hits">31</span>
+ <li class="covered" data-hits="34" data-linenumber="9">
+ <span class="hits">34</span>
<code class="ruby"> @schema = schema</code>
</li>
- <li class="covered" data-hits="31" data-linenumber="10">
- <span class="hits">31</span>
+ <li class="covered" data-hits="34" data-linenumber="10">
+ <span class="hits">34</span>
- <code class="ruby"> @query = query</code>
+ <code class="ruby"> @root = root</code>
</li>
- <li class="covered" data-hits="31" data-linenumber="11">
- <span class="hits">31</span>
+ <li class="covered" data-hits="34" data-linenumber="11">
+ <span class="hits">34</span>
<code class="ruby"> @errors = []</code>
</li>
<li class="never" data-hits="" data-linenumber="12">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="31" data-linenumber="13">
- <span class="hits">31</span>
+ <li class="covered" data-hits="34" data-linenumber="13">
+ <span class="hits">34</span>
<code class="ruby"> validate</code>
</li>
<li class="never" data-hits="" data-linenumber="14">
@@ -3742,12 +4023,12 @@
<span class="hits">1</span>
<code class="ruby"> def valid?</code>
</li>
- <li class="covered" data-hits="31" data-linenumber="18">
- <span class="hits">31</span>
+ <li class="covered" data-hits="68" data-linenumber="18">
+ <span class="hits">68</span>
<code class="ruby"> errors.empty?</code>
</li>
<li class="never" data-hits="" data-linenumber="19">
@@ -3778,1067 +4059,1085 @@
<span class="hits">1</span>
<code class="ruby"> def validate</code>
</li>
- <li class="covered" data-hits="31" data-linenumber="24">
- <span class="hits">31</span>
+ <li class="covered" data-hits="34" data-linenumber="24">
+ <span class="hits">34</span>
- <code class="ruby"> fail 'Not a Query object' unless query.is_a?(Query)</code>
+ <code class="ruby"> @errors = []</code>
</li>
<li class="never" data-hits="" data-linenumber="25">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="62" data-linenumber="26">
- <span class="hits">62</span>
+ <li class="covered" data-hits="34" data-linenumber="26">
+ <span class="hits">34</span>
- <code class="ruby"> query_type = types.find { |t| t.name.casecmp('query').zero? }</code>
+ <code class="ruby"> type_name = root.class.name.split('::').last</code>
</li>
- <li class="covered" data-hits="31" data-linenumber="27">
- <span class="hits">31</span>
+ <li class="covered" data-hits="34" data-linenumber="27">
+ <span class="hits">34</span>
- <code class="ruby"> query.__nodes.each do |node|</code>
+ <code class="ruby"> validate_type(type_name)</code>
</li>
- <li class="covered" data-hits="32" data-linenumber="28">
- <span class="hits">32</span>
+ <li class="never" data-hits="" data-linenumber="28">
- <code class="ruby"> begin</code>
- </li>
-
- <li class="covered" data-hits="32" data-linenumber="29">
- <span class="hits">32</span>
- <code class="ruby"> validate_node(query_type, node)</code>
+ <code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="30">
+ <li class="never" data-hits="" data-linenumber="29">
- <code class="ruby"> rescue StandardError => e</code>
+ <code class="ruby"></code>
</li>
- <li class="covered" data-hits="12" data-linenumber="31">
- <span class="hits">12</span>
+ <li class="covered" data-hits="1" data-linenumber="30">
+ <span class="hits">1</span>
- <code class="ruby"> errors << e</code>
+ <code class="ruby"> private</code>
</li>
- <li class="never" data-hits="" data-linenumber="32">
+ <li class="never" data-hits="" data-linenumber="31">
- <code class="ruby"> end</code>
+ <code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="33">
+ <li class="covered" data-hits="1" data-linenumber="32">
+ <span class="hits">1</span>
+ <code class="ruby"> def validate_type(type)</code>
+ </li>
+
+ <li class="covered" data-hits="1295" data-linenumber="33">
+ <span class="hits">1295</span>
- <code class="ruby"> end</code>
+ <code class="ruby"> root_type = types.find { |t| t.name.casecmp(type).zero? }</code>
</li>
- <li class="never" data-hits="" data-linenumber="34">
+ <li class="covered" data-hits="34" data-linenumber="34">
+ <span class="hits">34</span>
+ <code class="ruby"> root.__nodes.each do |node|</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="35">
- <code class="ruby"></code>
+
+ <code class="ruby"> begin</code>
</li>
- <li class="covered" data-hits="31" data-linenumber="35">
- <span class="hits">31</span>
+ <li class="covered" data-hits="35" data-linenumber="36">
+ <span class="hits">35</span>
- <code class="ruby"> true</code>
+ <code class="ruby"> validate_node(root_type, node)</code>
</li>
- <li class="never" data-hits="" data-linenumber="36">
+ <li class="never" data-hits="" data-linenumber="37">
- <code class="ruby"> rescue StandardError => e</code>
+ <code class="ruby"> rescue StandardError => e</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="37">
+ <li class="covered" data-hits="13" data-linenumber="38">
+ <span class="hits">13</span>
+ <code class="ruby"> errors << e</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="39">
- <code class="ruby"> errors << e</code>
+
+ <code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="38">
+ <li class="never" data-hits="" data-linenumber="40">
- <code class="ruby"> end</code>
+ <code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="39">
+ <li class="never" data-hits="" data-linenumber="41">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="40">
- <span class="hits">1</span>
+ <li class="covered" data-hits="34" data-linenumber="42">
+ <span class="hits">34</span>
- <code class="ruby"> private</code>
+ <code class="ruby"> valid?</code>
</li>
- <li class="never" data-hits="" data-linenumber="41">
+ <li class="never" data-hits="" data-linenumber="43">
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="44">
+
+
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="42">
+ <li class="covered" data-hits="1" data-linenumber="45">
<span class="hits">1</span>
<code class="ruby"> def remove_alias(name)</code>
</li>
- <li class="covered" data-hits="87" data-linenumber="43">
- <span class="hits">87</span>
+ <li class="covered" data-hits="94" data-linenumber="46">
+ <span class="hits">94</span>
<code class="ruby"> return name unless name.include?(':')</code>
</li>
- <li class="never" data-hits="" data-linenumber="44">
+ <li class="never" data-hits="" data-linenumber="47">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="2" data-linenumber="45">
+ <li class="covered" data-hits="2" data-linenumber="48">
<span class="hits">2</span>
<code class="ruby"> name.split(':')[1].strip</code>
</li>
- <li class="never" data-hits="" data-linenumber="46">
+ <li class="never" data-hits="" data-linenumber="49">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="47">
+ <li class="never" data-hits="" data-linenumber="50">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="48">
+ <li class="covered" data-hits="1" data-linenumber="51">
<span class="hits">1</span>
<code class="ruby"> def types</code>
</li>
- <li class="covered" data-hits="150" data-linenumber="49">
- <span class="hits">150</span>
+ <li class="covered" data-hits="164" data-linenumber="52">
+ <span class="hits">164</span>
<code class="ruby"> schema.types</code>
</li>
- <li class="never" data-hits="" data-linenumber="50">
+ <li class="never" data-hits="" data-linenumber="53">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="51">
+ <li class="never" data-hits="" data-linenumber="54">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="52">
+ <li class="covered" data-hits="1" data-linenumber="55">
<span class="hits">1</span>
<code class="ruby"> def validate_node(parent_type, node)</code>
</li>
- <li class="covered" data-hits="94" data-linenumber="53">
- <span class="hits">94</span>
+ <li class="covered" data-hits="101" data-linenumber="56">
+ <span class="hits">101</span>
<code class="ruby"> validate_directives(node)</code>
</li>
- <li class="never" data-hits="" data-linenumber="54">
+ <li class="never" data-hits="" data-linenumber="57">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="91" data-linenumber="55">
- <span class="hits">91</span>
+ <li class="covered" data-hits="98" data-linenumber="58">
+ <span class="hits">98</span>
<code class="ruby"> return valid_match_node?(parent_type, node) if node.__name.start_with?('... on')</code>
</li>
- <li class="never" data-hits="" data-linenumber="56">
+ <li class="never" data-hits="" data-linenumber="59">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="87" data-linenumber="57">
- <span class="hits">87</span>
+ <li class="covered" data-hits="94" data-linenumber="60">
+ <span class="hits">94</span>
<code class="ruby"> node_name = remove_alias(node.__name)</code>
</li>
- <li class="never" data-hits="" data-linenumber="58">
+ <li class="never" data-hits="" data-linenumber="61">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="477" data-linenumber="59">
- <span class="hits">477</span>
+ <li class="covered" data-hits="556" data-linenumber="62">
+ <span class="hits">556</span>
<code class="ruby"> node_type = parent_type.fetch('fields', []).find { |f| f.name == node_name }</code>
</li>
- <li class="covered" data-hits="87" data-linenumber="60">
- <span class="hits">87</span>
+ <li class="covered" data-hits="94" data-linenumber="63">
+ <span class="hits">94</span>
<code class="ruby"> fail "Node type not found for '#{node_name}'" if node_type.nil?</code>
</li>
- <li class="never" data-hits="" data-linenumber="61">
+ <li class="never" data-hits="" data-linenumber="64">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="84" data-linenumber="62">
- <span class="hits">84</span>
+ <li class="covered" data-hits="90" data-linenumber="65">
+ <span class="hits">90</span>
<code class="ruby"> validate_params(node_type, node)</code>
</li>
- <li class="never" data-hits="" data-linenumber="63">
+ <li class="never" data-hits="" data-linenumber="66">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="84" data-linenumber="64">
- <span class="hits">84</span>
+ <li class="covered" data-hits="90" data-linenumber="67">
+ <span class="hits">90</span>
<code class="ruby"> resolved_node_type = type_for(node_type)</code>
</li>
- <li class="covered" data-hits="84" data-linenumber="65">
- <span class="hits">84</span>
+ <li class="covered" data-hits="90" data-linenumber="68">
+ <span class="hits">90</span>
<code class="ruby"> fail "Node type not found for '#{node_name}'" if resolved_node_type.nil?</code>
</li>
- <li class="never" data-hits="" data-linenumber="66">
+ <li class="never" data-hits="" data-linenumber="69">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="84" data-linenumber="67">
- <span class="hits">84</span>
+ <li class="covered" data-hits="90" data-linenumber="70">
+ <span class="hits">90</span>
<code class="ruby"> validate_nesting_node(resolved_node_type, node)</code>
</li>
- <li class="never" data-hits="" data-linenumber="68">
+ <li class="never" data-hits="" data-linenumber="71">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="142" data-linenumber="69">
- <span class="hits">142</span>
+ <li class="covered" data-hits="152" data-linenumber="72">
+ <span class="hits">152</span>
<code class="ruby"> node.__nodes.each { |n| validate_node(resolved_node_type, n) }</code>
</li>
- <li class="never" data-hits="" data-linenumber="70">
+ <li class="never" data-hits="" data-linenumber="73">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="71">
+ <li class="never" data-hits="" data-linenumber="74">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="72">
+ <li class="covered" data-hits="1" data-linenumber="75">
<span class="hits">1</span>
<code class="ruby"> def valid_match_node?(parent_type, node)</code>
</li>
- <li class="covered" data-hits="14" data-linenumber="73">
+ <li class="covered" data-hits="14" data-linenumber="76">
<span class="hits">14</span>
<code class="ruby"> return if parent_type.fetch('possibleTypes', []).find { |t| t.name == node.__name.gsub('... on ', '') }</code>
</li>
- <li class="covered" data-hits="2" data-linenumber="74">
+ <li class="covered" data-hits="2" data-linenumber="77">
<span class="hits">2</span>
<code class="ruby"> fail "Match type '#{node.__name.gsub('... on ', '')}' invalid"</code>
</li>
- <li class="never" data-hits="" data-linenumber="75">
+ <li class="never" data-hits="" data-linenumber="78">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="76">
+ <li class="never" data-hits="" data-linenumber="79">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="77">
+ <li class="covered" data-hits="1" data-linenumber="80">
<span class="hits">1</span>
<code class="ruby"> def validate_directives(node)</code>
</li>
- <li class="covered" data-hits="94" data-linenumber="78">
- <span class="hits">94</span>
+ <li class="covered" data-hits="101" data-linenumber="81">
+ <span class="hits">101</span>
<code class="ruby"> return unless node.__params.size >= 1</code>
</li>
- <li class="covered" data-hits="21" data-linenumber="79">
- <span class="hits">21</span>
+ <li class="covered" data-hits="24" data-linenumber="82">
+ <span class="hits">24</span>
<code class="ruby"> node.__params.first.tap do |k, v|</code>
</li>
- <li class="covered" data-hits="21" data-linenumber="80">
- <span class="hits">21</span>
+ <li class="covered" data-hits="24" data-linenumber="83">
+ <span class="hits">24</span>
<code class="ruby"> break unless k.to_s.start_with?('@')</code>
</li>
- <li class="never" data-hits="" data-linenumber="81">
+ <li class="never" data-hits="" data-linenumber="84">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="7" data-linenumber="82">
+ <li class="covered" data-hits="7" data-linenumber="85">
<span class="hits">7</span>
<code class="ruby"> fail "Directive unknown '#{k}'" unless %i[@include @skip].include?(k)</code>
</li>
- <li class="covered" data-hits="6" data-linenumber="83">
+ <li class="covered" data-hits="6" data-linenumber="86">
<span class="hits">6</span>
<code class="ruby"> fail "Missing arguments for directive '#{k}'" if v.nil? || !v.is_a?(::Hash) || v.empty?</code>
</li>
- <li class="covered" data-hits="4" data-linenumber="84">
+ <li class="covered" data-hits="4" data-linenumber="87">
<span class="hits">4</span>
<code class="ruby"> v.each do |arg, value|</code>
</li>
- <li class="covered" data-hits="5" data-linenumber="85">
- <span class="hits">5</span>
+ <li class="never" data-hits="" data-linenumber="88">
+
<code class="ruby"> begin</code>
</li>
- <li class="covered" data-hits="5" data-linenumber="86">
+ <li class="covered" data-hits="5" data-linenumber="89">
<span class="hits">5</span>
<code class="ruby"> fail "Invalid argument '#{arg}' for directive '#{k}'" if arg.to_s != 'if'</code>
</li>
- <li class="covered" data-hits="3" data-linenumber="87">
+ <li class="covered" data-hits="3" data-linenumber="90">
<span class="hits">3</span>
<code class="ruby"> fail "Invalid value for 'if`, must be a boolean" if value != !!value</code>
</li>
- <li class="never" data-hits="" data-linenumber="88">
+ <li class="never" data-hits="" data-linenumber="91">
<code class="ruby"> rescue StandardError => e</code>
</li>
- <li class="covered" data-hits="3" data-linenumber="89">
+ <li class="covered" data-hits="3" data-linenumber="92">
<span class="hits">3</span>
<code class="ruby"> errors << e</code>
</li>
- <li class="never" data-hits="" data-linenumber="90">
+ <li class="never" data-hits="" data-linenumber="93">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="91">
+ <li class="never" data-hits="" data-linenumber="94">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="92">
+ <li class="never" data-hits="" data-linenumber="95">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="93">
+ <li class="never" data-hits="" data-linenumber="96">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="94">
+ <li class="never" data-hits="" data-linenumber="97">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="95">
+ <li class="covered" data-hits="1" data-linenumber="98">
<span class="hits">1</span>
<code class="ruby"> def validate_params(node_type, node)</code>
</li>
- <li class="covered" data-hits="107" data-linenumber="96">
- <span class="hits">107</span>
+ <li class="covered" data-hits="115" data-linenumber="99">
+ <span class="hits">115</span>
<code class="ruby"> node.__params.reject { |p, _| p.to_s.start_with?('@') }.each do |param, value|</code>
</li>
- <li class="covered" data-hits="19" data-linenumber="97">
- <span class="hits">19</span>
+ <li class="never" data-hits="" data-linenumber="100">
+
<code class="ruby"> begin</code>
</li>
- <li class="covered" data-hits="105" data-linenumber="98">
- <span class="hits">105</span>
+ <li class="covered" data-hits="109" data-linenumber="101">
+ <span class="hits">109</span>
<code class="ruby"> arg = node_type.fetch('args', []).find { |a| a.name == param.to_s }</code>
</li>
- <li class="covered" data-hits="19" data-linenumber="99">
- <span class="hits">19</span>
+ <li class="covered" data-hits="21" data-linenumber="102">
+ <span class="hits">21</span>
<code class="ruby"> fail "Invalid argument '#{param}'" if arg.nil?</code>
</li>
- <li class="never" data-hits="" data-linenumber="100">
+ <li class="never" data-hits="" data-linenumber="103">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="17" data-linenumber="101">
- <span class="hits">17</span>
+ <li class="covered" data-hits="18" data-linenumber="104">
+ <span class="hits">18</span>
<code class="ruby"> arg_type = type_for(arg)</code>
</li>
- <li class="covered" data-hits="17" data-linenumber="102">
- <span class="hits">17</span>
+ <li class="covered" data-hits="18" data-linenumber="105">
+ <span class="hits">18</span>
<code class="ruby"> fail "Argument type not found for '#{param}'" if arg_type.nil?</code>
</li>
- <li class="never" data-hits="" data-linenumber="103">
+ <li class="never" data-hits="" data-linenumber="106">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="17" data-linenumber="104">
- <span class="hits">17</span>
+ <li class="covered" data-hits="18" data-linenumber="107">
+ <span class="hits">18</span>
<code class="ruby"> validate_value_for_type(arg_type, value, param)</code>
</li>
- <li class="never" data-hits="" data-linenumber="105">
+ <li class="never" data-hits="" data-linenumber="108">
<code class="ruby"> rescue StandardError => e</code>
</li>
- <li class="covered" data-hits="8" data-linenumber="106">
- <span class="hits">8</span>
+ <li class="covered" data-hits="9" data-linenumber="109">
+ <span class="hits">9</span>
<code class="ruby"> errors << e</code>
</li>
- <li class="never" data-hits="" data-linenumber="107">
+ <li class="never" data-hits="" data-linenumber="110">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="108">
+ <li class="never" data-hits="" data-linenumber="111">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="109">
+ <li class="never" data-hits="" data-linenumber="112">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="110">
+ <li class="never" data-hits="" data-linenumber="113">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="111">
+ <li class="covered" data-hits="1" data-linenumber="114">
<span class="hits">1</span>
<code class="ruby"> def validate_nesting_node(node_type, node)</code>
</li>
- <li class="covered" data-hits="84" data-linenumber="112">
- <span class="hits">84</span>
+ <li class="covered" data-hits="90" data-linenumber="115">
+ <span class="hits">90</span>
<code class="ruby"> fail "Invalid object for node '#{node.__name}'" unless valid_object_node?(node_type, node)</code>
</li>
- <li class="never" data-hits="" data-linenumber="113">
+ <li class="never" data-hits="" data-linenumber="116">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="114">
+ <li class="never" data-hits="" data-linenumber="117">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="115">
+ <li class="covered" data-hits="1" data-linenumber="118">
<span class="hits">1</span>
<code class="ruby"> def valid_object_node?(node_type, node)</code>
</li>
- <li class="covered" data-hits="84" data-linenumber="116">
- <span class="hits">84</span>
+ <li class="covered" data-hits="90" data-linenumber="119">
+ <span class="hits">90</span>
<code class="ruby"> return false if %w[OBJECT INTERFACE].include?(node_type.kind) && node.__nodes.empty?</code>
</li>
- <li class="covered" data-hits="80" data-linenumber="117">
- <span class="hits">80</span>
+ <li class="covered" data-hits="86" data-linenumber="120">
+ <span class="hits">86</span>
<code class="ruby"> true</code>
</li>
- <li class="never" data-hits="" data-linenumber="118">
+ <li class="never" data-hits="" data-linenumber="121">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="119">
+ <li class="never" data-hits="" data-linenumber="122">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="120">
+ <li class="covered" data-hits="1" data-linenumber="123">
<span class="hits">1</span>
<code class="ruby"> def valid_array_node?(node_type, node)</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="121">
+ <li class="missed" data-hits="0" data-linenumber="124">
<code class="ruby"> return false if %w[OBJECT INTERFACE].include?(node_type.kind) && node.__nodes.empty?</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="122">
+ <li class="missed" data-hits="0" data-linenumber="125">
<code class="ruby"> true</code>
</li>
- <li class="never" data-hits="" data-linenumber="123">
+ <li class="never" data-hits="" data-linenumber="126">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="124">
+ <li class="never" data-hits="" data-linenumber="127">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="125">
+ <li class="covered" data-hits="1" data-linenumber="128">
<span class="hits">1</span>
<code class="ruby"> def value_type_error(is_type, should_be, for_arg)</code>
</li>
- <li class="covered" data-hits="6" data-linenumber="126">
+ <li class="covered" data-hits="6" data-linenumber="129">
<span class="hits">6</span>
<code class="ruby"> should_be = should_be.kind == 'ENUM' ? 'Enum' : should_be.name</code>
</li>
- <li class="covered" data-hits="6" data-linenumber="127">
+ <li class="covered" data-hits="6" data-linenumber="130">
<span class="hits">6</span>
<code class="ruby"> additional_message = '. Wrap the value with `__enum`.' if should_be == 'Enum'</code>
</li>
- <li class="never" data-hits="" data-linenumber="128">
+ <li class="never" data-hits="" data-linenumber="131">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="6" data-linenumber="129">
+ <li class="covered" data-hits="6" data-linenumber="132">
<span class="hits">6</span>
<code class="ruby"> fail "Value is '#{is_type}', but should be '#{should_be}' for '#{for_arg}'#{additional_message}"</code>
</li>
- <li class="never" data-hits="" data-linenumber="130">
+ <li class="never" data-hits="" data-linenumber="133">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="131">
+ <li class="never" data-hits="" data-linenumber="134">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="132">
+ <li class="covered" data-hits="1" data-linenumber="135">
<span class="hits">1</span>
<code class="ruby"> def validate_value_for_type(arg_type, value, for_arg)</code>
</li>
- <li class="covered" data-hits="27" data-linenumber="133">
- <span class="hits">27</span>
+ <li class="covered" data-hits="31" data-linenumber="136">
+ <span class="hits">31</span>
<code class="ruby"> case value</code>
</li>
- <li class="never" data-hits="" data-linenumber="134">
+ <li class="never" data-hits="" data-linenumber="137">
<code class="ruby"> when EnumValue</code>
</li>
- <li class="covered" data-hits="2" data-linenumber="135">
+ <li class="covered" data-hits="2" data-linenumber="138">
<span class="hits">2</span>
<code class="ruby"> if arg_type.kind == 'ENUM' && !arg_type.enumValues.map(&:name).include?(value.to_s)</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="136">
+ <li class="missed" data-hits="0" data-linenumber="139">
<code class="ruby"> fail "Invalid value for Enum '#{arg_type.name}' for '#{for_arg}'"</code>
</li>
- <li class="never" data-hits="" data-linenumber="137">
+ <li class="never" data-hits="" data-linenumber="140">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="138">
+ <li class="never" data-hits="" data-linenumber="141">
<code class="ruby"> when ::String</code>
</li>
- <li class="covered" data-hits="12" data-linenumber="139">
- <span class="hits">12</span>
+ <li class="covered" data-hits="15" data-linenumber="142">
+ <span class="hits">15</span>
<code class="ruby"> unless arg_type.name == 'String' || arg_type.name == 'ID'</code>
</li>
- <li class="covered" data-hits="4" data-linenumber="140">
+ <li class="covered" data-hits="4" data-linenumber="143">
<span class="hits">4</span>
<code class="ruby"> value_type_error('String or ID', arg_type, for_arg)</code>
</li>
- <li class="never" data-hits="" data-linenumber="141">
+ <li class="never" data-hits="" data-linenumber="144">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="142">
+ <li class="never" data-hits="" data-linenumber="145">
<code class="ruby"> when ::Integer</code>
</li>
- <li class="covered" data-hits="5" data-linenumber="143">
+ <li class="covered" data-hits="5" data-linenumber="146">
<span class="hits">5</span>
<code class="ruby"> value_type_error('Integer', arg_type, for_arg) unless arg_type.name == 'Int'</code>
</li>
- <li class="never" data-hits="" data-linenumber="144">
+ <li class="never" data-hits="" data-linenumber="147">
<code class="ruby"> when ::Float</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="145">
+ <li class="missed" data-hits="0" data-linenumber="148">
<code class="ruby"> value_type_error('Float', arg_type, for_arg) unless arg_type.name == 'Float'</code>
</li>
- <li class="never" data-hits="" data-linenumber="146">
+ <li class="never" data-hits="" data-linenumber="149">
<code class="ruby"> when ::Hash</code>
</li>
- <li class="covered" data-hits="8" data-linenumber="147">
- <span class="hits">8</span>
+ <li class="covered" data-hits="9" data-linenumber="150">
+ <span class="hits">9</span>
<code class="ruby"> validate_hash_value(arg_type, value, for_arg)</code>
</li>
- <li class="never" data-hits="" data-linenumber="148">
+ <li class="never" data-hits="" data-linenumber="151">
<code class="ruby"> when true, false</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="149">
+ <li class="missed" data-hits="0" data-linenumber="152">
<code class="ruby"> value_type_error('Boolean', arg_type, for_arg) unless arg_type.name == 'Boolean'</code>
</li>
- <li class="never" data-hits="" data-linenumber="150">
+ <li class="never" data-hits="" data-linenumber="153">
<code class="ruby"> else</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="151">
+ <li class="missed" data-hits="0" data-linenumber="154">
<code class="ruby"> value_type_error(value.class.name, arg_type, for_arg)</code>
</li>
- <li class="never" data-hits="" data-linenumber="152">
+ <li class="never" data-hits="" data-linenumber="155">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="153">
+ <li class="never" data-hits="" data-linenumber="156">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="154">
+ <li class="never" data-hits="" data-linenumber="157">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="155">
+ <li class="covered" data-hits="1" data-linenumber="158">
<span class="hits">1</span>
<code class="ruby"> def validate_hash_value(arg_type, value, for_arg)</code>
</li>
- <li class="covered" data-hits="8" data-linenumber="156">
- <span class="hits">8</span>
+ <li class="covered" data-hits="9" data-linenumber="159">
+ <span class="hits">9</span>
<code class="ruby"> value_type_error('Object', arg_type.name, for_arg) unless arg_type.kind == 'INPUT_OBJECT'</code>
</li>
- <li class="never" data-hits="" data-linenumber="157">
+ <li class="never" data-hits="" data-linenumber="160">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="252" data-linenumber="158">
- <span class="hits">252</span>
+ <li class="covered" data-hits="671" data-linenumber="161">
+ <span class="hits">671</span>
<code class="ruby"> type = types.find { |f| f.name == arg_type.name }</code>
</li>
- <li class="covered" data-hits="8" data-linenumber="159">
- <span class="hits">8</span>
+ <li class="covered" data-hits="9" data-linenumber="162">
+ <span class="hits">9</span>
<code class="ruby"> fail "Type not found for '#{arg_type.name}'" if type.nil?</code>
</li>
- <li class="never" data-hits="" data-linenumber="160">
+ <li class="never" data-hits="" data-linenumber="163">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="8" data-linenumber="161">
- <span class="hits">8</span>
+ <li class="covered" data-hits="9" data-linenumber="164">
+ <span class="hits">9</span>
<code class="ruby"> value.each do |k, v|</code>
</li>
- <li class="covered" data-hits="10" data-linenumber="162">
- <span class="hits">10</span>
+ <li class="never" data-hits="" data-linenumber="165">
+
<code class="ruby"> begin</code>
</li>
- <li class="covered" data-hits="119" data-linenumber="163">
- <span class="hits">119</span>
+ <li class="covered" data-hits="128" data-linenumber="166">
+ <span class="hits">128</span>
<code class="ruby"> input_field = type.fetch('inputFields', []).find { |f| f.name == k.to_s }</code>
</li>
- <li class="covered" data-hits="10" data-linenumber="164">
- <span class="hits">10</span>
+ <li class="covered" data-hits="13" data-linenumber="167">
+ <span class="hits">13</span>
<code class="ruby"> fail "Input field definition not found for '#{k}'" if input_field.nil?</code>
</li>
- <li class="never" data-hits="" data-linenumber="165">
+ <li class="never" data-hits="" data-linenumber="168">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="10" data-linenumber="166">
- <span class="hits">10</span>
+ <li class="covered" data-hits="13" data-linenumber="169">
+ <span class="hits">13</span>
<code class="ruby"> input_field_type = type_for(input_field)</code>
</li>
- <li class="covered" data-hits="10" data-linenumber="167">
- <span class="hits">10</span>
+ <li class="covered" data-hits="13" data-linenumber="170">
+ <span class="hits">13</span>
<code class="ruby"> fail "Input field type not found for '#{k}'" if input_field_type.nil?</code>
</li>
- <li class="never" data-hits="" data-linenumber="168">
+ <li class="never" data-hits="" data-linenumber="171">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="10" data-linenumber="169">
- <span class="hits">10</span>
+ <li class="covered" data-hits="13" data-linenumber="172">
+ <span class="hits">13</span>
<code class="ruby"> validate_value_for_type(input_field_type, v, k)</code>
</li>
- <li class="never" data-hits="" data-linenumber="170">
+ <li class="never" data-hits="" data-linenumber="173">
<code class="ruby"> rescue StandardError => e</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="171">
+ <li class="missed" data-hits="0" data-linenumber="174">
<code class="ruby"> errors << e</code>
</li>
- <li class="never" data-hits="" data-linenumber="172">
+ <li class="never" data-hits="" data-linenumber="175">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="173">
+ <li class="never" data-hits="" data-linenumber="176">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="174">
+ <li class="never" data-hits="" data-linenumber="177">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="175">
+ <li class="never" data-hits="" data-linenumber="178">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="176">
+ <li class="covered" data-hits="1" data-linenumber="179">
<span class="hits">1</span>
<code class="ruby"> def type_for(field_type)</code>
</li>
- <li class="covered" data-hits="111" data-linenumber="177">
- <span class="hits">111</span>
+ <li class="covered" data-hits="121" data-linenumber="180">
+ <span class="hits">121</span>
<code class="ruby"> type = case field_type.type.kind</code>
</li>
- <li class="never" data-hits="" data-linenumber="178">
+ <li class="never" data-hits="" data-linenumber="181">
<code class="ruby"> when 'NON_NULL'</code>
</li>
- <li class="covered" data-hits="24" data-linenumber="179">
- <span class="hits">24</span>
+ <li class="covered" data-hits="29" data-linenumber="182">
+ <span class="hits">29</span>
<code class="ruby"> non_null_type(field_type.type.ofType)</code>
</li>
- <li class="never" data-hits="" data-linenumber="180">
+ <li class="never" data-hits="" data-linenumber="183">
<code class="ruby"> when 'LIST'</code>
</li>
- <li class="covered" data-hits="10" data-linenumber="181">
+ <li class="covered" data-hits="10" data-linenumber="184">
<span class="hits">10</span>
<code class="ruby"> field_type.type.ofType</code>
</li>
- <li class="never" data-hits="" data-linenumber="182">
+ <li class="never" data-hits="" data-linenumber="185">
<code class="ruby"> when 'OBJECT', 'INTERFACE', 'INPUT_OBJECT'</code>
</li>
- <li class="covered" data-hits="38" data-linenumber="183">
- <span class="hits">38</span>
+ <li class="covered" data-hits="42" data-linenumber="186">
+ <span class="hits">42</span>
<code class="ruby"> field_type.type</code>
</li>
- <li class="never" data-hits="" data-linenumber="184">
+ <li class="never" data-hits="" data-linenumber="187">
<code class="ruby"> when 'SCALAR'</code>
</li>
- <li class="covered" data-hits="39" data-linenumber="185">
- <span class="hits">39</span>
+ <li class="covered" data-hits="40" data-linenumber="188">
+ <span class="hits">40</span>
<code class="ruby"> field_type.type</code>
</li>
- <li class="never" data-hits="" data-linenumber="186">
+ <li class="never" data-hits="" data-linenumber="189">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="187">
+ <li class="never" data-hits="" data-linenumber="190">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1639" data-linenumber="188">
- <span class="hits">1639</span>
+ <li class="covered" data-hits="2928" data-linenumber="191">
+ <span class="hits">2928</span>
<code class="ruby"> types.find { |t| t.name == type.name }</code>
</li>
- <li class="never" data-hits="" data-linenumber="189">
+ <li class="never" data-hits="" data-linenumber="192">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="190">
+ <li class="never" data-hits="" data-linenumber="193">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="191">
+ <li class="covered" data-hits="1" data-linenumber="194">
<span class="hits">1</span>
<code class="ruby"> def non_null_type(non_null)</code>
</li>
- <li class="covered" data-hits="24" data-linenumber="192">
- <span class="hits">24</span>
+ <li class="covered" data-hits="29" data-linenumber="195">
+ <span class="hits">29</span>
<code class="ruby"> case non_null.kind</code>
</li>
- <li class="never" data-hits="" data-linenumber="193">
+ <li class="never" data-hits="" data-linenumber="196">
<code class="ruby"> when 'LIST'</code>
</li>
- <li class="covered" data-hits="24" data-linenumber="194">
+ <li class="covered" data-hits="24" data-linenumber="197">
<span class="hits">24</span>
<code class="ruby"> non_null.ofType</code>
</li>
- <li class="never" data-hits="" data-linenumber="195">
+ <li class="never" data-hits="" data-linenumber="198">
<code class="ruby"> else</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="196">
+ <li class="covered" data-hits="5" data-linenumber="199">
+ <span class="hits">5</span>
-
<code class="ruby"> non_null</code>
</li>
- <li class="never" data-hits="" data-linenumber="197">
+ <li class="never" data-hits="" data-linenumber="200">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="198">
+ <li class="never" data-hits="" data-linenumber="201">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="199">
+ <li class="never" data-hits="" data-linenumber="202">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="200">
+ <li class="never" data-hits="" data-linenumber="203">
<code class="ruby">end</code>
</li>
@@ -4850,12 +5149,12 @@
<div class="source_table" id="8f4756eb3921bfb6ba841bdb3a8d508fd15e06f8">
<div class="header">
<h3>spec/lib/gqli/dsl_spec.rb</h3>
<h4><span class="green">100.0 %</span> covered</h4>
<div>
- <b>147</b> relevant lines.
- <span class="green"><b>147</b> lines covered</span> and
+ <b>174</b> relevant lines.
+ <span class="green"><b>174</b> lines covered</span> and
<span class="red"><b>0</b> lines missed.</span>
</div>
</div>
<pre>
@@ -4901,12 +5200,12 @@
<span class="hits">1</span>
<code class="ruby">describe GQLi::DSL do</code>
</li>
- <li class="covered" data-hits="16" data-linenumber="8">
- <span class="hits">16</span>
+ <li class="covered" data-hits="18" data-linenumber="8">
+ <span class="hits">18</span>
<code class="ruby"> subject { described_class }</code>
</li>
<li class="never" data-hits="" data-linenumber="9">
@@ -5096,2156 +5395,2576 @@
</li>
<li class="covered" data-hits="1" data-linenumber="40">
<span class="hits">1</span>
- <code class="ruby"> describe '::subscription' do</code>
+ <code class="ruby"> describe '::mutation' do</code>
</li>
<li class="covered" data-hits="1" data-linenumber="41">
<span class="hits">1</span>
- <code class="ruby"> it 'can create a subscription without name' do</code>
+ <code class="ruby"> it 'can create a mutation without name' do</code>
</li>
<li class="covered" data-hits="1" data-linenumber="42">
<span class="hits">1</span>
- <code class="ruby"> subscription = subject.subscription {</code>
+ <code class="ruby"> mutation = subject.mutation {</code>
</li>
<li class="covered" data-hits="1" data-linenumber="43">
<span class="hits">1</span>
+ <code class="ruby"> addFoo(name: 'bar') {</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="44">
+ <span class="hits">1</span>
+
+ <code class="ruby"> name</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="45">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="46">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="47">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="48">
+ <span class="hits">1</span>
+
+ <code class="ruby"> expect(mutation).to be_a GQLi::Mutation</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="49">
+ <span class="hits">1</span>
+
+ <code class="ruby"> expect(mutation.to_gql).to eq <<~GRAPHQL</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="50">
+
+
+ <code class="ruby"> mutation {</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="51">
+
+
+ <code class="ruby"> addFoo(name: "bar") {</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="52">
+
+
+ <code class="ruby"> name</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="53">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="54">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="55">
+
+
+ <code class="ruby"> GRAPHQL</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="56">
+ <span class="hits">1</span>
+
+ <code class="ruby"> expect(mutation.to_gql).to eq mutation.to_s</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="57">
+
+
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="58">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="59">
+ <span class="hits">1</span>
+
+ <code class="ruby"> it 'can create a query with a name' do</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="60">
+ <span class="hits">1</span>
+
+ <code class="ruby"> mutation = subject.mutation('AddFoo') {</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="61">
+ <span class="hits">1</span>
+
+ <code class="ruby"> addFoo(name: 'bar') {</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="62">
+ <span class="hits">1</span>
+
+ <code class="ruby"> name</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="63">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="64">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="65">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="66">
+ <span class="hits">1</span>
+
+ <code class="ruby"> expect(mutation).to be_a GQLi::Mutation</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="67">
+ <span class="hits">1</span>
+
+ <code class="ruby"> expect(mutation.to_gql).to eq <<~GRAPHQL</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="68">
+
+
+ <code class="ruby"> mutation AddFoo {</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="69">
+
+
+ <code class="ruby"> addFoo(name: "bar") {</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="70">
+
+
+ <code class="ruby"> name</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="71">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="72">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="73">
+
+
+ <code class="ruby"> GRAPHQL</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="74">
+
+
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="75">
+
+
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="76">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="77">
+ <span class="hits">1</span>
+
+ <code class="ruby"> describe '::subscription' do</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="78">
+ <span class="hits">1</span>
+
+ <code class="ruby"> it 'can create a subscription without name' do</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="79">
+ <span class="hits">1</span>
+
+ <code class="ruby"> subscription = subject.subscription {</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="80">
+ <span class="hits">1</span>
+
<code class="ruby"> someField</code>
</li>
- <li class="never" data-hits="" data-linenumber="44">
+ <li class="never" data-hits="" data-linenumber="81">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="45">
+ <li class="never" data-hits="" data-linenumber="82">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="46">
+ <li class="covered" data-hits="1" data-linenumber="83">
<span class="hits">1</span>
<code class="ruby"> expect(subscription).to be_a GQLi::Subscription</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="47">
+ <li class="covered" data-hits="1" data-linenumber="84">
<span class="hits">1</span>
<code class="ruby"> expect(subscription.to_gql).to eq <<~GRAPHQL</code>
</li>
- <li class="never" data-hits="" data-linenumber="48">
+ <li class="never" data-hits="" data-linenumber="85">
<code class="ruby"> subscription {</code>
</li>
- <li class="never" data-hits="" data-linenumber="49">
+ <li class="never" data-hits="" data-linenumber="86">
<code class="ruby"> someField</code>
</li>
- <li class="never" data-hits="" data-linenumber="50">
+ <li class="never" data-hits="" data-linenumber="87">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="51">
+ <li class="never" data-hits="" data-linenumber="88">
<code class="ruby"> GRAPHQL</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="52">
+ <li class="covered" data-hits="1" data-linenumber="89">
<span class="hits">1</span>
<code class="ruby"> expect(subscription.to_gql).to eq subscription.to_s</code>
</li>
- <li class="never" data-hits="" data-linenumber="53">
+ <li class="never" data-hits="" data-linenumber="90">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="54">
+ <li class="never" data-hits="" data-linenumber="91">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="55">
+ <li class="covered" data-hits="1" data-linenumber="92">
<span class="hits">1</span>
<code class="ruby"> it 'can create a subscription with a name' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="56">
+ <li class="covered" data-hits="1" data-linenumber="93">
<span class="hits">1</span>
<code class="ruby"> subscription = subject.subscription('FooBar') {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="57">
+ <li class="covered" data-hits="1" data-linenumber="94">
<span class="hits">1</span>
<code class="ruby"> someOtherField</code>
</li>
- <li class="never" data-hits="" data-linenumber="58">
+ <li class="never" data-hits="" data-linenumber="95">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="59">
+ <li class="never" data-hits="" data-linenumber="96">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="60">
+ <li class="covered" data-hits="1" data-linenumber="97">
<span class="hits">1</span>
<code class="ruby"> expect(subscription).to be_a GQLi::Subscription</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="61">
+ <li class="covered" data-hits="1" data-linenumber="98">
<span class="hits">1</span>
<code class="ruby"> expect(subscription.to_gql).to eq <<~GRAPHQL</code>
</li>
- <li class="never" data-hits="" data-linenumber="62">
+ <li class="never" data-hits="" data-linenumber="99">
<code class="ruby"> subscription FooBar {</code>
</li>
- <li class="never" data-hits="" data-linenumber="63">
+ <li class="never" data-hits="" data-linenumber="100">
<code class="ruby"> someOtherField</code>
</li>
- <li class="never" data-hits="" data-linenumber="64">
+ <li class="never" data-hits="" data-linenumber="101">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="65">
+ <li class="never" data-hits="" data-linenumber="102">
<code class="ruby"> GRAPHQL</code>
</li>
- <li class="never" data-hits="" data-linenumber="66">
+ <li class="never" data-hits="" data-linenumber="103">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="67">
+ <li class="never" data-hits="" data-linenumber="104">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="68">
+ <li class="never" data-hits="" data-linenumber="105">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="69">
+ <li class="covered" data-hits="1" data-linenumber="106">
<span class="hits">1</span>
<code class="ruby"> describe '::fragment' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="70">
+ <li class="covered" data-hits="1" data-linenumber="107">
<span class="hits">1</span>
<code class="ruby"> it 'can create a fragment' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="71">
+ <li class="covered" data-hits="1" data-linenumber="108">
<span class="hits">1</span>
<code class="ruby"> fragment = subject.fragment('FooBar', 'Foo') {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="72">
+ <li class="covered" data-hits="1" data-linenumber="109">
<span class="hits">1</span>
<code class="ruby"> someFooField</code>
</li>
- <li class="never" data-hits="" data-linenumber="73">
+ <li class="never" data-hits="" data-linenumber="110">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="74">
+ <li class="never" data-hits="" data-linenumber="111">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="75">
+ <li class="covered" data-hits="1" data-linenumber="112">
<span class="hits">1</span>
<code class="ruby"> expect(fragment).to be_a GQLi::Fragment</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="76">
+ <li class="covered" data-hits="1" data-linenumber="113">
<span class="hits">1</span>
<code class="ruby"> expect(fragment.to_gql).to eq <<~GRAPHQL</code>
</li>
- <li class="never" data-hits="" data-linenumber="77">
+ <li class="never" data-hits="" data-linenumber="114">
<code class="ruby"> fragment FooBar on Foo {</code>
</li>
- <li class="never" data-hits="" data-linenumber="78">
+ <li class="never" data-hits="" data-linenumber="115">
<code class="ruby"> someFooField</code>
</li>
- <li class="never" data-hits="" data-linenumber="79">
+ <li class="never" data-hits="" data-linenumber="116">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="80">
+ <li class="never" data-hits="" data-linenumber="117">
<code class="ruby"> GRAPHQL</code>
</li>
- <li class="never" data-hits="" data-linenumber="81">
+ <li class="never" data-hits="" data-linenumber="118">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="82">
+ <li class="never" data-hits="" data-linenumber="119">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="83">
+ <li class="never" data-hits="" data-linenumber="120">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="84">
+ <li class="covered" data-hits="1" data-linenumber="121">
<span class="hits">1</span>
<code class="ruby"> describe '::enum' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="85">
+ <li class="covered" data-hits="1" data-linenumber="122">
<span class="hits">1</span>
<code class="ruby"> it 'can create an enum value' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="86">
+ <li class="covered" data-hits="1" data-linenumber="123">
<span class="hits">1</span>
<code class="ruby"> enum_value = subject.enum('foo')</code>
</li>
- <li class="never" data-hits="" data-linenumber="87">
+ <li class="never" data-hits="" data-linenumber="124">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="88">
+ <li class="covered" data-hits="1" data-linenumber="125">
<span class="hits">1</span>
<code class="ruby"> expect(enum_value).to be_a GQLi::EnumValue</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="89">
+ <li class="covered" data-hits="1" data-linenumber="126">
<span class="hits">1</span>
<code class="ruby"> expect(enum_value.to_s).to eq 'foo'</code>
</li>
- <li class="never" data-hits="" data-linenumber="90">
+ <li class="never" data-hits="" data-linenumber="127">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="91">
+ <li class="never" data-hits="" data-linenumber="128">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="92">
+ <li class="never" data-hits="" data-linenumber="129">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="93">
+ <li class="never" data-hits="" data-linenumber="130">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="94">
+ <li class="covered" data-hits="1" data-linenumber="131">
<span class="hits">1</span>
<code class="ruby"> describe 'instance level methods' do</code>
</li>
- <li class="covered" data-hits="5" data-linenumber="95">
- <span class="hits">5</span>
+ <li class="covered" data-hits="9" data-linenumber="132">
+ <span class="hits">9</span>
<code class="ruby"> subject { MockGQLInterface.new }</code>
</li>
- <li class="never" data-hits="" data-linenumber="96">
+ <li class="never" data-hits="" data-linenumber="133">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="97">
+ <li class="covered" data-hits="1" data-linenumber="134">
<span class="hits">1</span>
<code class="ruby"> describe '#query does the same as ::query' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="98">
+ <li class="covered" data-hits="1" data-linenumber="135">
<span class="hits">1</span>
<code class="ruby"> it 'can create a query without name' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="99">
+ <li class="covered" data-hits="1" data-linenumber="136">
<span class="hits">1</span>
<code class="ruby"> query = subject.query {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="100">
+ <li class="covered" data-hits="1" data-linenumber="137">
<span class="hits">1</span>
<code class="ruby"> someField</code>
</li>
- <li class="never" data-hits="" data-linenumber="101">
+ <li class="never" data-hits="" data-linenumber="138">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="102">
+ <li class="never" data-hits="" data-linenumber="139">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="103">
+ <li class="covered" data-hits="1" data-linenumber="140">
<span class="hits">1</span>
<code class="ruby"> expect(query).to be_a GQLi::Query</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="104">
+ <li class="covered" data-hits="1" data-linenumber="141">
<span class="hits">1</span>
<code class="ruby"> expect(query.to_gql).to eq <<~GRAPHQL</code>
</li>
- <li class="never" data-hits="" data-linenumber="105">
+ <li class="never" data-hits="" data-linenumber="142">
<code class="ruby"> query {</code>
</li>
- <li class="never" data-hits="" data-linenumber="106">
+ <li class="never" data-hits="" data-linenumber="143">
<code class="ruby"> someField</code>
</li>
- <li class="never" data-hits="" data-linenumber="107">
+ <li class="never" data-hits="" data-linenumber="144">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="108">
+ <li class="never" data-hits="" data-linenumber="145">
<code class="ruby"> GRAPHQL</code>
</li>
- <li class="never" data-hits="" data-linenumber="109">
+ <li class="never" data-hits="" data-linenumber="146">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="110">
+ <li class="never" data-hits="" data-linenumber="147">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="111">
+ <li class="covered" data-hits="1" data-linenumber="148">
<span class="hits">1</span>
<code class="ruby"> it 'can create a query with a name' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="112">
+ <li class="covered" data-hits="1" data-linenumber="149">
<span class="hits">1</span>
<code class="ruby"> query = subject.query('FooBar') {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="113">
+ <li class="covered" data-hits="1" data-linenumber="150">
<span class="hits">1</span>
<code class="ruby"> someOtherField</code>
</li>
- <li class="never" data-hits="" data-linenumber="114">
+ <li class="never" data-hits="" data-linenumber="151">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="115">
+ <li class="never" data-hits="" data-linenumber="152">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="116">
+ <li class="covered" data-hits="1" data-linenumber="153">
<span class="hits">1</span>
<code class="ruby"> expect(query).to be_a GQLi::Query</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="117">
+ <li class="covered" data-hits="1" data-linenumber="154">
<span class="hits">1</span>
<code class="ruby"> expect(query.to_gql).to eq <<~GRAPHQL</code>
</li>
- <li class="never" data-hits="" data-linenumber="118">
+ <li class="never" data-hits="" data-linenumber="155">
<code class="ruby"> query FooBar {</code>
</li>
- <li class="never" data-hits="" data-linenumber="119">
+ <li class="never" data-hits="" data-linenumber="156">
<code class="ruby"> someOtherField</code>
</li>
- <li class="never" data-hits="" data-linenumber="120">
+ <li class="never" data-hits="" data-linenumber="157">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="121">
+ <li class="never" data-hits="" data-linenumber="158">
<code class="ruby"> GRAPHQL</code>
</li>
- <li class="never" data-hits="" data-linenumber="122">
+ <li class="never" data-hits="" data-linenumber="159">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="123">
+ <li class="never" data-hits="" data-linenumber="160">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="124">
+ <li class="never" data-hits="" data-linenumber="161">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="125">
+ <li class="covered" data-hits="1" data-linenumber="162">
+ <span class="hits">1</span>
+ <code class="ruby"> describe '#mutation does the same as ::mutation' do</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="163">
+ <span class="hits">1</span>
+ <code class="ruby"> it 'can create a mutation without name' do</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="164">
+ <span class="hits">1</span>
+
+ <code class="ruby"> mutation = subject.mutation {</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="165">
+ <span class="hits">1</span>
+
+ <code class="ruby"> addFoo(name: 'bar') {</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="166">
+ <span class="hits">1</span>
+
+ <code class="ruby"> name</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="167">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="168">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="169">
+
+
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="126">
+ <li class="covered" data-hits="1" data-linenumber="170">
<span class="hits">1</span>
- <code class="ruby"> describe '#subscription does the same as ::subscription' do</code>
+ <code class="ruby"> expect(mutation).to be_a GQLi::Mutation</code>
</li>
- <li class="never" data-hits="" data-linenumber="127">
+ <li class="covered" data-hits="1" data-linenumber="171">
+ <span class="hits">1</span>
+ <code class="ruby"> expect(mutation.to_gql).to eq <<~GRAPHQL</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="172">
+
+ <code class="ruby"> mutation {</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="173">
+
+
+ <code class="ruby"> addFoo(name: "bar") {</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="174">
+
+
+ <code class="ruby"> name</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="175">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="176">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="177">
+
+
+ <code class="ruby"> GRAPHQL</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="178">
+ <span class="hits">1</span>
+
+ <code class="ruby"> expect(mutation.to_gql).to eq mutation.to_s</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="179">
+
+
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="180">
+
+
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="3" data-linenumber="128">
- <span class="hits">3</span>
+ <li class="covered" data-hits="1" data-linenumber="181">
+ <span class="hits">1</span>
- <code class="ruby"> subject { MockGQLInterface.new }</code>
+ <code class="ruby"> it 'can create a query with a name' do</code>
</li>
- <li class="never" data-hits="" data-linenumber="129">
+ <li class="covered" data-hits="1" data-linenumber="182">
+ <span class="hits">1</span>
+ <code class="ruby"> mutation = subject.mutation('AddFoo') {</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="183">
+ <span class="hits">1</span>
+ <code class="ruby"> addFoo(name: 'bar') {</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="184">
+ <span class="hits">1</span>
+
+ <code class="ruby"> name</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="185">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="186">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="187">
+
+
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="130">
+ <li class="covered" data-hits="1" data-linenumber="188">
<span class="hits">1</span>
+ <code class="ruby"> expect(mutation).to be_a GQLi::Mutation</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="189">
+ <span class="hits">1</span>
+
+ <code class="ruby"> expect(mutation.to_gql).to eq <<~GRAPHQL</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="190">
+
+
+ <code class="ruby"> mutation AddFoo {</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="191">
+
+
+ <code class="ruby"> addFoo(name: "bar") {</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="192">
+
+
+ <code class="ruby"> name</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="193">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="194">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="195">
+
+
+ <code class="ruby"> GRAPHQL</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="196">
+
+
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="197">
+
+
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="198">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="199">
+ <span class="hits">1</span>
+
+ <code class="ruby"> describe '#subscription does the same as ::subscription' do</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="200">
+ <span class="hits">1</span>
+
<code class="ruby"> it 'can create a subscription without name' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="131">
+ <li class="covered" data-hits="1" data-linenumber="201">
<span class="hits">1</span>
<code class="ruby"> subscription = subject.subscription {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="132">
+ <li class="covered" data-hits="1" data-linenumber="202">
<span class="hits">1</span>
<code class="ruby"> someField</code>
</li>
- <li class="never" data-hits="" data-linenumber="133">
+ <li class="never" data-hits="" data-linenumber="203">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="134">
+ <li class="never" data-hits="" data-linenumber="204">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="135">
+ <li class="covered" data-hits="1" data-linenumber="205">
<span class="hits">1</span>
<code class="ruby"> expect(subscription).to be_a GQLi::Subscription</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="136">
+ <li class="covered" data-hits="1" data-linenumber="206">
<span class="hits">1</span>
<code class="ruby"> expect(subscription.to_gql).to eq <<~GRAPHQL</code>
</li>
- <li class="never" data-hits="" data-linenumber="137">
+ <li class="never" data-hits="" data-linenumber="207">
<code class="ruby"> subscription {</code>
</li>
- <li class="never" data-hits="" data-linenumber="138">
+ <li class="never" data-hits="" data-linenumber="208">
<code class="ruby"> someField</code>
</li>
- <li class="never" data-hits="" data-linenumber="139">
+ <li class="never" data-hits="" data-linenumber="209">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="140">
+ <li class="never" data-hits="" data-linenumber="210">
<code class="ruby"> GRAPHQL</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="141">
+ <li class="covered" data-hits="1" data-linenumber="211">
<span class="hits">1</span>
<code class="ruby"> expect(subscription.to_gql).to eq subscription.to_s</code>
</li>
- <li class="never" data-hits="" data-linenumber="142">
+ <li class="never" data-hits="" data-linenumber="212">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="143">
+ <li class="never" data-hits="" data-linenumber="213">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="144">
+ <li class="covered" data-hits="1" data-linenumber="214">
<span class="hits">1</span>
<code class="ruby"> it 'can create a subscription with a name' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="145">
+ <li class="covered" data-hits="1" data-linenumber="215">
<span class="hits">1</span>
<code class="ruby"> subscription = subject.subscription('FooBar') {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="146">
+ <li class="covered" data-hits="1" data-linenumber="216">
<span class="hits">1</span>
<code class="ruby"> someOtherField</code>
</li>
- <li class="never" data-hits="" data-linenumber="147">
+ <li class="never" data-hits="" data-linenumber="217">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="148">
+ <li class="never" data-hits="" data-linenumber="218">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="149">
+ <li class="covered" data-hits="1" data-linenumber="219">
<span class="hits">1</span>
<code class="ruby"> expect(subscription).to be_a GQLi::Subscription</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="150">
+ <li class="covered" data-hits="1" data-linenumber="220">
<span class="hits">1</span>
<code class="ruby"> expect(subscription.to_gql).to eq <<~GRAPHQL</code>
</li>
- <li class="never" data-hits="" data-linenumber="151">
+ <li class="never" data-hits="" data-linenumber="221">
<code class="ruby"> subscription FooBar {</code>
</li>
- <li class="never" data-hits="" data-linenumber="152">
+ <li class="never" data-hits="" data-linenumber="222">
<code class="ruby"> someOtherField</code>
</li>
- <li class="never" data-hits="" data-linenumber="153">
+ <li class="never" data-hits="" data-linenumber="223">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="154">
+ <li class="never" data-hits="" data-linenumber="224">
<code class="ruby"> GRAPHQL</code>
</li>
- <li class="never" data-hits="" data-linenumber="155">
+ <li class="never" data-hits="" data-linenumber="225">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="156">
+ <li class="never" data-hits="" data-linenumber="226">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="157">
+ <li class="never" data-hits="" data-linenumber="227">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="158">
+ <li class="covered" data-hits="1" data-linenumber="228">
<span class="hits">1</span>
<code class="ruby"> describe '#fragment does the same as ::fragment' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="159">
+ <li class="covered" data-hits="1" data-linenumber="229">
<span class="hits">1</span>
<code class="ruby"> it 'can create a fragment' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="160">
+ <li class="covered" data-hits="1" data-linenumber="230">
<span class="hits">1</span>
<code class="ruby"> fragment = subject.fragment('FooBar', 'Foo') {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="161">
+ <li class="covered" data-hits="1" data-linenumber="231">
<span class="hits">1</span>
<code class="ruby"> someFooField</code>
</li>
- <li class="never" data-hits="" data-linenumber="162">
+ <li class="never" data-hits="" data-linenumber="232">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="163">
+ <li class="never" data-hits="" data-linenumber="233">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="164">
+ <li class="covered" data-hits="1" data-linenumber="234">
<span class="hits">1</span>
<code class="ruby"> expect(fragment).to be_a GQLi::Fragment</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="165">
+ <li class="covered" data-hits="1" data-linenumber="235">
<span class="hits">1</span>
<code class="ruby"> expect(fragment.to_gql).to eq <<~GRAPHQL</code>
</li>
- <li class="never" data-hits="" data-linenumber="166">
+ <li class="never" data-hits="" data-linenumber="236">
<code class="ruby"> fragment FooBar on Foo {</code>
</li>
- <li class="never" data-hits="" data-linenumber="167">
+ <li class="never" data-hits="" data-linenumber="237">
<code class="ruby"> someFooField</code>
</li>
- <li class="never" data-hits="" data-linenumber="168">
+ <li class="never" data-hits="" data-linenumber="238">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="169">
+ <li class="never" data-hits="" data-linenumber="239">
<code class="ruby"> GRAPHQL</code>
</li>
- <li class="never" data-hits="" data-linenumber="170">
+ <li class="never" data-hits="" data-linenumber="240">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="171">
+ <li class="never" data-hits="" data-linenumber="241">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="172">
+ <li class="never" data-hits="" data-linenumber="242">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="173">
+ <li class="covered" data-hits="1" data-linenumber="243">
<span class="hits">1</span>
<code class="ruby"> describe '#enum does the same as ::enum' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="174">
+ <li class="covered" data-hits="1" data-linenumber="244">
<span class="hits">1</span>
<code class="ruby"> it 'can create an enum value' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="175">
+ <li class="covered" data-hits="1" data-linenumber="245">
<span class="hits">1</span>
<code class="ruby"> enum_value = subject.enum('foo')</code>
</li>
- <li class="never" data-hits="" data-linenumber="176">
+ <li class="never" data-hits="" data-linenumber="246">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="177">
+ <li class="covered" data-hits="1" data-linenumber="247">
<span class="hits">1</span>
<code class="ruby"> expect(enum_value).to be_a GQLi::EnumValue</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="178">
+ <li class="covered" data-hits="1" data-linenumber="248">
<span class="hits">1</span>
<code class="ruby"> expect(enum_value.to_s).to eq 'foo'</code>
</li>
- <li class="never" data-hits="" data-linenumber="179">
+ <li class="never" data-hits="" data-linenumber="249">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="180">
+ <li class="never" data-hits="" data-linenumber="250">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="181">
+ <li class="never" data-hits="" data-linenumber="251">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="182">
+ <li class="never" data-hits="" data-linenumber="252">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="183">
+ <li class="covered" data-hits="1" data-linenumber="253">
<span class="hits">1</span>
<code class="ruby"> describe 'node DSL' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="184">
+ <li class="covered" data-hits="1" data-linenumber="254">
<span class="hits">1</span>
<code class="ruby"> it 'nodes can have arguments' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="185">
+ <li class="covered" data-hits="1" data-linenumber="255">
<span class="hits">1</span>
<code class="ruby"> query = subject.query {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="186">
+ <li class="covered" data-hits="1" data-linenumber="256">
<span class="hits">1</span>
<code class="ruby"> someNode(arg1: 100)</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="187">
+ <li class="covered" data-hits="1" data-linenumber="257">
<span class="hits">1</span>
<code class="ruby"> otherNode(arg2: 'some_string')</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="188">
+ <li class="covered" data-hits="1" data-linenumber="258">
<span class="hits">1</span>
<code class="ruby"> moreNodes(arg3: { nestedArg: [1, 2] })</code>
</li>
- <li class="never" data-hits="" data-linenumber="189">
+ <li class="never" data-hits="" data-linenumber="259">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="190">
+ <li class="never" data-hits="" data-linenumber="260">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="191">
+ <li class="covered" data-hits="1" data-linenumber="261">
<span class="hits">1</span>
<code class="ruby"> expect(query.to_gql).to eq <<~GRAPHQL</code>
</li>
- <li class="never" data-hits="" data-linenumber="192">
+ <li class="never" data-hits="" data-linenumber="262">
<code class="ruby"> query {</code>
</li>
- <li class="never" data-hits="" data-linenumber="193">
+ <li class="never" data-hits="" data-linenumber="263">
<code class="ruby"> someNode(arg1: 100)</code>
</li>
- <li class="never" data-hits="" data-linenumber="194">
+ <li class="never" data-hits="" data-linenumber="264">
<code class="ruby"> otherNode(arg2: "some_string")</code>
</li>
- <li class="never" data-hits="" data-linenumber="195">
+ <li class="never" data-hits="" data-linenumber="265">
<code class="ruby"> moreNodes(arg3: {nestedArg: [1, 2]})</code>
</li>
- <li class="never" data-hits="" data-linenumber="196">
+ <li class="never" data-hits="" data-linenumber="266">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="197">
+ <li class="never" data-hits="" data-linenumber="267">
<code class="ruby"> GRAPHQL</code>
</li>
- <li class="never" data-hits="" data-linenumber="198">
+ <li class="never" data-hits="" data-linenumber="268">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="199">
+ <li class="never" data-hits="" data-linenumber="269">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="200">
+ <li class="covered" data-hits="1" data-linenumber="270">
<span class="hits">1</span>
<code class="ruby"> it 'nodes can have aliases' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="201">
+ <li class="covered" data-hits="1" data-linenumber="271">
<span class="hits">1</span>
<code class="ruby"> query = subject.query {</code>
</li>
- <li class="never" data-hits="" data-linenumber="202">
+ <li class="covered" data-hits="1" data-linenumber="272">
+ <span class="hits">1</span>
-
<code class="ruby"> __node('pinned: catCollection', where: {</code>
</li>
- <li class="never" data-hits="" data-linenumber="203">
+ <li class="never" data-hits="" data-linenumber="273">
<code class="ruby"> sys: { id_in: 'nyancat' }</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="204">
- <span class="hits">1</span>
+ <li class="never" data-hits="" data-linenumber="274">
+
<code class="ruby"> }) {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="205">
+ <li class="covered" data-hits="1" data-linenumber="275">
<span class="hits">1</span>
<code class="ruby"> items {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="206">
+ <li class="covered" data-hits="1" data-linenumber="276">
<span class="hits">1</span>
<code class="ruby"> name</code>
</li>
- <li class="never" data-hits="" data-linenumber="207">
+ <li class="never" data-hits="" data-linenumber="277">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="208">
+ <li class="never" data-hits="" data-linenumber="278">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="209">
+ <li class="covered" data-hits="1" data-linenumber="279">
+ <span class="hits">1</span>
-
<code class="ruby"> __node('unpinned: catCollection', where: {</code>
</li>
- <li class="never" data-hits="" data-linenumber="210">
+ <li class="never" data-hits="" data-linenumber="280">
<code class="ruby"> sys: { id_not_in: 'nyancat' }</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="211">
- <span class="hits">1</span>
+ <li class="never" data-hits="" data-linenumber="281">
+
<code class="ruby"> }, limit: 4) {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="212">
+ <li class="covered" data-hits="1" data-linenumber="282">
<span class="hits">1</span>
<code class="ruby"> items {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="213">
+ <li class="covered" data-hits="1" data-linenumber="283">
<span class="hits">1</span>
<code class="ruby"> name</code>
</li>
- <li class="never" data-hits="" data-linenumber="214">
+ <li class="never" data-hits="" data-linenumber="284">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="215">
+ <li class="never" data-hits="" data-linenumber="285">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="216">
+ <li class="never" data-hits="" data-linenumber="286">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="217">
+ <li class="never" data-hits="" data-linenumber="287">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="218">
+ <li class="covered" data-hits="1" data-linenumber="288">
<span class="hits">1</span>
<code class="ruby"> expect(query.to_gql).to eq <<~GRAPHQL</code>
</li>
- <li class="never" data-hits="" data-linenumber="219">
+ <li class="never" data-hits="" data-linenumber="289">
<code class="ruby"> query {</code>
</li>
- <li class="never" data-hits="" data-linenumber="220">
+ <li class="never" data-hits="" data-linenumber="290">
<code class="ruby"> pinned: catCollection(where: {sys: {id_in: "nyancat"}}) {</code>
</li>
- <li class="never" data-hits="" data-linenumber="221">
+ <li class="never" data-hits="" data-linenumber="291">
<code class="ruby"> items {</code>
</li>
- <li class="never" data-hits="" data-linenumber="222">
+ <li class="never" data-hits="" data-linenumber="292">
<code class="ruby"> name</code>
</li>
- <li class="never" data-hits="" data-linenumber="223">
+ <li class="never" data-hits="" data-linenumber="293">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="224">
+ <li class="never" data-hits="" data-linenumber="294">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="225">
+ <li class="never" data-hits="" data-linenumber="295">
<code class="ruby"> unpinned: catCollection(where: {sys: {id_not_in: "nyancat"}}, limit: 4) {</code>
</li>
- <li class="never" data-hits="" data-linenumber="226">
+ <li class="never" data-hits="" data-linenumber="296">
<code class="ruby"> items {</code>
</li>
- <li class="never" data-hits="" data-linenumber="227">
+ <li class="never" data-hits="" data-linenumber="297">
<code class="ruby"> name</code>
</li>
- <li class="never" data-hits="" data-linenumber="228">
+ <li class="never" data-hits="" data-linenumber="298">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="229">
+ <li class="never" data-hits="" data-linenumber="299">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="230">
+ <li class="never" data-hits="" data-linenumber="300">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="231">
+ <li class="never" data-hits="" data-linenumber="301">
<code class="ruby"> GRAPHQL</code>
</li>
- <li class="never" data-hits="" data-linenumber="232">
+ <li class="never" data-hits="" data-linenumber="302">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="233">
+ <li class="never" data-hits="" data-linenumber="303">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="234">
+ <li class="covered" data-hits="1" data-linenumber="304">
<span class="hits">1</span>
<code class="ruby"> it 'nodes can have directives' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="235">
+ <li class="covered" data-hits="1" data-linenumber="305">
<span class="hits">1</span>
<code class="ruby"> query = subject.query {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="236">
+ <li class="covered" data-hits="1" data-linenumber="306">
<span class="hits">1</span>
<code class="ruby"> someNode(:@include => { if: true })</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="237">
+ <li class="covered" data-hits="1" data-linenumber="307">
<span class="hits">1</span>
<code class="ruby"> otherNode(:@skip => { if: false })</code>
</li>
- <li class="never" data-hits="" data-linenumber="238">
+ <li class="never" data-hits="" data-linenumber="308">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="239">
+ <li class="never" data-hits="" data-linenumber="309">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="240">
+ <li class="covered" data-hits="1" data-linenumber="310">
<span class="hits">1</span>
<code class="ruby"> expect(query.to_gql).to eq <<~GRAPHQL</code>
</li>
- <li class="never" data-hits="" data-linenumber="241">
+ <li class="never" data-hits="" data-linenumber="311">
<code class="ruby"> query {</code>
</li>
- <li class="never" data-hits="" data-linenumber="242">
+ <li class="never" data-hits="" data-linenumber="312">
<code class="ruby"> someNode @include(if: true)</code>
</li>
- <li class="never" data-hits="" data-linenumber="243">
+ <li class="never" data-hits="" data-linenumber="313">
<code class="ruby"> otherNode @skip(if: false)</code>
</li>
- <li class="never" data-hits="" data-linenumber="244">
+ <li class="never" data-hits="" data-linenumber="314">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="245">
+ <li class="never" data-hits="" data-linenumber="315">
<code class="ruby"> GRAPHQL</code>
</li>
- <li class="never" data-hits="" data-linenumber="246">
+ <li class="never" data-hits="" data-linenumber="316">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="247">
+ <li class="never" data-hits="" data-linenumber="317">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="248">
+ <li class="covered" data-hits="1" data-linenumber="318">
<span class="hits">1</span>
<code class="ruby"> it 'nodes can have arbitrarily nested nodes' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="249">
+ <li class="covered" data-hits="1" data-linenumber="319">
<span class="hits">1</span>
<code class="ruby"> query = subject.query {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="250">
+ <li class="covered" data-hits="1" data-linenumber="320">
<span class="hits">1</span>
<code class="ruby"> aNode {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="251">
+ <li class="covered" data-hits="1" data-linenumber="321">
<span class="hits">1</span>
<code class="ruby"> withChild {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="252">
+ <li class="covered" data-hits="1" data-linenumber="322">
<span class="hits">1</span>
<code class="ruby"> moreChildren</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="253">
+ <li class="covered" data-hits="1" data-linenumber="323">
<span class="hits">1</span>
<code class="ruby"> andASibiling(someParameterHere: 'just for fun') {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="254">
+ <li class="covered" data-hits="1" data-linenumber="324">
<span class="hits">1</span>
<code class="ruby"> withEvenMore</code>
</li>
- <li class="never" data-hits="" data-linenumber="255">
+ <li class="never" data-hits="" data-linenumber="325">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="256">
+ <li class="never" data-hits="" data-linenumber="326">
<code class="ruby"> }</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="257">
+ <li class="covered" data-hits="1" data-linenumber="327">
<span class="hits">1</span>
<code class="ruby"> alsoASibiling</code>
</li>
- <li class="never" data-hits="" data-linenumber="258">
+ <li class="never" data-hits="" data-linenumber="328">
<code class="ruby"> }</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="259">
+ <li class="covered" data-hits="1" data-linenumber="329">
<span class="hits">1</span>
<code class="ruby"> withoutChild</code>
</li>
- <li class="never" data-hits="" data-linenumber="260">
+ <li class="never" data-hits="" data-linenumber="330">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="261">
+ <li class="never" data-hits="" data-linenumber="331">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="262">
+ <li class="covered" data-hits="1" data-linenumber="332">
<span class="hits">1</span>
<code class="ruby"> expect(query.to_gql).to eq <<~GRAPHQL</code>
</li>
- <li class="never" data-hits="" data-linenumber="263">
+ <li class="never" data-hits="" data-linenumber="333">
<code class="ruby"> query {</code>
</li>
- <li class="never" data-hits="" data-linenumber="264">
+ <li class="never" data-hits="" data-linenumber="334">
<code class="ruby"> aNode {</code>
</li>
- <li class="never" data-hits="" data-linenumber="265">
+ <li class="never" data-hits="" data-linenumber="335">
<code class="ruby"> withChild {</code>
</li>
- <li class="never" data-hits="" data-linenumber="266">
+ <li class="never" data-hits="" data-linenumber="336">
<code class="ruby"> moreChildren</code>
</li>
- <li class="never" data-hits="" data-linenumber="267">
+ <li class="never" data-hits="" data-linenumber="337">
<code class="ruby"> andASibiling(someParameterHere: "just for fun") {</code>
</li>
- <li class="never" data-hits="" data-linenumber="268">
+ <li class="never" data-hits="" data-linenumber="338">
<code class="ruby"> withEvenMore</code>
</li>
- <li class="never" data-hits="" data-linenumber="269">
+ <li class="never" data-hits="" data-linenumber="339">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="270">
+ <li class="never" data-hits="" data-linenumber="340">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="271">
+ <li class="never" data-hits="" data-linenumber="341">
<code class="ruby"> alsoASibiling</code>
</li>
- <li class="never" data-hits="" data-linenumber="272">
+ <li class="never" data-hits="" data-linenumber="342">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="273">
+ <li class="never" data-hits="" data-linenumber="343">
<code class="ruby"> withoutChild</code>
</li>
- <li class="never" data-hits="" data-linenumber="274">
+ <li class="never" data-hits="" data-linenumber="344">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="275">
+ <li class="never" data-hits="" data-linenumber="345">
<code class="ruby"> GRAPHQL</code>
</li>
- <li class="never" data-hits="" data-linenumber="276">
+ <li class="never" data-hits="" data-linenumber="346">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="277">
+ <li class="never" data-hits="" data-linenumber="347">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="278">
+ <li class="covered" data-hits="1" data-linenumber="348">
<span class="hits">1</span>
<code class="ruby"> it 'queries can have inlined fragments at any level' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="279">
+ <li class="covered" data-hits="1" data-linenumber="349">
<span class="hits">1</span>
<code class="ruby"> NameFragment = subject.fragment('NameFragment', 'Foo') {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="280">
+ <li class="covered" data-hits="1" data-linenumber="350">
<span class="hits">1</span>
<code class="ruby"> name</code>
</li>
- <li class="never" data-hits="" data-linenumber="281">
+ <li class="never" data-hits="" data-linenumber="351">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="282">
+ <li class="never" data-hits="" data-linenumber="352">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="283">
+ <li class="covered" data-hits="1" data-linenumber="353">
<span class="hits">1</span>
<code class="ruby"> AgeFragment = subject.fragment('AgeFragment', 'Foo') {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="284">
+ <li class="covered" data-hits="1" data-linenumber="354">
<span class="hits">1</span>
<code class="ruby"> age</code>
</li>
- <li class="never" data-hits="" data-linenumber="285">
+ <li class="never" data-hits="" data-linenumber="355">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="286">
+ <li class="never" data-hits="" data-linenumber="356">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="287">
+ <li class="covered" data-hits="1" data-linenumber="357">
<span class="hits">1</span>
<code class="ruby"> query = subject.query {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="288">
+ <li class="covered" data-hits="1" data-linenumber="358">
<span class="hits">1</span>
<code class="ruby"> peopleCollection {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="289">
+ <li class="covered" data-hits="1" data-linenumber="359">
<span class="hits">1</span>
<code class="ruby"> ___ NameFragment</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="290">
+ <li class="covered" data-hits="1" data-linenumber="360">
<span class="hits">1</span>
<code class="ruby"> ___ AgeFragment</code>
</li>
- <li class="never" data-hits="" data-linenumber="291">
+ <li class="never" data-hits="" data-linenumber="361">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="292">
+ <li class="never" data-hits="" data-linenumber="362">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="293">
+ <li class="never" data-hits="" data-linenumber="363">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="294">
+ <li class="covered" data-hits="1" data-linenumber="364">
<span class="hits">1</span>
<code class="ruby"> expect(query.to_gql).to eq <<~GRAPHQL</code>
</li>
- <li class="never" data-hits="" data-linenumber="295">
+ <li class="never" data-hits="" data-linenumber="365">
<code class="ruby"> query {</code>
</li>
- <li class="never" data-hits="" data-linenumber="296">
+ <li class="never" data-hits="" data-linenumber="366">
<code class="ruby"> peopleCollection {</code>
</li>
- <li class="never" data-hits="" data-linenumber="297">
+ <li class="never" data-hits="" data-linenumber="367">
<code class="ruby"> name</code>
</li>
- <li class="never" data-hits="" data-linenumber="298">
+ <li class="never" data-hits="" data-linenumber="368">
<code class="ruby"> age</code>
</li>
- <li class="never" data-hits="" data-linenumber="299">
+ <li class="never" data-hits="" data-linenumber="369">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="300">
+ <li class="never" data-hits="" data-linenumber="370">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="301">
+ <li class="never" data-hits="" data-linenumber="371">
<code class="ruby"> GRAPHQL</code>
</li>
- <li class="never" data-hits="" data-linenumber="302">
+ <li class="never" data-hits="" data-linenumber="372">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="303">
+ <li class="never" data-hits="" data-linenumber="373">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="304">
+ <li class="covered" data-hits="1" data-linenumber="374">
<span class="hits">1</span>
<code class="ruby"> it 'queries can have type matchers' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="305">
+ <li class="covered" data-hits="1" data-linenumber="375">
<span class="hits">1</span>
<code class="ruby"> query = subject.query {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="306">
+ <li class="covered" data-hits="1" data-linenumber="376">
<span class="hits">1</span>
<code class="ruby"> catCollection {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="307">
+ <li class="covered" data-hits="1" data-linenumber="377">
<span class="hits">1</span>
<code class="ruby"> items {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="308">
+ <li class="covered" data-hits="1" data-linenumber="378">
<span class="hits">1</span>
<code class="ruby"> name</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="309">
+ <li class="covered" data-hits="1" data-linenumber="379">
<span class="hits">1</span>
<code class="ruby"> bestFriend {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="310">
+ <li class="covered" data-hits="1" data-linenumber="380">
<span class="hits">1</span>
<code class="ruby"> __on('Cat') {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="311">
+ <li class="covered" data-hits="1" data-linenumber="381">
<span class="hits">1</span>
<code class="ruby"> name</code>
</li>
- <li class="never" data-hits="" data-linenumber="312">
+ <li class="never" data-hits="" data-linenumber="382">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="313">
+ <li class="never" data-hits="" data-linenumber="383">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="314">
+ <li class="never" data-hits="" data-linenumber="384">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="315">
+ <li class="never" data-hits="" data-linenumber="385">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="316">
+ <li class="never" data-hits="" data-linenumber="386">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="317">
+ <li class="never" data-hits="" data-linenumber="387">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="318">
+ <li class="covered" data-hits="1" data-linenumber="388">
<span class="hits">1</span>
<code class="ruby"> expect(query.to_gql).to eq <<~GRAPHQL</code>
</li>
- <li class="never" data-hits="" data-linenumber="319">
+ <li class="never" data-hits="" data-linenumber="389">
<code class="ruby"> query {</code>
</li>
- <li class="never" data-hits="" data-linenumber="320">
+ <li class="never" data-hits="" data-linenumber="390">
<code class="ruby"> catCollection {</code>
</li>
- <li class="never" data-hits="" data-linenumber="321">
+ <li class="never" data-hits="" data-linenumber="391">
<code class="ruby"> items {</code>
</li>
- <li class="never" data-hits="" data-linenumber="322">
+ <li class="never" data-hits="" data-linenumber="392">
<code class="ruby"> name</code>
</li>
- <li class="never" data-hits="" data-linenumber="323">
+ <li class="never" data-hits="" data-linenumber="393">
<code class="ruby"> bestFriend {</code>
</li>
- <li class="never" data-hits="" data-linenumber="324">
+ <li class="never" data-hits="" data-linenumber="394">
<code class="ruby"> ... on Cat {</code>
</li>
- <li class="never" data-hits="" data-linenumber="325">
+ <li class="never" data-hits="" data-linenumber="395">
<code class="ruby"> name</code>
</li>
- <li class="never" data-hits="" data-linenumber="326">
+ <li class="never" data-hits="" data-linenumber="396">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="327">
+ <li class="never" data-hits="" data-linenumber="397">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="328">
+ <li class="never" data-hits="" data-linenumber="398">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="329">
+ <li class="never" data-hits="" data-linenumber="399">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="330">
+ <li class="never" data-hits="" data-linenumber="400">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="331">
+ <li class="never" data-hits="" data-linenumber="401">
<code class="ruby"> GRAPHQL</code>
</li>
- <li class="never" data-hits="" data-linenumber="332">
+ <li class="never" data-hits="" data-linenumber="402">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="333">
+ <li class="never" data-hits="" data-linenumber="403">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="334">
+ <li class="covered" data-hits="1" data-linenumber="404">
<span class="hits">1</span>
<code class="ruby"> it 'can use __node to define nodes that would collide otherwise' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="335">
+ <li class="covered" data-hits="1" data-linenumber="405">
<span class="hits">1</span>
<code class="ruby"> query = subject.query {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="336">
+ <li class="covered" data-hits="1" data-linenumber="406">
<span class="hits">1</span>
<code class="ruby"> catCollection {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="337">
+ <li class="covered" data-hits="1" data-linenumber="407">
<span class="hits">1</span>
<code class="ruby"> items {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="338">
+ <li class="covered" data-hits="1" data-linenumber="408">
<span class="hits">1</span>
<code class="ruby"> sys {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="339">
+ <li class="covered" data-hits="1" data-linenumber="409">
<span class="hits">1</span>
<code class="ruby"> __node('id')</code>
</li>
- <li class="never" data-hits="" data-linenumber="340">
+ <li class="never" data-hits="" data-linenumber="410">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="341">
+ <li class="never" data-hits="" data-linenumber="411">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="342">
+ <li class="never" data-hits="" data-linenumber="412">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="343">
+ <li class="never" data-hits="" data-linenumber="413">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="344">
+ <li class="never" data-hits="" data-linenumber="414">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="345">
+ <li class="covered" data-hits="1" data-linenumber="415">
<span class="hits">1</span>
<code class="ruby"> expect(query.to_gql).to eq <<~GRAPHQL</code>
</li>
- <li class="never" data-hits="" data-linenumber="346">
+ <li class="never" data-hits="" data-linenumber="416">
<code class="ruby"> query {</code>
</li>
- <li class="never" data-hits="" data-linenumber="347">
+ <li class="never" data-hits="" data-linenumber="417">
<code class="ruby"> catCollection {</code>
</li>
- <li class="never" data-hits="" data-linenumber="348">
+ <li class="never" data-hits="" data-linenumber="418">
<code class="ruby"> items {</code>
</li>
- <li class="never" data-hits="" data-linenumber="349">
+ <li class="never" data-hits="" data-linenumber="419">
<code class="ruby"> sys {</code>
</li>
- <li class="never" data-hits="" data-linenumber="350">
+ <li class="never" data-hits="" data-linenumber="420">
<code class="ruby"> id</code>
</li>
- <li class="never" data-hits="" data-linenumber="351">
+ <li class="never" data-hits="" data-linenumber="421">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="352">
+ <li class="never" data-hits="" data-linenumber="422">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="353">
+ <li class="never" data-hits="" data-linenumber="423">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="354">
+ <li class="never" data-hits="" data-linenumber="424">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="355">
+ <li class="never" data-hits="" data-linenumber="425">
<code class="ruby"> GRAPHQL</code>
</li>
- <li class="never" data-hits="" data-linenumber="356">
+ <li class="never" data-hits="" data-linenumber="426">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="357">
+ <li class="never" data-hits="" data-linenumber="427">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="358">
+ <li class="covered" data-hits="1" data-linenumber="428">
<span class="hits">1</span>
<code class="ruby"> it '__node can receive arguments and children nodes' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="359">
+ <li class="covered" data-hits="1" data-linenumber="429">
<span class="hits">1</span>
<code class="ruby"> query = subject.query {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="360">
+ <li class="covered" data-hits="1" data-linenumber="430">
<span class="hits">1</span>
<code class="ruby"> __node('catCollection', limit: 1) {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="361">
+ <li class="covered" data-hits="1" data-linenumber="431">
<span class="hits">1</span>
<code class="ruby"> items {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="362">
+ <li class="covered" data-hits="1" data-linenumber="432">
<span class="hits">1</span>
<code class="ruby"> name</code>
</li>
- <li class="never" data-hits="" data-linenumber="363">
+ <li class="never" data-hits="" data-linenumber="433">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="364">
+ <li class="never" data-hits="" data-linenumber="434">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="365">
+ <li class="never" data-hits="" data-linenumber="435">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="366">
+ <li class="never" data-hits="" data-linenumber="436">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="367">
+ <li class="covered" data-hits="1" data-linenumber="437">
<span class="hits">1</span>
<code class="ruby"> expect(query.to_gql).to eq <<~GRAPHQL</code>
</li>
- <li class="never" data-hits="" data-linenumber="368">
+ <li class="never" data-hits="" data-linenumber="438">
<code class="ruby"> query {</code>
</li>
- <li class="never" data-hits="" data-linenumber="369">
+ <li class="never" data-hits="" data-linenumber="439">
<code class="ruby"> catCollection(limit: 1) {</code>
</li>
- <li class="never" data-hits="" data-linenumber="370">
+ <li class="never" data-hits="" data-linenumber="440">
<code class="ruby"> items {</code>
</li>
- <li class="never" data-hits="" data-linenumber="371">
+ <li class="never" data-hits="" data-linenumber="441">
<code class="ruby"> name</code>
</li>
- <li class="never" data-hits="" data-linenumber="372">
+ <li class="never" data-hits="" data-linenumber="442">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="373">
+ <li class="never" data-hits="" data-linenumber="443">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="374">
+ <li class="never" data-hits="" data-linenumber="444">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="375">
+ <li class="never" data-hits="" data-linenumber="445">
<code class="ruby"> GRAPHQL</code>
</li>
- <li class="never" data-hits="" data-linenumber="376">
+ <li class="never" data-hits="" data-linenumber="446">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="377">
+ <li class="never" data-hits="" data-linenumber="447">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="378">
+ <li class="covered" data-hits="1" data-linenumber="448">
<span class="hits">1</span>
<code class="ruby"> it '__enum can create EnumType values' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="379">
+ <li class="covered" data-hits="1" data-linenumber="449">
<span class="hits">1</span>
<code class="ruby"> query = subject.query {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="380">
+ <li class="covered" data-hits="1" data-linenumber="450">
<span class="hits">1</span>
<code class="ruby"> catCollection(order: __enum('lives_ASC')) {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="381">
+ <li class="covered" data-hits="1" data-linenumber="451">
<span class="hits">1</span>
<code class="ruby"> items {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="382">
+ <li class="covered" data-hits="1" data-linenumber="452">
<span class="hits">1</span>
<code class="ruby"> name</code>
</li>
- <li class="never" data-hits="" data-linenumber="383">
+ <li class="never" data-hits="" data-linenumber="453">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="384">
+ <li class="never" data-hits="" data-linenumber="454">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="385">
+ <li class="never" data-hits="" data-linenumber="455">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="386">
+ <li class="never" data-hits="" data-linenumber="456">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="387">
+ <li class="covered" data-hits="1" data-linenumber="457">
<span class="hits">1</span>
<code class="ruby"> expect(query.to_gql).to eq <<~GRAPHQL</code>
</li>
- <li class="never" data-hits="" data-linenumber="388">
+ <li class="never" data-hits="" data-linenumber="458">
<code class="ruby"> query {</code>
</li>
- <li class="never" data-hits="" data-linenumber="389">
+ <li class="never" data-hits="" data-linenumber="459">
<code class="ruby"> catCollection(order: lives_ASC) {</code>
</li>
- <li class="never" data-hits="" data-linenumber="390">
+ <li class="never" data-hits="" data-linenumber="460">
<code class="ruby"> items {</code>
</li>
- <li class="never" data-hits="" data-linenumber="391">
+ <li class="never" data-hits="" data-linenumber="461">
<code class="ruby"> name</code>
</li>
- <li class="never" data-hits="" data-linenumber="392">
+ <li class="never" data-hits="" data-linenumber="462">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="393">
+ <li class="never" data-hits="" data-linenumber="463">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="394">
+ <li class="never" data-hits="" data-linenumber="464">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="395">
+ <li class="never" data-hits="" data-linenumber="465">
<code class="ruby"> GRAPHQL</code>
</li>
- <li class="never" data-hits="" data-linenumber="396">
+ <li class="never" data-hits="" data-linenumber="466">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="397">
+ <li class="never" data-hits="" data-linenumber="467">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="398">
+ <li class="never" data-hits="" data-linenumber="468">
<code class="ruby">end</code>
</li>
@@ -7257,12 +7976,12 @@
<div class="source_table" id="a6d1c1911a021a8ab76d6b8afd1ba662a68cd017">
<div class="header">
<h3>spec/lib/gqli/introspection_spec.rb</h3>
<h4><span class="green">100.0 %</span> covered</h4>
<div>
- <b>186</b> relevant lines.
- <span class="green"><b>186</b> lines covered</span> and
+ <b>215</b> relevant lines.
+ <span class="green"><b>215</b> lines covered</span> and
<span class="red"><b>0</b> lines missed.</span>
</div>
</div>
<pre>
@@ -7284,12 +8003,12 @@
<span class="hits">1</span>
<code class="ruby">describe GQLi::Introspection do</code>
</li>
- <li class="covered" data-hits="19" data-linenumber="4">
- <span class="hits">19</span>
+ <li class="covered" data-hits="22" data-linenumber="4">
+ <span class="hits">22</span>
<code class="ruby"> let(:dsl) { GQLi::DSL }</code>
</li>
<li class="covered" data-hits="1" data-linenumber="5">
@@ -7338,12 +8057,12 @@
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="20" data-linenumber="13">
- <span class="hits">20</span>
+ <li class="covered" data-hits="23" data-linenumber="13">
+ <span class="hits">23</span>
<code class="ruby"> subject { client.schema }</code>
</li>
<li class="never" data-hits="" data-linenumber="14">
@@ -7416,13 +8135,13 @@
<span class="hits">1</span>
<code class="ruby"> query = dsl.query {</code>
</li>
- <li class="never" data-hits="" data-linenumber="26">
+ <li class="covered" data-hits="1" data-linenumber="26">
+ <span class="hits">1</span>
-
<code class="ruby"> catCollection(</code>
</li>
<li class="never" data-hits="" data-linenumber="27">
@@ -7470,13 +8189,13 @@
<code class="ruby"> }</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="35">
- <span class="hits">1</span>
+ <li class="never" data-hits="" data-linenumber="35">
+
<code class="ruby"> ) {</code>
</li>
<li class="covered" data-hits="1" data-linenumber="36">
<span class="hits">1</span>
@@ -8526,25 +9245,25 @@
<span class="hits">1</span>
<code class="ruby"> query = dsl.query {</code>
</li>
- <li class="never" data-hits="" data-linenumber="211">
+ <li class="covered" data-hits="1" data-linenumber="211">
+ <span class="hits">1</span>
-
<code class="ruby"> __node('pinned: catCollection', where: {</code>
</li>
<li class="never" data-hits="" data-linenumber="212">
<code class="ruby"> sys: { id_in: 'nyancat' }</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="213">
- <span class="hits">1</span>
+ <li class="never" data-hits="" data-linenumber="213">
+
<code class="ruby"> }) {</code>
</li>
<li class="covered" data-hits="1" data-linenumber="214">
<span class="hits">1</span>
@@ -8568,25 +9287,25 @@
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="218">
+ <li class="covered" data-hits="1" data-linenumber="218">
+ <span class="hits">1</span>
-
<code class="ruby"> __node('unpinned: catCollection', where: {</code>
</li>
<li class="never" data-hits="" data-linenumber="219">
<code class="ruby"> sys: { id_not_in: 'nyancat' }</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="220">
- <span class="hits">1</span>
+ <li class="never" data-hits="" data-linenumber="220">
+
<code class="ruby"> }, limit: 4) {</code>
</li>
<li class="covered" data-hits="1" data-linenumber="221">
<span class="hits">1</span>
@@ -9213,13 +9932,337 @@
</li>
<li class="never" data-hits="" data-linenumber="325">
+ <code class="ruby"></code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="326">
+ <span class="hits">1</span>
+
+ <code class="ruby"> describe 'mutations' do</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="327">
+ <span class="hits">1</span>
+
+ <code class="ruby"> let(:client) {</code>
+ </li>
+
+ <li class="covered" data-hits="3" data-linenumber="328">
+ <span class="hits">3</span>
+
+ <code class="ruby"> vcr('mutation_client') {</code>
+ </li>
+
+ <li class="covered" data-hits="3" data-linenumber="329">
+ <span class="hits">3</span>
+
+ <code class="ruby"> GQLi::Github.create(ENV.fetch('GITHUB_READ_ONLY', '<ACCESS_TOKEN>'))</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="330">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="331">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="332">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="333">
+ <span class="hits">1</span>
+
+ <code class="ruby"> it 'fails for unknown mutation' do</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="334">
+ <span class="hits">1</span>
+
+ <code class="ruby"> mutation = dsl.mutation {</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="335">
+ <span class="hits">1</span>
+
+ <code class="ruby"> foo(bar: 'baz') {</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="336">
+ <span class="hits">1</span>
+
+ <code class="ruby"> bar</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="337">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="338">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="339">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="340">
+ <span class="hits">1</span>
+
+ <code class="ruby"> validation = subject.validate(mutation)</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="341">
+ <span class="hits">1</span>
+
+ <code class="ruby"> expect(validation.valid?).to be_falsey</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="342">
+ <span class="hits">1</span>
+
+ <code class="ruby"> expect(validation.errors).not_to be_empty</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="343">
+ <span class="hits">1</span>
+
+ <code class="ruby"> expect(validation.errors.map(&:to_s)).to include("Node type not found for 'foo'")</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="344">
+
+
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="345">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="346">
+ <span class="hits">1</span>
+
+ <code class="ruby"> it 'fails for unknown arguments' do</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="347">
+ <span class="hits">1</span>
+
+ <code class="ruby"> mutation = dsl.mutation {</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="348">
+ <span class="hits">1</span>
+
+ <code class="ruby"> addComment(foo: 'bar') {</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="349">
+ <span class="hits">1</span>
+
+ <code class="ruby"> subject {</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="350">
+ <span class="hits">1</span>
+
+ <code class="ruby"> id</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="351">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="352">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="353">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="354">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="355">
+ <span class="hits">1</span>
+
+ <code class="ruby"> validation = subject.validate(mutation)</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="356">
+ <span class="hits">1</span>
+
+ <code class="ruby"> expect(validation.valid?).to be_falsey</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="357">
+ <span class="hits">1</span>
+
+ <code class="ruby"> expect(validation.errors).not_to be_empty</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="358">
+ <span class="hits">1</span>
+
+ <code class="ruby"> expect(validation.errors.map(&:to_s)).to include("Invalid argument 'foo'")</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="359">
+
+
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="360">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="361">
+ <span class="hits">1</span>
+
+ <code class="ruby"> it 'true for valid mutation' do</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="362">
+ <span class="hits">1</span>
+
+ <code class="ruby"> mutation = dsl.mutation {</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="363">
+ <span class="hits">1</span>
+
+ <code class="ruby"> addComment(input: {</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="364">
+
+
+ <code class="ruby"> subjectId: 'some subject id',</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="365">
+
+
+ <code class="ruby"> body: 'some subject',</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="366">
+
+
+ <code class="ruby"> clientMutationId: 'some identifier'</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="367">
+
+
+ <code class="ruby"> }) {</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="368">
+ <span class="hits">1</span>
+
+ <code class="ruby"> subject {</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="369">
+ <span class="hits">1</span>
+
+ <code class="ruby"> id</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="370">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="371">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="372">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="373">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="374">
+ <span class="hits">1</span>
+
+ <code class="ruby"> validation = subject.validate(mutation)</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="375">
+ <span class="hits">1</span>
+
+ <code class="ruby"> expect(validation.valid?).to be_truthy</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="376">
+ <span class="hits">1</span>
+
+ <code class="ruby"> expect(validation.errors).to be_empty</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="377">
+
+
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="378">
+
+
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="379">
+
+
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="326">
+ <li class="never" data-hits="" data-linenumber="380">
<code class="ruby">end</code>
</li>