graphql 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/lib/graph_ql/{types → definition_helpers}/argument_definer.rb +0 -0
  3. data/lib/graph_ql/definition_helpers/definable.rb +18 -0
  4. data/lib/graph_ql/{types → definition_helpers}/field_definer.rb +0 -0
  5. data/lib/graph_ql/definition_helpers/forwardable.rb +10 -0
  6. data/lib/graph_ql/definition_helpers/non_null_with_bang.rb +9 -0
  7. data/lib/graph_ql/definition_helpers/string_named_hash.rb +12 -0
  8. data/lib/graph_ql/{types → definition_helpers}/type_definer.rb +1 -0
  9. data/lib/graph_ql/directive.rb +9 -5
  10. data/lib/graph_ql/directives/directive_chain.rb +1 -1
  11. data/lib/graph_ql/field.rb +1 -5
  12. data/lib/graph_ql/parser/transform.rb +1 -3
  13. data/lib/graph_ql/query.rb +14 -3
  14. data/lib/graph_ql/query/arguments.rb +6 -5
  15. data/lib/graph_ql/query/field_resolution_strategy.rb +3 -3
  16. data/lib/graph_ql/{types → scalars}/boolean_type.rb +0 -0
  17. data/lib/graph_ql/{types → scalars}/float_type.rb +1 -1
  18. data/lib/graph_ql/scalars/id_type.rb +6 -0
  19. data/lib/graph_ql/{types → scalars}/int_type.rb +0 -0
  20. data/lib/graph_ql/{types → scalars}/scalar_type.rb +0 -4
  21. data/lib/graph_ql/{types → scalars}/string_type.rb +0 -0
  22. data/lib/graph_ql/static_validation.rb +7 -10
  23. data/lib/graph_ql/static_validation/all_rules.rb +23 -0
  24. data/lib/graph_ql/static_validation/literal_validator.rb +0 -3
  25. data/lib/graph_ql/static_validation/{argument_literals_are_compatible.rb → rules/argument_literals_are_compatible.rb} +0 -0
  26. data/lib/graph_ql/static_validation/{arguments_are_defined.rb → rules/arguments_are_defined.rb} +5 -0
  27. data/lib/graph_ql/static_validation/{directives_are_defined.rb → rules/directives_are_defined.rb} +0 -0
  28. data/lib/graph_ql/static_validation/{fields_are_defined_on_type.rb → rules/fields_are_defined_on_type.rb} +0 -0
  29. data/lib/graph_ql/static_validation/{fields_have_appropriate_selections.rb → rules/fields_have_appropriate_selections.rb} +0 -0
  30. data/lib/graph_ql/static_validation/{fields_will_merge.rb → rules/fields_will_merge.rb} +13 -5
  31. data/lib/graph_ql/static_validation/rules/fragment_spreads_are_possible.rb +50 -0
  32. data/lib/graph_ql/static_validation/{fragment_types_exist.rb → rules/fragment_types_exist.rb} +0 -0
  33. data/lib/graph_ql/static_validation/rules/fragments_are_finite.rb +23 -0
  34. data/lib/graph_ql/static_validation/rules/fragments_are_on_composite_types.rb +27 -0
  35. data/lib/graph_ql/static_validation/{fragments_are_used.rb → rules/fragments_are_used.rb} +0 -0
  36. data/lib/graph_ql/static_validation/{required_arguments_are_present.rb → rules/required_arguments_are_present.rb} +0 -0
  37. data/lib/graph_ql/static_validation/rules/variable_default_values_are_correctly_typed.rb +24 -0
  38. data/lib/graph_ql/static_validation/rules/variable_usages_are_allowed.rb +47 -0
  39. data/lib/graph_ql/static_validation/rules/variables_are_input_types.rb +27 -0
  40. data/lib/graph_ql/static_validation/rules/variables_are_used_and_defined.rb +31 -0
  41. data/lib/graph_ql/static_validation/type_stack.rb +13 -1
  42. data/lib/graph_ql/static_validation/validator.rb +14 -18
  43. data/lib/graph_ql/type_kinds.rb +8 -4
  44. data/lib/graph_ql/{enum.rb → types/enum.rb} +7 -6
  45. data/lib/graph_ql/types/input_object_type.rb +3 -10
  46. data/lib/graph_ql/{interface.rb → types/interface.rb} +0 -4
  47. data/lib/graph_ql/types/list_type.rb +0 -4
  48. data/lib/graph_ql/types/non_null_type.rb +0 -4
  49. data/lib/graph_ql/types/object_type.rb +28 -13
  50. data/lib/graph_ql/{union.rb → types/union.rb} +0 -4
  51. data/lib/graph_ql/version.rb +1 -1
  52. data/lib/graphql.rb +9 -40
  53. data/readme.md +26 -20
  54. data/spec/graph_ql/directive_spec.rb +4 -4
  55. data/spec/graph_ql/introspection/directive_type_spec.rb +2 -2
  56. data/spec/graph_ql/introspection/schema_type_spec.rb +3 -2
  57. data/spec/graph_ql/introspection/type_type_spec.rb +7 -7
  58. data/spec/graph_ql/parser/parser_spec.rb +6 -2
  59. data/spec/graph_ql/query_spec.rb +26 -8
  60. data/spec/graph_ql/scalars/id_type_spec.rb +24 -0
  61. data/spec/graph_ql/schema/type_reducer_spec.rb +1 -0
  62. data/spec/graph_ql/schema/type_validator_spec.rb +1 -1
  63. data/spec/graph_ql/static_validation/{argument_literals_are_compatible_spec.rb → rules/argument_literals_are_compatible_spec.rb} +1 -1
  64. data/spec/graph_ql/static_validation/{arguments_are_defined_spec.rb → rules/arguments_are_defined_spec.rb} +1 -1
  65. data/spec/graph_ql/static_validation/{directives_are_defined_spec.rb → rules/directives_are_defined_spec.rb} +1 -1
  66. data/spec/graph_ql/static_validation/{fields_are_defined_on_type_spec.rb → rules/fields_are_defined_on_type_spec.rb} +1 -1
  67. data/spec/graph_ql/static_validation/{fields_have_appropriate_selections_spec.rb → rules/fields_have_appropriate_selections_spec.rb} +1 -1
  68. data/spec/graph_ql/static_validation/{fields_will_merge_spec.rb → rules/fields_will_merge_spec.rb} +1 -1
  69. data/spec/graph_ql/static_validation/rules/fragment_spreads_are_possible_spec.rb +46 -0
  70. data/spec/graph_ql/static_validation/{fragment_types_exist_spec.rb → rules/fragment_types_exist_spec.rb} +1 -1
  71. data/spec/graph_ql/static_validation/rules/fragments_are_finite_spec.rb +43 -0
  72. data/spec/graph_ql/static_validation/rules/fragments_are_on_composite_types_spec.rb +48 -0
  73. data/spec/graph_ql/static_validation/{fragments_are_used_spec.rb → rules/fragments_are_used_spec.rb} +1 -1
  74. data/spec/graph_ql/static_validation/{required_arguments_are_present_spec.rb → rules/required_arguments_are_present_spec.rb} +1 -1
  75. data/spec/graph_ql/static_validation/rules/variable_default_values_are_correctly_typed_spec.rb +43 -0
  76. data/spec/graph_ql/static_validation/rules/variable_usages_are_allowed_spec.rb +45 -0
  77. data/spec/graph_ql/static_validation/rules/variables_are_input_types_spec.rb +36 -0
  78. data/spec/graph_ql/static_validation/rules/variables_are_used_and_defined_spec.rb +44 -0
  79. data/spec/graph_ql/static_validation/type_stack_spec.rb +2 -2
  80. data/spec/graph_ql/static_validation/validator_spec.rb +44 -5
  81. data/spec/graph_ql/types/enum_spec.rb +10 -0
  82. data/spec/graph_ql/{interface_spec.rb → types/interface_spec.rb} +1 -1
  83. data/spec/graph_ql/types/object_type_spec.rb +13 -0
  84. data/spec/graph_ql/{union_spec.rb → types/union_spec.rb} +0 -0
  85. data/spec/support/dummy_app.rb +7 -6
  86. data/spec/support/dummy_data.rb +3 -3
  87. metadata +74 -46
  88. data/lib/graph_ql/types/non_null_with_bang.rb +0 -5
  89. data/spec/graph_ql/enum_spec.rb +0 -5
@@ -0,0 +1,10 @@
1
+ require 'spec_helper'
2
+
3
+ describe GraphQL::Enum do
4
+ let(:enum) { DairyAnimalEnum }
5
+
6
+ it 'coerces names to underlying values' do
7
+ assert_equal("YAK", enum.coerce("YAK"))
8
+ assert_equal(1, enum.coerce("COW"))
9
+ end
10
+ end
@@ -20,7 +20,7 @@ describe GraphQL::Interface do
20
20
  }
21
21
  |}
22
22
  it 'gets fields from the type for the given object' do
23
- expected = {"data"=>{"fav"=>{"favoriteEdible"=>{"fatContent"=>0.04}}}}
23
+ expected = {"data"=>{"favoriteEdible"=>{"fatContent"=>0.04}}}
24
24
  assert_equal(expected, result)
25
25
  end
26
26
  end
@@ -25,6 +25,19 @@ describe GraphQL::ObjectType do
25
25
  assert_equal(GraphQL::TypeKinds::NON_NULL, (!GraphQL::STRING_TYPE).kind)
26
26
  end
27
27
 
28
+ it 'can be compared' do
29
+ assert_equal(!GraphQL::INT_TYPE, !GraphQL::INT_TYPE)
30
+ refute_equal(!GraphQL::FLOAT_TYPE, GraphQL::FLOAT_TYPE)
31
+ assert_equal(
32
+ GraphQL::ListType.new(of_type: MilkType),
33
+ GraphQL::ListType.new(of_type: MilkType)
34
+ )
35
+ refute_equal(
36
+ GraphQL::ListType.new(of_type: MilkType),
37
+ GraphQL::ListType.new(of_type: !MilkType)
38
+ )
39
+ end
40
+
28
41
  describe '.fields ' do
29
42
  it 'exposes fields' do
30
43
  field = type.fields["id"]
@@ -22,7 +22,7 @@ end
22
22
  DairyAnimalEnum = GraphQL::Enum.new do |e|
23
23
  e.name "DairyAnimal"
24
24
  e.description "An animal which can yield milk"
25
- e.value("COW", "Animal with black and white spots")
25
+ e.value("COW", "Animal with black and white spots", value: 1)
26
26
  e.value("GOAT", "Animal with horns")
27
27
  e.value("SHEEP", "Animal with wool")
28
28
  e.value("YAK", "Animal with long hair", deprecation_reason: "Out of fashion")
@@ -46,12 +46,12 @@ CheeseType = GraphQL::ObjectType.new do |t, type, field, arg|
46
46
  }
47
47
  end
48
48
 
49
- MilkType = GraphQL::ObjectType.new do |t, type, field, arg|
49
+ MilkType = GraphQL::ObjectType.new do |t, type, field, arg|
50
50
  t.name 'Milk'
51
51
  t.description "Dairy beverage"
52
52
  t.interfaces [EdibleInterface, AnimalProductInterface]
53
53
  t.fields = {
54
- id: field.build(type: !type.Int, desc: "Unique identifier"),
54
+ id: field.build(type: !type.ID, desc: "Unique identifier"),
55
55
  source: field.build(type: DairyAnimalEnum, desc: "Animal which produced this milk"),
56
56
  fatContent: field.build(type: !type.Float, desc: "Percentage which is milkfat"),
57
57
  flavors: field.build(
@@ -81,10 +81,10 @@ DairyProductInputType = GraphQL::InputObjectType.new {|t, type, field, arg|
81
81
  class FetchField
82
82
  attr_reader :type, :arguments, :deprecation_reason
83
83
  attr_accessor :name
84
- def initialize(type:, data:)
84
+ def initialize(type:, data:, id_type: !GraphQL::INT_TYPE)
85
85
  @type = type
86
86
  @data = data
87
- @arguments = {"id" => GraphQL::InputValue.new(type: !GraphQL::INT_TYPE, name: "id")}
87
+ @arguments = {"id" => GraphQL::InputValue.new(type: id_type, name: "id")}
88
88
  @deprecation_reason = nil
89
89
  end
90
90
 
@@ -93,7 +93,7 @@ class FetchField
93
93
  end
94
94
 
95
95
  def resolve(target, arguments, context)
96
- @data[arguments["id"]]
96
+ @data[arguments["id"].to_i]
97
97
  end
98
98
  end
99
99
 
@@ -118,6 +118,7 @@ QueryType = GraphQL::ObjectType.new do |t, types, field, arg|
118
118
  t.description "Query root of the system"
119
119
  t.fields({
120
120
  cheese: FetchField.new(type: CheeseType, data: CHEESES),
121
+ milk: FetchField.new(type: MilkType, data: MILKS, id_type: !types.ID),
121
122
  fromSource: SourceField,
122
123
  favoriteEdible: FavoriteField,
123
124
  searchDairy: GraphQL::Field.new { |f|
@@ -1,11 +1,11 @@
1
1
  Cheese = Struct.new(:id, :flavor, :fatContent, :source)
2
2
  CHEESES = {
3
- 1 => Cheese.new(1, "Brie", 0.19, "COW"),
4
- 2 => Cheese.new(2, "Gouda", 0.3, "COW"),
3
+ 1 => Cheese.new(1, "Brie", 0.19, 1),
4
+ 2 => Cheese.new(2, "Gouda", 0.3, 1),
5
5
  3 => Cheese.new(3, "Manchego", 0.065, "SHEEP")
6
6
  }
7
7
 
8
8
  Milk = Struct.new(:id, :fatContent, :source)
9
9
  MILKS = {
10
- 1 => Milk.new(1, 0.04, "COW"),
10
+ 1 => Milk.new(1, 0.04, 1),
11
11
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Mosolgo
@@ -158,13 +158,18 @@ extensions: []
158
158
  extra_rdoc_files: []
159
159
  files:
160
160
  - MIT-LICENSE
161
+ - lib/graph_ql/definition_helpers/argument_definer.rb
162
+ - lib/graph_ql/definition_helpers/definable.rb
163
+ - lib/graph_ql/definition_helpers/field_definer.rb
164
+ - lib/graph_ql/definition_helpers/forwardable.rb
165
+ - lib/graph_ql/definition_helpers/non_null_with_bang.rb
166
+ - lib/graph_ql/definition_helpers/string_named_hash.rb
167
+ - lib/graph_ql/definition_helpers/type_definer.rb
161
168
  - lib/graph_ql/directive.rb
162
169
  - lib/graph_ql/directives/directive_chain.rb
163
170
  - lib/graph_ql/directives/include_directive.rb
164
171
  - lib/graph_ql/directives/skip_directive.rb
165
- - lib/graph_ql/enum.rb
166
172
  - lib/graph_ql/field.rb
167
- - lib/graph_ql/interface.rb
168
173
  - lib/graph_ql/introspection/arguments_field.rb
169
174
  - lib/graph_ql/introspection/directive_type.rb
170
175
  - lib/graph_ql/introspection/enum_value_type.rb
@@ -194,6 +199,12 @@ files:
194
199
  - lib/graph_ql/query/selection_resolver.rb
195
200
  - lib/graph_ql/query/type_resolver.rb
196
201
  - lib/graph_ql/repl.rb
202
+ - lib/graph_ql/scalars/boolean_type.rb
203
+ - lib/graph_ql/scalars/float_type.rb
204
+ - lib/graph_ql/scalars/id_type.rb
205
+ - lib/graph_ql/scalars/int_type.rb
206
+ - lib/graph_ql/scalars/scalar_type.rb
207
+ - lib/graph_ql/scalars/string_type.rb
197
208
  - lib/graph_ql/schema.rb
198
209
  - lib/graph_ql/schema/each_item_validator.rb
199
210
  - lib/graph_ql/schema/field_validator.rb
@@ -202,43 +213,42 @@ files:
202
213
  - lib/graph_ql/schema/type_reducer.rb
203
214
  - lib/graph_ql/schema/type_validator.rb
204
215
  - lib/graph_ql/static_validation.rb
205
- - lib/graph_ql/static_validation/argument_literals_are_compatible.rb
206
- - lib/graph_ql/static_validation/arguments_are_defined.rb
216
+ - lib/graph_ql/static_validation/all_rules.rb
207
217
  - lib/graph_ql/static_validation/arguments_validator.rb
208
- - lib/graph_ql/static_validation/directives_are_defined.rb
209
- - lib/graph_ql/static_validation/fields_are_defined_on_type.rb
210
- - lib/graph_ql/static_validation/fields_have_appropriate_selections.rb
211
- - lib/graph_ql/static_validation/fields_will_merge.rb
212
- - lib/graph_ql/static_validation/fragment_types_exist.rb
213
- - lib/graph_ql/static_validation/fragments_are_used.rb
214
218
  - lib/graph_ql/static_validation/literal_validator.rb
215
219
  - lib/graph_ql/static_validation/message.rb
216
- - lib/graph_ql/static_validation/required_arguments_are_present.rb
220
+ - lib/graph_ql/static_validation/rules/argument_literals_are_compatible.rb
221
+ - lib/graph_ql/static_validation/rules/arguments_are_defined.rb
222
+ - lib/graph_ql/static_validation/rules/directives_are_defined.rb
223
+ - lib/graph_ql/static_validation/rules/fields_are_defined_on_type.rb
224
+ - lib/graph_ql/static_validation/rules/fields_have_appropriate_selections.rb
225
+ - lib/graph_ql/static_validation/rules/fields_will_merge.rb
226
+ - lib/graph_ql/static_validation/rules/fragment_spreads_are_possible.rb
227
+ - lib/graph_ql/static_validation/rules/fragment_types_exist.rb
228
+ - lib/graph_ql/static_validation/rules/fragments_are_finite.rb
229
+ - lib/graph_ql/static_validation/rules/fragments_are_on_composite_types.rb
230
+ - lib/graph_ql/static_validation/rules/fragments_are_used.rb
231
+ - lib/graph_ql/static_validation/rules/required_arguments_are_present.rb
232
+ - lib/graph_ql/static_validation/rules/variable_default_values_are_correctly_typed.rb
233
+ - lib/graph_ql/static_validation/rules/variable_usages_are_allowed.rb
234
+ - lib/graph_ql/static_validation/rules/variables_are_input_types.rb
235
+ - lib/graph_ql/static_validation/rules/variables_are_used_and_defined.rb
217
236
  - lib/graph_ql/static_validation/type_stack.rb
218
237
  - lib/graph_ql/static_validation/validator.rb
219
238
  - lib/graph_ql/type_kinds.rb
220
- - lib/graph_ql/types/argument_definer.rb
221
- - lib/graph_ql/types/boolean_type.rb
222
- - lib/graph_ql/types/field_definer.rb
223
- - lib/graph_ql/types/float_type.rb
239
+ - lib/graph_ql/types/enum.rb
224
240
  - lib/graph_ql/types/input_object_type.rb
225
241
  - lib/graph_ql/types/input_value.rb
226
- - lib/graph_ql/types/int_type.rb
242
+ - lib/graph_ql/types/interface.rb
227
243
  - lib/graph_ql/types/list_type.rb
228
244
  - lib/graph_ql/types/non_null_type.rb
229
- - lib/graph_ql/types/non_null_with_bang.rb
230
245
  - lib/graph_ql/types/object_type.rb
231
- - lib/graph_ql/types/scalar_type.rb
232
- - lib/graph_ql/types/string_type.rb
233
- - lib/graph_ql/types/type_definer.rb
234
- - lib/graph_ql/union.rb
246
+ - lib/graph_ql/types/union.rb
235
247
  - lib/graph_ql/version.rb
236
248
  - lib/graphql.rb
237
249
  - readme.md
238
250
  - spec/graph_ql/directive_spec.rb
239
- - spec/graph_ql/enum_spec.rb
240
251
  - spec/graph_ql/fields/field_spec.rb
241
- - spec/graph_ql/interface_spec.rb
242
252
  - spec/graph_ql/introspection/directive_type_spec.rb
243
253
  - spec/graph_ql/introspection/schema_type_spec.rb
244
254
  - spec/graph_ql/introspection/type_type_spec.rb
@@ -247,23 +257,33 @@ files:
247
257
  - spec/graph_ql/parser/visitor_spec.rb
248
258
  - spec/graph_ql/query/operation_resolver_spec.rb
249
259
  - spec/graph_ql/query_spec.rb
260
+ - spec/graph_ql/scalars/id_type_spec.rb
250
261
  - spec/graph_ql/schema/field_validator_spec.rb
251
262
  - spec/graph_ql/schema/type_reducer_spec.rb
252
263
  - spec/graph_ql/schema/type_validator_spec.rb
253
- - spec/graph_ql/static_validation/argument_literals_are_compatible_spec.rb
254
- - spec/graph_ql/static_validation/arguments_are_defined_spec.rb
255
- - spec/graph_ql/static_validation/directives_are_defined_spec.rb
256
- - spec/graph_ql/static_validation/fields_are_defined_on_type_spec.rb
257
- - spec/graph_ql/static_validation/fields_have_appropriate_selections_spec.rb
258
- - spec/graph_ql/static_validation/fields_will_merge_spec.rb
259
- - spec/graph_ql/static_validation/fragment_types_exist_spec.rb
260
- - spec/graph_ql/static_validation/fragments_are_used_spec.rb
261
- - spec/graph_ql/static_validation/required_arguments_are_present_spec.rb
264
+ - spec/graph_ql/static_validation/rules/argument_literals_are_compatible_spec.rb
265
+ - spec/graph_ql/static_validation/rules/arguments_are_defined_spec.rb
266
+ - spec/graph_ql/static_validation/rules/directives_are_defined_spec.rb
267
+ - spec/graph_ql/static_validation/rules/fields_are_defined_on_type_spec.rb
268
+ - spec/graph_ql/static_validation/rules/fields_have_appropriate_selections_spec.rb
269
+ - spec/graph_ql/static_validation/rules/fields_will_merge_spec.rb
270
+ - spec/graph_ql/static_validation/rules/fragment_spreads_are_possible_spec.rb
271
+ - spec/graph_ql/static_validation/rules/fragment_types_exist_spec.rb
272
+ - spec/graph_ql/static_validation/rules/fragments_are_finite_spec.rb
273
+ - spec/graph_ql/static_validation/rules/fragments_are_on_composite_types_spec.rb
274
+ - spec/graph_ql/static_validation/rules/fragments_are_used_spec.rb
275
+ - spec/graph_ql/static_validation/rules/required_arguments_are_present_spec.rb
276
+ - spec/graph_ql/static_validation/rules/variable_default_values_are_correctly_typed_spec.rb
277
+ - spec/graph_ql/static_validation/rules/variable_usages_are_allowed_spec.rb
278
+ - spec/graph_ql/static_validation/rules/variables_are_input_types_spec.rb
279
+ - spec/graph_ql/static_validation/rules/variables_are_used_and_defined_spec.rb
262
280
  - spec/graph_ql/static_validation/type_stack_spec.rb
263
281
  - spec/graph_ql/static_validation/validator_spec.rb
282
+ - spec/graph_ql/types/enum_spec.rb
264
283
  - spec/graph_ql/types/input_object_type_spec.rb
284
+ - spec/graph_ql/types/interface_spec.rb
265
285
  - spec/graph_ql/types/object_type_spec.rb
266
- - spec/graph_ql/union_spec.rb
286
+ - spec/graph_ql/types/union_spec.rb
267
287
  - spec/spec_helper.rb
268
288
  - spec/support/dummy_app.rb
269
289
  - spec/support/dummy_data.rb
@@ -293,9 +313,7 @@ specification_version: 4
293
313
  summary: GraphQL
294
314
  test_files:
295
315
  - spec/graph_ql/directive_spec.rb
296
- - spec/graph_ql/enum_spec.rb
297
316
  - spec/graph_ql/fields/field_spec.rb
298
- - spec/graph_ql/interface_spec.rb
299
317
  - spec/graph_ql/introspection/directive_type_spec.rb
300
318
  - spec/graph_ql/introspection/schema_type_spec.rb
301
319
  - spec/graph_ql/introspection/type_type_spec.rb
@@ -304,23 +322,33 @@ test_files:
304
322
  - spec/graph_ql/parser/visitor_spec.rb
305
323
  - spec/graph_ql/query/operation_resolver_spec.rb
306
324
  - spec/graph_ql/query_spec.rb
325
+ - spec/graph_ql/scalars/id_type_spec.rb
307
326
  - spec/graph_ql/schema/field_validator_spec.rb
308
327
  - spec/graph_ql/schema/type_reducer_spec.rb
309
328
  - spec/graph_ql/schema/type_validator_spec.rb
310
- - spec/graph_ql/static_validation/argument_literals_are_compatible_spec.rb
311
- - spec/graph_ql/static_validation/arguments_are_defined_spec.rb
312
- - spec/graph_ql/static_validation/directives_are_defined_spec.rb
313
- - spec/graph_ql/static_validation/fields_are_defined_on_type_spec.rb
314
- - spec/graph_ql/static_validation/fields_have_appropriate_selections_spec.rb
315
- - spec/graph_ql/static_validation/fields_will_merge_spec.rb
316
- - spec/graph_ql/static_validation/fragment_types_exist_spec.rb
317
- - spec/graph_ql/static_validation/fragments_are_used_spec.rb
318
- - spec/graph_ql/static_validation/required_arguments_are_present_spec.rb
329
+ - spec/graph_ql/static_validation/rules/argument_literals_are_compatible_spec.rb
330
+ - spec/graph_ql/static_validation/rules/arguments_are_defined_spec.rb
331
+ - spec/graph_ql/static_validation/rules/directives_are_defined_spec.rb
332
+ - spec/graph_ql/static_validation/rules/fields_are_defined_on_type_spec.rb
333
+ - spec/graph_ql/static_validation/rules/fields_have_appropriate_selections_spec.rb
334
+ - spec/graph_ql/static_validation/rules/fields_will_merge_spec.rb
335
+ - spec/graph_ql/static_validation/rules/fragment_spreads_are_possible_spec.rb
336
+ - spec/graph_ql/static_validation/rules/fragment_types_exist_spec.rb
337
+ - spec/graph_ql/static_validation/rules/fragments_are_finite_spec.rb
338
+ - spec/graph_ql/static_validation/rules/fragments_are_on_composite_types_spec.rb
339
+ - spec/graph_ql/static_validation/rules/fragments_are_used_spec.rb
340
+ - spec/graph_ql/static_validation/rules/required_arguments_are_present_spec.rb
341
+ - spec/graph_ql/static_validation/rules/variable_default_values_are_correctly_typed_spec.rb
342
+ - spec/graph_ql/static_validation/rules/variable_usages_are_allowed_spec.rb
343
+ - spec/graph_ql/static_validation/rules/variables_are_input_types_spec.rb
344
+ - spec/graph_ql/static_validation/rules/variables_are_used_and_defined_spec.rb
319
345
  - spec/graph_ql/static_validation/type_stack_spec.rb
320
346
  - spec/graph_ql/static_validation/validator_spec.rb
347
+ - spec/graph_ql/types/enum_spec.rb
321
348
  - spec/graph_ql/types/input_object_type_spec.rb
349
+ - spec/graph_ql/types/interface_spec.rb
322
350
  - spec/graph_ql/types/object_type_spec.rb
323
- - spec/graph_ql/union_spec.rb
351
+ - spec/graph_ql/types/union_spec.rb
324
352
  - spec/spec_helper.rb
325
353
  - spec/support/dummy_app.rb
326
354
  - spec/support/dummy_data.rb
@@ -1,5 +0,0 @@
1
- module GraphQL::NonNullWithBang
2
- def !
3
- GraphQL::NonNullType.new(of_type: self)
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe GraphQL::Enum do
4
- let(:enum) { DairyAnimalEnum }
5
- end