graphql_schema 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f3e56a0c9eb93c9fcdc99f4b87e5db347198ad77
4
- data.tar.gz: c4b4bcd8072212a439bb4e55ec83afb9bbb404dc
3
+ metadata.gz: 9fd3c609042cc05f7e1d32726e4d4e50944fba1e
4
+ data.tar.gz: 4f3322f899081e0a3deb40cc6412bf26d21eff2c
5
5
  SHA512:
6
- metadata.gz: 48f91847a4fe4f55dc2fa3902a1aa166c9404e6cebed235423f8f3878d65bf2db3f10a7f10d1ba7dad0ac79c420332f7d53cd9aa7356b4d4ba109db7b74ea83f
7
- data.tar.gz: 13992c891f1205c229a9099647f5f250360a5e9cc25dcca4c3e1852d302e44ae9a7ddcaa0f36632dee57ccfb00d6c34cddd6ff13853f5482128cefb87a400401
6
+ metadata.gz: 4467b78a0b844a3ac196989e35665a20e0fab3fdaf306d0225fb04a4e4f7bffb80ca1ab5fc2e4a67cbbf810487489066fc990cc0ae222323b019287740da42e8
7
+ data.tar.gz: b44832ef14dd35905557be8f0f3a2454ff258c70825e70cb61a556a25356c3145f1a574b9c0f1f424f8a523348fed6fce3208b91c7eb53de9e5384428dd33709
@@ -179,6 +179,10 @@ class GraphQLSchema
179
179
  @of_type ||= TypeDeclaration.new(@hash.fetch('ofType'))
180
180
  end
181
181
 
182
+ def list?
183
+ kind == 'LIST'
184
+ end
185
+
182
186
  def non_null?
183
187
  kind == 'NON_NULL'
184
188
  end
@@ -192,6 +196,10 @@ class GraphQLSchema
192
196
  end
193
197
  end
194
198
 
199
+ def unwrap_list
200
+ list? ? of_type.unwrap_list : self
201
+ end
202
+
195
203
  def unwrap_non_null
196
204
  non_null? ? of_type.unwrap_non_null : self
197
205
  end
@@ -1,3 +1,3 @@
1
1
  class GraphQLSchema
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql_schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dylan Thacker-Smith
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-21 00:00:00.000000000 Z
11
+ date: 2017-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphql