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 +4 -4
- data/lib/graphql_schema.rb +8 -8
- data/lib/graphql_schema/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 97547e740c444ed9e293f4031694a757954b1f5cabf10d45e1e9556fc189703e
|
|
4
|
+
data.tar.gz: 41ac5410e992209a7ed3be88c3065c8df7846763242c214bd8cb2b5bcfdab4c9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b385a964e26cd64164013105f656134ac1e75328a3c4ed3fe9766506207ea68e983907c8cf4f72ec6cab09ec926eee61c4e9ef047bab279ee68ccdda7e873d35
|
|
7
|
+
data.tar.gz: cd5e3fd60261be4036845dfd936b8b7654c0e84c06ad51183cf9d4633dfa4d775a8663e7c546e1234777a8c6c0752f59d64bdf0ae5d1f627be5a7a75b370286c
|
data/lib/graphql_schema.rb
CHANGED
|
@@ -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
|
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.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-
|
|
11
|
+
date: 2021-06-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: graphql
|