graphql_schema 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/graphql_schema.rb +6 -1
- data/lib/graphql_schema/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5bfa3a0670d8de22e60d7c06fd082ab9f3f8ee5f
|
4
|
+
data.tar.gz: 288dc6465191002e3e0d30add5f85b23442cd586
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d1565d897649f8e67fbcb99fc63c94e886259f0f6ee063cba7b12e2b26e45fcc3dd86a983c479ab483de7d67e7f09ad9279ab658a27f5ed5d9c3827cf210273
|
7
|
+
data.tar.gz: 732f8f6c18a8fa4767d1379956b956c7e9510725de1d722254d3d5e858aca33e056d61171cf4662a66340f78f0fe5c21c5ee551d9117529fe5e033b53d6eece6
|
data/lib/graphql_schema.rb
CHANGED
@@ -49,6 +49,10 @@ class GraphQLSchema
|
|
49
49
|
@hash.fetch('description')
|
50
50
|
end
|
51
51
|
|
52
|
+
def to_h
|
53
|
+
@hash
|
54
|
+
end
|
55
|
+
|
52
56
|
private
|
53
57
|
|
54
58
|
def split_name
|
@@ -200,12 +204,13 @@ class GraphQLSchema
|
|
200
204
|
|
201
205
|
class TypeDefinition < Type
|
202
206
|
def fields(include_deprecated: false)
|
207
|
+
return unless @hash.fetch('fields')
|
203
208
|
@fields ||= @hash.fetch('fields').map{ |field_hash| Field.new(field_hash) }
|
204
209
|
include_deprecated ? @fields : @fields.reject(&:deprecated?)
|
205
210
|
end
|
206
211
|
|
207
212
|
def input_fields
|
208
|
-
@input_fields ||= @hash.fetch('inputFields').map{ |field_hash| InputValue.new(field_hash) }
|
213
|
+
@input_fields ||= @hash.fetch('inputFields').map{ |field_hash| InputValue.new(field_hash) }.sort_by(&:name)
|
209
214
|
end
|
210
215
|
|
211
216
|
def required_input_fields
|
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.
|
4
|
+
version: 0.1.3
|
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-02-
|
11
|
+
date: 2017-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: graphql
|