graphql_schema 0.1.7 → 0.1.8

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
  SHA256:
3
- metadata.gz: 6bb27ea8446623bec1c7ab56efe9255026f0b9038d75197c171da7420daf3d0a
4
- data.tar.gz: d2fc1659a41b311cc8aa40f576b7f0a429fd7c16f2d2dadd43526d4e0457a64a
3
+ metadata.gz: 97547e740c444ed9e293f4031694a757954b1f5cabf10d45e1e9556fc189703e
4
+ data.tar.gz: 41ac5410e992209a7ed3be88c3065c8df7846763242c214bd8cb2b5bcfdab4c9
5
5
  SHA512:
6
- metadata.gz: aacedad3fabab90e55d4023c43e026b783f8176059deb21408fb6555d76a8b10a956d03a2398f02ea094a0fd34466fcebe20f5d0d38e2c184e0effecd076fa98
7
- data.tar.gz: da7e757dd0fdf7236fa8380127ec4f1d418fc59a66e9438cca9fb09d3a52b6110804513f51bd9d7039440b750a197b0a892e92b255b0f9811dbc2628f5cbc47c
6
+ metadata.gz: b385a964e26cd64164013105f656134ac1e75328a3c4ed3fe9766506207ea68e983907c8cf4f72ec6cab09ec926eee61c4e9ef047bab279ee68ccdda7e873d35
7
+ data.tar.gz: cd5e3fd60261be4036845dfd936b8b7654c0e84c06ad51183cf9d4633dfa4d775a8663e7c546e1234777a8c6c0752f59d64bdf0ae5d1f627be5a7a75b370286c
@@ -38,6 +38,14 @@ class GraphQLSchema
38
38
  def args
39
39
  @args ||= @hash.fetch('args').map{ |arg_hash| InputValue.new(arg_hash) }
40
40
  end
41
+
42
+ def required_args
43
+ @required_args ||= args.select{ |arg| arg.type.non_null? }
44
+ end
45
+
46
+ def optional_args
47
+ @optional_args ||= args.reject{ |arg| arg.type.non_null? }
48
+ end
41
49
  end
42
50
 
43
51
  module NamedHash
@@ -111,14 +119,6 @@ class GraphQLSchema
111
119
  @hash = field_hash
112
120
  end
113
121
 
114
- def required_args
115
- @required_args ||= args.select{ |arg| arg.type.non_null? }
116
- end
117
-
118
- def optional_args
119
- @optional_args ||= args.reject{ |arg| arg.type.non_null? }
120
- end
121
-
122
122
  def type
123
123
  @type ||= TypeDeclaration.new(@hash.fetch('type'))
124
124
  end
@@ -1,3 +1,3 @@
1
1
  class GraphQLSchema
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
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.7
4
+ version: 0.1.8
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: 2021-05-18 00:00:00.000000000 Z
11
+ date: 2021-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphql