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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 06deb0560626e16a3df052a56924a3f541baed38
4
- data.tar.gz: 2f8d1ffaca328783f129f9c9c031c5794cd629da
3
+ metadata.gz: 8a448fdb0e6f68de9172e04ff16c5bcfe5844f5e
4
+ data.tar.gz: 02b41b4bedeb44c838fc9d895ac70633c19e617e
5
5
  SHA512:
6
- metadata.gz: c221077dd7e949a7e021d941f70fb6f7424c3f563ad0c3abdb1473bf94089fb93949ca324bc20d610a3217e18cc8c9e2b4b9dc21e4b490a7b7363de60d7c4d48
7
- data.tar.gz: a8b0880ef7498bc53168ba8864857c877d151825aeccfd50e07e1f58ad299c558a8bbda9b0ee0496ec35de274ac301fceef69996b1d99466c568358ef82ac53b
6
+ metadata.gz: 5663e57b70cc3b3b3e93cdbde3a3b9e14dfa42cff4d2554b47f60187ffb0bba138c5ed8f94bc7a4f84ddc7a6afaff3423a6931aea8946b4e4c823b9024f9d8f2
7
+ data.tar.gz: 8f65610a1923187c03a52847352ba66ed227094569b8191e8be7238a1ec578860756652195d1d27edb5e07c0bb17c3a273835a111259c65fcee7663706b722ac
@@ -83,7 +83,7 @@ module GraphQL
83
83
  #
84
84
  # Created with {EnumType#value}
85
85
  class EnumValue
86
- attr_reader :name, :description, :deprecation_reason, :value
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, 43, 111, 46, 42, 112, 14, 24,
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, 36, 34, 20, 21, 22, 23, 111, 38, 120,
81
- 27, 19, 20, 21, 22, 23, 24, 25, 26, 50,
82
- 34, 68, 54, 46, 54, 46, 24, 25, 26, 48,
83
- 20, 21, 22, 23, 24, 25, 26, 46, 57, 19,
84
- 20, 21, 22, 23, 24, 25, 26, 19, 20, 21,
85
- 22, 23, 24, 25, 26, 46, 74, 19, 20, 21,
86
- 22, 23, 24, 25, 26, 19, 20, 21, 22, 23,
87
- 24, 25, 26, 46, 12, 19, 20, 21, 22, 23,
88
- 24, 25, 26, 19, 20, 21, 22, 23, 100, 24,
89
- 25, 26, 12, 19, 20, 21, 22, 23, 24, 25,
90
- 26, 12, 19, 20, 21, 22, 23, 43, 76, 43,
91
- 106, 19, 20, 21, 22, 23, 24, 25, 26, 46,
92
- 80, 46, 12, 12, 100, 24, 25, 26, 12, 19,
93
- 20, 21, 22, 23, 24, 25, 26, 116, 19, 20,
94
- 21, 22, 23, 24, 25, 26, 118, 19, 20, 21,
95
- 22, 23, 9, 10, 11, nil, 19, 20, 21, 22,
96
- 23, nil, 92, 12, nil, 93, nil, 13, 94, nil,
97
- nil, 95, nil, 86, 87, 83, 84, 85, 92, nil,
98
- nil, 93, 103, nil, 94, nil, nil, 95, nil, 86,
99
- 87, 83, 84, 85, 92, nil, nil, 93, nil, nil,
100
- 94, nil, nil, 95, nil, 86, 87, 83, 84, 85,
101
- 92, nil, nil, 93, 114, nil, 94, nil, nil, 95,
102
- nil, 86, 87, 83, 84, 85, 9, 10, 11, nil,
103
- nil, nil, nil, 92, nil, nil, 93, 12, nil, 94,
104
- nil, 13, 95, nil, 86, 87, 83, 84, 85 ]
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, 98, 64, 33, 98, 1, 50,
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, 14, 28, 50, 50, 50, 50, 113, 16, 113,
110
- 12, 12, 12, 12, 12, 12, 34, 34, 34, 35,
111
- 12, 52, 52, 37, 38, 41, 46, 46, 46, 34,
112
- 34, 34, 34, 34, 43, 43, 43, 34, 43, 46,
113
- 46, 46, 46, 46, 7, 7, 7, 43, 43, 43,
114
- 43, 43, 58, 58, 58, 44, 58, 7, 7, 7,
115
- 7, 7, 42, 42, 42, 58, 58, 58, 58, 58,
116
- 48, 48, 48, 47, 49, 42, 42, 42, 42, 42,
117
- 80, 80, 80, 48, 48, 48, 48, 48, 80, 92,
118
- 92, 92, 51, 80, 80, 80, 80, 80, 94, 94,
119
- 94, 55, 92, 92, 92, 92, 92, 56, 60, 62,
120
- 94, 94, 94, 94, 94, 94, 100, 100, 100, 66,
121
- 70, 73, 78, 79, 100, 107, 107, 107, 81, 100,
122
- 100, 100, 100, 100, 54, 54, 54, 107, 107, 107,
123
- 107, 107, 107, 13, 13, 13, 109, 54, 54, 54,
124
- 54, 54, 0, 0, 0, nil, 13, 13, 13, 13,
125
- 13, nil, 76, 0, nil, 76, nil, 0, 76, nil,
126
- nil, 76, nil, 76, 76, 76, 76, 76, 93, nil,
127
- nil, 93, 93, nil, 93, nil, nil, 93, nil, 93,
128
- 93, 93, 93, 93, 118, nil, nil, 118, nil, nil,
129
- 118, nil, nil, 118, nil, 118, 118, 118, 118, 118,
130
- 104, nil, nil, 104, 104, nil, 104, nil, nil, 104,
131
- nil, 104, 104, 104, 104, 104, 3, 3, 3, nil,
132
- nil, nil, nil, 112, nil, nil, 112, 3, nil, 112,
133
- nil, 3, 112, nil, 112, 112, 112, 112, 112 ]
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
- 170, 8, nil, 244, nil, nil, nil, 62, nil, nil,
137
- nil, nil, 16, 161, 21, nil, 23, nil, nil, nil,
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, -2, 34, 24, nil, 20, 37, nil,
140
- nil, 22, 80, 52, 52, nil, 44, 70, 88, 81,
141
- 7, 99, 35, nil, 152, 108, 122, nil, 70, nil,
142
- 120, nil, 124, nil, -18, nil, 116, nil, nil, nil,
143
- 132, nil, nil, 118, nil, nil, 175, nil, 129, 130,
144
- 98, 135, nil, nil, nil, nil, nil, nil, nil, nil,
145
- nil, nil, 107, 191, 116, nil, nil, nil, -5, nil,
146
- 134, nil, nil, nil, 223, nil, nil, 143, nil, 158,
147
- nil, nil, 246, 18, nil, nil, nil, nil, 207, 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, 29, 67, 98, 35, 72, 71, 59,
167
- 49, 47, 53, 51, 61, 41, 2, 55, 105, 40,
168
- 3, 16, 37, 63, 75, 113, 69, 66, 52, 115,
169
- 110, 96, 97, 101, 71, 56, 60, 119, 73, 62,
170
- 78, 64, 79, 121, 77, 108, 28, 70, 58, 81,
171
- 4, 60, 104, 15, 107, 1, nil, nil, 117, nil,
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, 20, 11, 15, 12, 19, 11, 27,
180
- 10, 25, 14, 10, 36, 24, 2, 10, 17, 20,
181
- 3, 8, 9, 10, 27, 15, 14, 25, 13, 17,
182
- 16, 11, 11, 19, 11, 12, 12, 17, 24, 12,
183
- 10, 12, 10, 17, 24, 34, 18, 12, 26, 10,
184
- 4, 12, 32, 4, 33, 1, nil, nil, 34, nil,
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, 55, 16, 20, 50, nil, nil, nil, 14, 6,
193
- -24, -47, -7, -10, -26, -75, -68, -75, 34, -48,
194
- -9, nil, nil, nil, -18, -23, 5, -34, nil, nil,
195
- nil, nil, -41, -40, -49, nil, -30 ]
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::NotFound) { "An item could not be found" }
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
@@ -1,3 +1,3 @@
1
1
  module GraphQL
2
- VERSION = "0.15.2"
2
+ VERSION = "0.15.3"
3
3
  end
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
- - Support type name for field types?
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
- - Proper error on unknown directive
127
- - Non-nulls should _propagate_ to the next non-null field (all the way up to data, if need be)
128
- - __Subscriptions__
129
- - This is a good chance to make an `Operation` abstraction of which `query`, `mutation` and `subscription` are members
130
- - For a subscription, `graphql` would send an outbound message to the system (allow the host application to manage its own subscriptions via Pusher, ActionCable, whatever)
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.2
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-16 00:00:00.000000000 Z
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