graphql 0.15.2 → 0.15.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/enum_type.rb +1 -1
- data/lib/graphql/language/parser.rb +85 -79
- data/lib/graphql/schema/rescue_middleware.rb +1 -1
- data/lib/graphql/version.rb +1 -1
- data/readme.md +11 -7
- 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: 8a448fdb0e6f68de9172e04ff16c5bcfe5844f5e
|
4
|
+
data.tar.gz: 02b41b4bedeb44c838fc9d895ac70633c19e617e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5663e57b70cc3b3b3e93cdbde3a3b9e14dfa42cff4d2554b47f60187ffb0bba138c5ed8f94bc7a4f84ddc7a6afaff3423a6931aea8946b4e4c823b9024f9d8f2
|
7
|
+
data.tar.gz: 8f65610a1923187c03a52847352ba66ed227094569b8191e8be7238a1ec578860756652195d1d27edb5e07c0bb17c3a273835a111259c65fcee7663706b722ac
|
data/lib/graphql/enum_type.rb
CHANGED
@@ -83,7 +83,7 @@ module GraphQL
|
|
83
83
|
#
|
84
84
|
# Created with {EnumType#value}
|
85
85
|
class EnumValue
|
86
|
-
|
86
|
+
attr_accessor :name, :description, :deprecation_reason, :value
|
87
87
|
def initialize(name:, description:, deprecation_reason:, value:)
|
88
88
|
@name = name
|
89
89
|
@description = description
|
@@ -75,76 +75,82 @@ end
|
|
75
75
|
##### State transition tables begin ###
|
76
76
|
|
77
77
|
racc_action_table = [
|
78
|
-
24, 25, 26,
|
78
|
+
24, 25, 26, 111, 43, 46, 112, 42, 76, 24,
|
79
79
|
25, 26, 39, 19, 20, 21, 22, 23, 24, 25,
|
80
|
-
26,
|
81
|
-
27, 19, 20, 21, 22, 23, 24, 25, 26,
|
82
|
-
34, 68, 54,
|
83
|
-
20, 21, 22, 23,
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
24, 25, 26,
|
88
|
-
|
89
|
-
25, 26,
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
21, 22, 23,
|
95
|
-
22, 23,
|
96
|
-
|
97
|
-
|
98
|
-
nil,
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
nil,
|
103
|
-
|
104
|
-
nil,
|
80
|
+
26, 43, 34, 20, 21, 22, 23, 111, 46, 120,
|
81
|
+
27, 19, 20, 21, 22, 23, 24, 25, 26, 46,
|
82
|
+
34, 68, 54, 80, 50, 24, 25, 26, 43, 48,
|
83
|
+
20, 21, 22, 23, 12, 12, 12, 46, 19, 20,
|
84
|
+
21, 22, 23, 24, 25, 26, 12, 38, 24, 25,
|
85
|
+
26, 100, 46, 36, 12, 46, 19, 20, 21, 22,
|
86
|
+
23, 19, 20, 21, 22, 23, 24, 25, 26, 12,
|
87
|
+
14, 24, 25, 26, 118, 54, 46, 46, 106, 19,
|
88
|
+
20, 21, 22, 23, 19, 20, 21, 22, 23, 24,
|
89
|
+
25, 26, nil, nil, nil, nil, nil, nil, nil, 24,
|
90
|
+
25, 26, 19, 20, 21, 22, 23, 100, 24, 25,
|
91
|
+
26, nil, 19, 20, 21, 22, 23, nil, nil, nil,
|
92
|
+
116, 19, 20, 21, 22, 23, 24, 25, 26, nil,
|
93
|
+
74, 24, 25, 26, nil, nil, 24, 25, 26, 19,
|
94
|
+
20, 21, 22, 23, 19, 20, 21, 22, 23, 19,
|
95
|
+
20, 21, 22, 23, 24, 25, 26, nil, nil, 24,
|
96
|
+
25, 26, nil, 57, nil, nil, nil, 19, 20, 21,
|
97
|
+
22, 23, 19, 20, 21, 22, 23, 9, 10, 11,
|
98
|
+
nil, nil, nil, nil, 92, nil, nil, 93, 12, nil,
|
99
|
+
94, nil, 13, 95, nil, 86, 87, 83, 84, 85,
|
100
|
+
92, nil, nil, 93, 103, nil, 94, nil, nil, 95,
|
101
|
+
nil, 86, 87, 83, 84, 85, 92, nil, nil, 93,
|
102
|
+
nil, nil, 94, nil, nil, 95, nil, 86, 87, 83,
|
103
|
+
84, 85, 92, nil, nil, 93, 114, nil, 94, nil,
|
104
|
+
nil, 95, nil, 86, 87, 83, 84, 85, 9, 10,
|
105
|
+
11, nil, nil, nil, nil, 92, nil, nil, 93, 12,
|
106
|
+
nil, 94, nil, 13, 95, nil, 86, 87, 83, 84,
|
107
|
+
85 ]
|
105
108
|
|
106
109
|
racc_action_check = [
|
107
|
-
28, 28, 28, 33,
|
110
|
+
28, 28, 28, 98, 33, 73, 98, 33, 60, 50,
|
108
111
|
50, 50, 28, 28, 28, 28, 28, 28, 12, 12,
|
109
|
-
12,
|
110
|
-
12, 12, 12, 12, 12, 12, 34, 34, 34,
|
111
|
-
12, 52, 52,
|
112
|
-
34, 34, 34, 34,
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
nil,
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
nil,
|
132
|
-
|
133
|
-
nil,
|
112
|
+
12, 62, 28, 50, 50, 50, 50, 113, 64, 113,
|
113
|
+
12, 12, 12, 12, 12, 12, 34, 34, 34, 66,
|
114
|
+
12, 52, 52, 70, 35, 54, 54, 54, 56, 34,
|
115
|
+
34, 34, 34, 34, 78, 79, 55, 34, 54, 54,
|
116
|
+
54, 54, 54, 100, 100, 100, 81, 16, 13, 13,
|
117
|
+
13, 100, 44, 14, 51, 37, 100, 100, 100, 100,
|
118
|
+
100, 13, 13, 13, 13, 13, 94, 94, 94, 49,
|
119
|
+
1, 92, 92, 92, 109, 38, 47, 41, 94, 94,
|
120
|
+
94, 94, 94, 94, 92, 92, 92, 92, 92, 7,
|
121
|
+
7, 7, nil, nil, nil, nil, nil, nil, nil, 80,
|
122
|
+
80, 80, 7, 7, 7, 7, 7, 80, 107, 107,
|
123
|
+
107, nil, 80, 80, 80, 80, 80, nil, nil, nil,
|
124
|
+
107, 107, 107, 107, 107, 107, 58, 58, 58, nil,
|
125
|
+
58, 48, 48, 48, nil, nil, 46, 46, 46, 58,
|
126
|
+
58, 58, 58, 58, 48, 48, 48, 48, 48, 46,
|
127
|
+
46, 46, 46, 46, 42, 42, 42, nil, nil, 43,
|
128
|
+
43, 43, nil, 43, nil, nil, nil, 42, 42, 42,
|
129
|
+
42, 42, 43, 43, 43, 43, 43, 0, 0, 0,
|
130
|
+
nil, nil, nil, nil, 118, nil, nil, 118, 0, nil,
|
131
|
+
118, nil, 0, 118, nil, 118, 118, 118, 118, 118,
|
132
|
+
93, nil, nil, 93, 93, nil, 93, nil, nil, 93,
|
133
|
+
nil, 93, 93, 93, 93, 93, 112, nil, nil, 112,
|
134
|
+
nil, nil, 112, nil, nil, 112, nil, 112, 112, 112,
|
135
|
+
112, 112, 104, nil, nil, 104, 104, nil, 104, nil,
|
136
|
+
nil, 104, nil, 104, 104, 104, 104, 104, 3, 3,
|
137
|
+
3, nil, nil, nil, nil, 76, nil, nil, 76, 3,
|
138
|
+
nil, 76, nil, 3, 76, nil, 76, 76, 76, 76,
|
139
|
+
76 ]
|
134
140
|
|
135
141
|
racc_action_pointer = [
|
136
|
-
|
137
|
-
nil, nil, 16,
|
142
|
+
195, 90, nil, 266, nil, nil, nil, 107, nil, nil,
|
143
|
+
nil, nil, 16, 66, 73, nil, 62, nil, nil, nil,
|
138
144
|
nil, nil, nil, nil, nil, nil, nil, nil, -2, nil,
|
139
|
-
nil, nil, nil, -
|
140
|
-
nil,
|
141
|
-
7,
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
nil, nil,
|
146
|
-
|
147
|
-
nil, nil,
|
145
|
+
nil, nil, nil, -1, 34, 29, nil, 52, 88, nil,
|
146
|
+
nil, 74, 172, 177, 49, nil, 154, 73, 149, 76,
|
147
|
+
7, 61, 35, nil, 43, 43, 43, nil, 144, nil,
|
148
|
+
0, nil, 16, nil, 5, nil, 16, nil, nil, nil,
|
149
|
+
35, nil, nil, -18, nil, nil, 268, nil, 41, 42,
|
150
|
+
117, 53, nil, nil, nil, nil, nil, nil, nil, nil,
|
151
|
+
nil, nil, 89, 213, 84, nil, nil, nil, -6, nil,
|
152
|
+
61, nil, nil, nil, 245, nil, nil, 126, nil, 86,
|
153
|
+
nil, nil, 229, 18, nil, nil, nil, nil, 197, nil,
|
148
154
|
nil, nil ]
|
149
155
|
|
150
156
|
racc_action_default = [
|
@@ -163,12 +169,12 @@ racc_action_default = [
|
|
163
169
|
-21, -68 ]
|
164
170
|
|
165
171
|
racc_goto_table = [
|
166
|
-
17, 82, 65,
|
167
|
-
49,
|
168
|
-
|
169
|
-
|
170
|
-
78, 64, 79, 121, 77, 108,
|
171
|
-
4, 60,
|
172
|
+
17, 82, 65, 47, 67, 98, 35, 72, 71, 59,
|
173
|
+
49, 29, 53, 51, 110, 41, 28, 55, 105, 66,
|
174
|
+
52, 37, 16, 63, 75, 113, 69, 40, 1, 115,
|
175
|
+
58, 96, 97, 101, 71, 56, 60, 119, 73, 62,
|
176
|
+
78, 64, 79, 121, 77, 108, 3, 70, 104, 81,
|
177
|
+
4, 60, 107, 15, 2, 61, nil, nil, 117, nil,
|
172
178
|
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
173
179
|
nil, nil, nil, 99, nil, nil, nil, nil, nil, nil,
|
174
180
|
nil, nil, nil, nil, nil, 102, nil, 109, nil, nil,
|
@@ -176,12 +182,12 @@ racc_goto_table = [
|
|
176
182
|
109 ]
|
177
183
|
|
178
184
|
racc_goto_check = [
|
179
|
-
12, 17, 11,
|
180
|
-
10,
|
181
|
-
|
182
|
-
|
183
|
-
10, 12, 10, 17, 24, 34,
|
184
|
-
4, 12,
|
185
|
+
12, 17, 11, 25, 11, 15, 12, 19, 11, 27,
|
186
|
+
10, 20, 14, 10, 16, 24, 18, 10, 17, 25,
|
187
|
+
13, 9, 8, 10, 27, 15, 14, 20, 1, 17,
|
188
|
+
26, 11, 11, 19, 11, 12, 12, 17, 24, 12,
|
189
|
+
10, 12, 10, 17, 24, 34, 3, 12, 32, 10,
|
190
|
+
4, 12, 33, 4, 2, 36, nil, nil, 34, nil,
|
185
191
|
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
186
192
|
nil, nil, nil, 12, nil, nil, nil, nil, nil, nil,
|
187
193
|
nil, nil, nil, nil, nil, 12, nil, 12, nil, nil,
|
@@ -189,10 +195,10 @@ racc_goto_check = [
|
|
189
195
|
12 ]
|
190
196
|
|
191
197
|
racc_goto_pointer = [
|
192
|
-
nil,
|
193
|
-
-24, -47, -7, -
|
194
|
-
-
|
195
|
-
nil, nil, -
|
198
|
+
nil, 28, 54, 46, 50, nil, nil, nil, 15, 5,
|
199
|
+
-24, -47, -7, -18, -26, -75, -84, -75, 4, -48,
|
200
|
+
-1, nil, nil, nil, -18, -31, -13, -34, nil, nil,
|
201
|
+
nil, nil, -45, -42, -49, nil, 11 ]
|
196
202
|
|
197
203
|
racc_goto_default = [
|
198
204
|
nil, nil, nil, nil, nil, 5, 6, 7, nil, nil,
|
@@ -12,7 +12,7 @@ module GraphQL
|
|
12
12
|
end
|
13
13
|
|
14
14
|
# @example Rescue from not-found by telling the user
|
15
|
-
# MySchema.rescue_from(ActiveRecord::
|
15
|
+
# MySchema.rescue_from(ActiveRecord::RecordNotFound) { "An item could not be found" }
|
16
16
|
#
|
17
17
|
# @param [Class] a class of error to rescue from
|
18
18
|
# @yield [err] A handler to return a message for this error instance
|
data/lib/graphql/version.rb
CHANGED
data/readme.md
CHANGED
@@ -120,11 +120,15 @@ If you're building a backend for [Relay](http://facebook.github.io/relay/), you'
|
|
120
120
|
## To Do
|
121
121
|
|
122
122
|
- __1.0 items:__
|
123
|
-
-
|
124
|
-
- Add a complexity validator (reject queries if they're too big)
|
123
|
+
- Non-nulls should _propagate_ to the next non-null field (all the way up to data, if need be)
|
125
124
|
- Add docs for shared behaviors & DRY code
|
126
|
-
-
|
127
|
-
-
|
128
|
-
-
|
129
|
-
-
|
130
|
-
-
|
125
|
+
- Subscriptions
|
126
|
+
- Is there something to do at the graphql-ruby level to make this easier for specific implementations?
|
127
|
+
- Accept type name as `type` argument?
|
128
|
+
- Goal: accept `field :post, "Post"` to look up a type named `"Post"` in the schema
|
129
|
+
- Problem: how does a field know which schema to look up the name from?
|
130
|
+
- Problem: how can we load types in Rails without accessing the constant?
|
131
|
+
- Customizable complexity validator
|
132
|
+
- Types / fields can define their "weight" in a query
|
133
|
+
- Queries can be executed with a "max weight", or Schema can have a default
|
134
|
+
- During validation, we make sure the query doesn't exceed "max weight"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.
|
4
|
+
version: 0.15.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Mosolgo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: codeclimate-test-reporter
|