graphql 1.9.0.pre1 → 1.9.0.pre2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/graphql.rb +5 -1
- data/lib/graphql/analysis/ast/analyzer.rb +1 -1
- data/lib/graphql/analysis/ast/visitor.rb +6 -1
- data/lib/graphql/backwards_compatibility.rb +1 -1
- data/lib/graphql/dig.rb +19 -0
- data/lib/graphql/directive.rb +13 -1
- data/lib/graphql/directive/include_directive.rb +1 -7
- data/lib/graphql/directive/skip_directive.rb +1 -8
- data/lib/graphql/execution/interpreter.rb +23 -13
- data/lib/graphql/execution/interpreter/resolve.rb +56 -0
- data/lib/graphql/execution/interpreter/runtime.rb +174 -74
- data/lib/graphql/execution/lazy.rb +7 -1
- data/lib/graphql/execution/lookahead.rb +71 -6
- data/lib/graphql/execution_error.rb +1 -1
- data/lib/graphql/introspection/entry_points.rb +5 -1
- data/lib/graphql/introspection/type_type.rb +4 -4
- data/lib/graphql/language.rb +0 -1
- data/lib/graphql/language/block_string.rb +37 -0
- data/lib/graphql/language/document_from_schema_definition.rb +1 -1
- data/lib/graphql/language/lexer.rb +55 -36
- data/lib/graphql/language/lexer.rl +8 -3
- data/lib/graphql/language/nodes.rb +27 -4
- data/lib/graphql/language/parser.rb +55 -55
- data/lib/graphql/language/parser.y +11 -11
- data/lib/graphql/language/printer.rb +1 -1
- data/lib/graphql/language/visitor.rb +22 -13
- data/lib/graphql/literal_validation_error.rb +6 -0
- data/lib/graphql/query.rb +13 -0
- data/lib/graphql/query/arguments.rb +2 -1
- data/lib/graphql/query/context.rb +3 -10
- data/lib/graphql/query/executor.rb +1 -1
- data/lib/graphql/query/validation_pipeline.rb +1 -1
- data/lib/graphql/relay/connection_resolve.rb +1 -1
- data/lib/graphql/relay/relation_connection.rb +1 -1
- data/lib/graphql/schema.rb +81 -11
- data/lib/graphql/schema/argument.rb +1 -1
- data/lib/graphql/schema/build_from_definition.rb +2 -4
- data/lib/graphql/schema/directive.rb +103 -0
- data/lib/graphql/schema/directive/feature.rb +66 -0
- data/lib/graphql/schema/directive/include.rb +25 -0
- data/lib/graphql/schema/directive/skip.rb +25 -0
- data/lib/graphql/schema/directive/transform.rb +48 -0
- data/lib/graphql/schema/enum_value.rb +2 -2
- data/lib/graphql/schema/field.rb +63 -17
- data/lib/graphql/schema/input_object.rb +1 -0
- data/lib/graphql/schema/member/base_dsl_methods.rb +4 -2
- data/lib/graphql/schema/member/build_type.rb +33 -1
- data/lib/graphql/schema/member/has_fields.rb +8 -73
- data/lib/graphql/schema/relay_classic_mutation.rb +6 -1
- data/lib/graphql/schema/resolver.rb +1 -1
- data/lib/graphql/static_validation.rb +2 -1
- data/lib/graphql/static_validation/all_rules.rb +1 -0
- data/lib/graphql/static_validation/base_visitor.rb +25 -10
- data/lib/graphql/static_validation/definition_dependencies.rb +3 -3
- data/lib/graphql/static_validation/{message.rb → error.rb} +11 -11
- data/lib/graphql/static_validation/interpreter_visitor.rb +14 -0
- data/lib/graphql/static_validation/literal_validator.rb +54 -11
- data/lib/graphql/static_validation/rules/argument_literals_are_compatible.rb +34 -5
- data/lib/graphql/static_validation/rules/argument_literals_are_compatible_error.rb +31 -0
- data/lib/graphql/static_validation/rules/argument_names_are_unique.rb +2 -2
- data/lib/graphql/static_validation/rules/argument_names_are_unique_error.rb +30 -0
- data/lib/graphql/static_validation/rules/arguments_are_defined.rb +7 -1
- data/lib/graphql/static_validation/rules/arguments_are_defined_error.rb +35 -0
- data/lib/graphql/static_validation/rules/directives_are_defined.rb +5 -1
- data/lib/graphql/static_validation/rules/directives_are_defined_error.rb +29 -0
- data/lib/graphql/static_validation/rules/directives_are_in_valid_locations.rb +11 -2
- data/lib/graphql/static_validation/rules/directives_are_in_valid_locations_error.rb +31 -0
- data/lib/graphql/static_validation/rules/fields_are_defined_on_type.rb +11 -2
- data/lib/graphql/static_validation/rules/fields_are_defined_on_type_error.rb +32 -0
- data/lib/graphql/static_validation/rules/fields_have_appropriate_selections.rb +14 -2
- data/lib/graphql/static_validation/rules/fields_have_appropriate_selections_error.rb +31 -0
- data/lib/graphql/static_validation/rules/fields_will_merge.rb +24 -6
- data/lib/graphql/static_validation/rules/fields_will_merge_error.rb +32 -0
- data/lib/graphql/static_validation/rules/fragment_names_are_unique.rb +5 -1
- data/lib/graphql/static_validation/rules/fragment_names_are_unique_error.rb +29 -0
- data/lib/graphql/static_validation/rules/fragment_spreads_are_possible.rb +8 -1
- data/lib/graphql/static_validation/rules/fragment_spreads_are_possible_error.rb +35 -0
- data/lib/graphql/static_validation/rules/fragment_types_exist.rb +5 -1
- data/lib/graphql/static_validation/rules/fragment_types_exist_error.rb +29 -0
- data/lib/graphql/static_validation/rules/fragments_are_finite.rb +6 -1
- data/lib/graphql/static_validation/rules/fragments_are_finite_error.rb +29 -0
- data/lib/graphql/static_validation/rules/fragments_are_named.rb +4 -1
- data/lib/graphql/static_validation/rules/fragments_are_named_error.rb +26 -0
- data/lib/graphql/static_validation/rules/fragments_are_on_composite_types.rb +5 -1
- data/lib/graphql/static_validation/rules/fragments_are_on_composite_types_error.rb +30 -0
- data/lib/graphql/static_validation/rules/fragments_are_used.rb +13 -3
- data/lib/graphql/static_validation/rules/fragments_are_used_error.rb +29 -0
- data/lib/graphql/static_validation/rules/mutation_root_exists.rb +4 -1
- data/lib/graphql/static_validation/rules/mutation_root_exists_error.rb +26 -0
- data/lib/graphql/static_validation/rules/no_definitions_are_present.rb +2 -2
- data/lib/graphql/static_validation/rules/no_definitions_are_present_error.rb +25 -0
- data/lib/graphql/static_validation/rules/operation_names_are_valid.rb +9 -2
- data/lib/graphql/static_validation/rules/operation_names_are_valid_error.rb +28 -0
- data/lib/graphql/static_validation/rules/required_arguments_are_present.rb +7 -1
- data/lib/graphql/static_validation/rules/required_arguments_are_present_error.rb +35 -0
- data/lib/graphql/static_validation/rules/required_input_object_attributes_are_present.rb +47 -0
- data/lib/graphql/static_validation/rules/required_input_object_attributes_are_present_error.rb +35 -0
- data/lib/graphql/static_validation/rules/subscription_root_exists.rb +4 -1
- data/lib/graphql/static_validation/rules/subscription_root_exists_error.rb +26 -0
- data/lib/graphql/static_validation/rules/unique_directives_per_location.rb +4 -3
- data/lib/graphql/static_validation/rules/unique_directives_per_location_error.rb +29 -0
- data/lib/graphql/static_validation/rules/variable_default_values_are_correctly_typed.rb +20 -6
- data/lib/graphql/static_validation/rules/variable_default_values_are_correctly_typed_error.rb +39 -0
- data/lib/graphql/static_validation/rules/variable_names_are_unique.rb +5 -1
- data/lib/graphql/static_validation/rules/variable_names_are_unique_error.rb +29 -0
- data/lib/graphql/static_validation/rules/variable_usages_are_allowed.rb +8 -1
- data/lib/graphql/static_validation/rules/variable_usages_are_allowed_error.rb +38 -0
- data/lib/graphql/static_validation/rules/variables_are_input_types.rb +12 -2
- data/lib/graphql/static_validation/rules/variables_are_input_types_error.rb +32 -0
- data/lib/graphql/static_validation/rules/variables_are_used_and_defined.rb +18 -2
- data/lib/graphql/static_validation/rules/variables_are_used_and_defined_error.rb +37 -0
- data/lib/graphql/static_validation/validator.rb +24 -14
- data/lib/graphql/tracing/new_relic_tracing.rb +2 -2
- data/lib/graphql/tracing/skylight_tracing.rb +2 -2
- data/lib/graphql/unauthorized_field_error.rb +23 -0
- data/lib/graphql/version.rb +1 -1
- data/spec/graphql/analysis/ast_spec.rb +40 -0
- data/spec/graphql/authorization_spec.rb +93 -20
- data/spec/graphql/base_type_spec.rb +3 -1
- data/spec/graphql/execution/interpreter_spec.rb +127 -4
- data/spec/graphql/execution/lazy_spec.rb +49 -0
- data/spec/graphql/execution/lookahead_spec.rb +113 -21
- data/spec/graphql/execution/multiplex_spec.rb +2 -1
- data/spec/graphql/introspection/type_type_spec.rb +1 -1
- data/spec/graphql/language/lexer_spec.rb +72 -3
- data/spec/graphql/language/printer_spec.rb +18 -6
- data/spec/graphql/query/arguments_spec.rb +21 -0
- data/spec/graphql/query/context_spec.rb +10 -0
- data/spec/graphql/schema/build_from_definition_spec.rb +144 -29
- data/spec/graphql/schema/directive/feature_spec.rb +81 -0
- data/spec/graphql/schema/directive/transform_spec.rb +39 -0
- data/spec/graphql/schema/enum_spec.rb +5 -3
- data/spec/graphql/schema/field_extension_spec.rb +3 -3
- data/spec/graphql/schema/field_spec.rb +19 -0
- data/spec/graphql/schema/input_object_spec.rb +81 -0
- data/spec/graphql/schema/member/build_type_spec.rb +46 -0
- data/spec/graphql/schema/member/scoped_spec.rb +3 -3
- data/spec/graphql/schema/printer_spec.rb +244 -96
- data/spec/graphql/schema/relay_classic_mutation_spec.rb +26 -0
- data/spec/graphql/schema/resolver_spec.rb +1 -1
- data/spec/graphql/schema/warden_spec.rb +35 -11
- data/spec/graphql/static_validation/rules/argument_literals_are_compatible_spec.rb +212 -72
- data/spec/graphql/static_validation/rules/argument_names_are_unique_spec.rb +2 -2
- data/spec/graphql/static_validation/rules/arguments_are_defined_spec.rb +72 -29
- data/spec/graphql/static_validation/rules/directives_are_defined_spec.rb +4 -2
- data/spec/graphql/static_validation/rules/directives_are_in_valid_locations_spec.rb +4 -2
- data/spec/graphql/static_validation/rules/fields_are_defined_on_type_spec.rb +10 -5
- data/spec/graphql/static_validation/rules/fields_have_appropriate_selections_spec.rb +10 -5
- data/spec/graphql/static_validation/rules/fields_will_merge_spec.rb +2 -1
- data/spec/graphql/static_validation/rules/fragment_names_are_unique_spec.rb +2 -1
- data/spec/graphql/static_validation/rules/fragment_spreads_are_possible_spec.rb +6 -3
- data/spec/graphql/static_validation/rules/fragment_types_exist_spec.rb +4 -2
- data/spec/graphql/static_validation/rules/fragments_are_finite_spec.rb +4 -2
- data/spec/graphql/static_validation/rules/fragments_are_named_spec.rb +2 -1
- data/spec/graphql/static_validation/rules/fragments_are_on_composite_types_spec.rb +6 -3
- data/spec/graphql/static_validation/rules/fragments_are_used_spec.rb +22 -2
- data/spec/graphql/static_validation/rules/mutation_root_exists_spec.rb +2 -1
- data/spec/graphql/static_validation/rules/operation_names_are_valid_spec.rb +6 -3
- data/spec/graphql/static_validation/rules/required_arguments_are_present_spec.rb +13 -4
- data/spec/graphql/static_validation/rules/required_input_object_attributes_are_present_spec.rb +58 -0
- data/spec/graphql/static_validation/rules/subscription_root_exists_spec.rb +2 -1
- data/spec/graphql/static_validation/rules/unique_directives_per_location_spec.rb +14 -7
- data/spec/graphql/static_validation/rules/variable_default_values_are_correctly_typed_spec.rb +14 -7
- data/spec/graphql/static_validation/rules/variable_usages_are_allowed_spec.rb +8 -4
- data/spec/graphql/static_validation/rules/variables_are_input_types_spec.rb +8 -4
- data/spec/graphql/static_validation/rules/variables_are_used_and_defined_spec.rb +6 -3
- data/spec/graphql/static_validation/validator_spec.rb +6 -4
- data/spec/graphql/tracing/new_relic_tracing_spec.rb +10 -0
- data/spec/graphql/tracing/skylight_tracing_spec.rb +10 -0
- data/spec/graphql/types/iso_8601_date_time_spec.rb +1 -2
- data/spec/integration/mongoid/star_trek/schema.rb +5 -5
- data/spec/integration/rails/graphql/relay/relation_connection_spec.rb +37 -8
- data/spec/integration/rails/graphql/schema_spec.rb +2 -2
- data/spec/integration/rails/spec_helper.rb +10 -0
- data/spec/integration/tmp/app/graphql/types/bird_type.rb +7 -0
- data/spec/integration/tmp/dummy/Gemfile +45 -0
- data/spec/integration/tmp/dummy/README.rdoc +28 -0
- data/spec/integration/tmp/dummy/Rakefile +6 -0
- data/spec/integration/tmp/dummy/app/assets/javascripts/application.js +16 -0
- data/spec/integration/tmp/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/integration/tmp/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/integration/tmp/dummy/app/controllers/graphql_controller.rb +43 -0
- data/spec/integration/tmp/dummy/app/graphql/dummy_schema.rb +34 -0
- data/spec/integration/tmp/dummy/app/graphql/types/base_enum.rb +4 -0
- data/spec/integration/tmp/dummy/app/graphql/types/base_input_object.rb +4 -0
- data/spec/integration/tmp/dummy/app/graphql/types/base_interface.rb +5 -0
- data/spec/integration/tmp/dummy/app/graphql/types/base_object.rb +4 -0
- data/spec/integration/tmp/dummy/app/graphql/types/base_scalar.rb +4 -0
- data/spec/integration/tmp/dummy/app/graphql/types/base_union.rb +4 -0
- data/spec/integration/tmp/dummy/app/graphql/types/mutation_type.rb +10 -0
- data/spec/integration/tmp/dummy/app/graphql/types/query_type.rb +15 -0
- data/spec/integration/tmp/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/integration/tmp/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/integration/tmp/dummy/bin/bundle +3 -0
- data/spec/integration/tmp/dummy/bin/rails +4 -0
- data/spec/integration/tmp/dummy/bin/rake +4 -0
- data/spec/integration/tmp/dummy/bin/setup +29 -0
- data/spec/integration/tmp/dummy/config.ru +4 -0
- data/spec/integration/tmp/dummy/config/application.rb +32 -0
- data/spec/integration/tmp/dummy/config/boot.rb +3 -0
- data/spec/integration/tmp/dummy/config/environment.rb +5 -0
- data/spec/integration/tmp/dummy/config/environments/development.rb +38 -0
- data/spec/integration/tmp/dummy/config/environments/production.rb +76 -0
- data/spec/integration/tmp/dummy/config/environments/test.rb +42 -0
- data/spec/integration/tmp/dummy/config/initializers/assets.rb +11 -0
- data/spec/integration/tmp/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/integration/tmp/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/integration/tmp/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/integration/tmp/dummy/config/initializers/inflections.rb +16 -0
- data/spec/integration/tmp/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/integration/tmp/dummy/config/initializers/session_store.rb +3 -0
- data/spec/integration/tmp/dummy/config/initializers/to_time_preserves_timezone.rb +10 -0
- data/spec/integration/tmp/dummy/config/initializers/wrap_parameters.rb +9 -0
- data/spec/integration/tmp/dummy/config/locales/en.yml +23 -0
- data/spec/integration/tmp/dummy/config/routes.rb +61 -0
- data/spec/integration/tmp/dummy/config/secrets.yml +22 -0
- data/spec/integration/tmp/dummy/db/seeds.rb +7 -0
- data/spec/integration/tmp/dummy/public/404.html +67 -0
- data/spec/integration/tmp/dummy/public/422.html +67 -0
- data/spec/integration/tmp/dummy/public/500.html +66 -0
- data/spec/integration/tmp/dummy/public/favicon.ico +0 -0
- data/spec/integration/tmp/dummy/public/robots.txt +5 -0
- data/spec/support/dummy/schema.rb +2 -2
- data/spec/support/error_bubbling_helpers.rb +23 -0
- data/spec/support/jazz.rb +53 -6
- data/spec/support/lazy_helpers.rb +26 -8
- data/spec/support/new_relic.rb +3 -0
- data/spec/support/skylight.rb +3 -0
- data/spec/support/star_wars/schema.rb +13 -9
- data/spec/support/static_validation_helpers.rb +3 -1
- metadata +145 -22
- data/lib/graphql/language/comments.rb +0 -45
- data/spec/graphql/schema/member/has_fields_spec.rb +0 -132
- data/spec/integration/tmp/app/graphql/types/family_type.rb +0 -9
@@ -0,0 +1,66 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
|
+
|
34
|
+
h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
54
|
+
</style>
|
55
|
+
</head>
|
56
|
+
|
57
|
+
<body>
|
58
|
+
<!-- This file lives in public/500.html -->
|
59
|
+
<div class="dialog">
|
60
|
+
<div>
|
61
|
+
<h1>We're sorry, but something went wrong.</h1>
|
62
|
+
</div>
|
63
|
+
<p>If you are the application owner check the logs for more information.</p>
|
64
|
+
</div>
|
65
|
+
</body>
|
66
|
+
</html>
|
File without changes
|
@@ -354,7 +354,7 @@ module Dummy
|
|
354
354
|
COWS.values + GOATS.values
|
355
355
|
end
|
356
356
|
|
357
|
-
field :all_animal_as_cow, [AnimalAsCow, null: true], null: false,
|
357
|
+
field :all_animal_as_cow, [AnimalAsCow, null: true], null: false, resolver_method: :all_animal
|
358
358
|
|
359
359
|
field :all_dairy, [DairyProduct, null: true], null: true do
|
360
360
|
argument :execution_error_at_index, Integer, required: false
|
@@ -372,7 +372,7 @@ module Dummy
|
|
372
372
|
CHEESES.values + MILKS.values
|
373
373
|
end
|
374
374
|
|
375
|
-
field :all_edible_as_milk, [EdibleAsMilk, null: true], null: true,
|
375
|
+
field :all_edible_as_milk, [EdibleAsMilk, null: true], null: true, resolver_method: :all_edible
|
376
376
|
|
377
377
|
field :error, String, null: true, description: "Raise an error"
|
378
378
|
def error
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# helpers to enable / disable error bubbling in a block scope
|
3
|
+
module ErrorBubblingHelpers
|
4
|
+
def without_error_bubbling(schema)
|
5
|
+
original_error_bubbling = schema.error_bubbling
|
6
|
+
begin
|
7
|
+
schema.error_bubbling = false
|
8
|
+
yield if block_given?
|
9
|
+
ensure
|
10
|
+
schema.error_bubbling = original_error_bubbling
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def with_error_bubbling(schema)
|
15
|
+
original_error_bubbling = schema.error_bubbling
|
16
|
+
begin
|
17
|
+
schema.error_bubbling = true
|
18
|
+
yield if block_given?
|
19
|
+
ensure
|
20
|
+
schema.error_bubbling = original_error_bubbling
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/spec/support/jazz.rb
CHANGED
@@ -151,7 +151,7 @@ module Jazz
|
|
151
151
|
null: false,
|
152
152
|
description: "A unique identifier for this object",
|
153
153
|
)
|
154
|
-
upcased_field :upcased_id, ID, null: false,
|
154
|
+
upcased_field :upcased_id, ID, null: false, resolver_method: :id # upcase: true added by helper
|
155
155
|
|
156
156
|
def id
|
157
157
|
GloballyIdentifiableType.to_id(@object)
|
@@ -191,7 +191,7 @@ module Jazz
|
|
191
191
|
class Ensemble < ObjectWithUpcasedName
|
192
192
|
# Test string type names
|
193
193
|
# This method should override inherited one
|
194
|
-
field :name, "String", null: false,
|
194
|
+
field :name, "String", null: false, resolver_method: :overridden_name
|
195
195
|
implements GloballyIdentifiableType, NamedEntity, HasMusicians
|
196
196
|
description "A group of musicians playing together"
|
197
197
|
config :config, :configged
|
@@ -219,6 +219,7 @@ module Jazz
|
|
219
219
|
value "KEYS" do
|
220
220
|
description "Neither here nor there, really"
|
221
221
|
end
|
222
|
+
value "SILENCE", "Makes no sound", value: false
|
222
223
|
end
|
223
224
|
|
224
225
|
# Lives side-by-side with an old-style definition
|
@@ -363,10 +364,10 @@ module Jazz
|
|
363
364
|
argument :input, [RawJson], required: true
|
364
365
|
end
|
365
366
|
|
366
|
-
field :upcase_check_1, String, null: true,
|
367
|
-
field :upcase_check_2, String, null: false, upcase: false,
|
368
|
-
field :upcase_check_3, String, null: false, upcase: true,
|
369
|
-
field :upcase_check_4, String, null: false, upcase: "why not?",
|
367
|
+
field :upcase_check_1, String, null: true, resolver_method: :upcase_check, extras: [:upcase]
|
368
|
+
field :upcase_check_2, String, null: false, upcase: false, resolver_method: :upcase_check, extras: [:upcase]
|
369
|
+
field :upcase_check_3, String, null: false, upcase: true, resolver_method: :upcase_check, extras: [:upcase]
|
370
|
+
field :upcase_check_4, String, null: false, upcase: "why not?", resolver_method: :upcase_check, extras: [:upcase]
|
370
371
|
def upcase_check(upcase:)
|
371
372
|
upcase.inspect
|
372
373
|
end
|
@@ -455,6 +456,20 @@ module Jazz
|
|
455
456
|
def named_entities
|
456
457
|
[Models.data["Ensemble"].first, nil]
|
457
458
|
end
|
459
|
+
|
460
|
+
field :default_value_test, String, null: false do
|
461
|
+
if TESTING_INTERPRETER
|
462
|
+
argument :arg_with_default, InspectableInput, required: false, default_value: { string_value: "S" }
|
463
|
+
else
|
464
|
+
argument :arg_with_default, InspectableInput, required: false, default_value: { "stringValue" => "S" }
|
465
|
+
end
|
466
|
+
end
|
467
|
+
|
468
|
+
def default_value_test(arg_with_default:)
|
469
|
+
"#{arg_with_default.class.name} -> #{arg_with_default.to_h}"
|
470
|
+
end
|
471
|
+
|
472
|
+
field :complex_hash_key, String, null: false, hash_key: :'foo bar/fizz-buzz'
|
458
473
|
end
|
459
474
|
|
460
475
|
class EnsembleInput < GraphQL::Schema::InputObject
|
@@ -495,6 +510,24 @@ module Jazz
|
|
495
510
|
end
|
496
511
|
end
|
497
512
|
|
513
|
+
class HasExtras < GraphQL::Schema::RelayClassicMutation
|
514
|
+
null true
|
515
|
+
description "Test extras in RelayClassicMutation"
|
516
|
+
|
517
|
+
argument :int, Integer, required: false
|
518
|
+
extras [:ast_node]
|
519
|
+
|
520
|
+
field :node_class, String, null: false
|
521
|
+
field :int, Integer, null: true
|
522
|
+
|
523
|
+
def resolve(int: nil, ast_node:)
|
524
|
+
{
|
525
|
+
int: int,
|
526
|
+
node_class: ast_node.class.name,
|
527
|
+
}
|
528
|
+
end
|
529
|
+
end
|
530
|
+
|
498
531
|
class RenameNamedEntity < GraphQL::Schema::RelayClassicMutation
|
499
532
|
argument :named_entity_id, ID, required: true, loads: NamedEntity
|
500
533
|
argument :new_name, String, required: true
|
@@ -603,6 +636,7 @@ module Jazz
|
|
603
636
|
field :upvote_ensembles_as_bands, mutation: UpvoteEnsemblesAsBands
|
604
637
|
field :upvote_ensembles_ids, mutation: UpvoteEnsemblesIds
|
605
638
|
field :rename_ensemble_as_band, mutation: RenameEnsembleAsBand
|
639
|
+
field :has_extras, mutation: HasExtras
|
606
640
|
|
607
641
|
def add_ensemble(input:)
|
608
642
|
ens = Models::Ensemble.new(input.name)
|
@@ -652,6 +686,18 @@ module Jazz
|
|
652
686
|
end
|
653
687
|
end
|
654
688
|
|
689
|
+
class NestedType < GraphQL::Introspection::TypeType
|
690
|
+
def name
|
691
|
+
object.name.upcase
|
692
|
+
end
|
693
|
+
|
694
|
+
class DeeplyNestedType < GraphQL::Introspection::TypeType
|
695
|
+
def name
|
696
|
+
object.name.upcase
|
697
|
+
end
|
698
|
+
end
|
699
|
+
end
|
700
|
+
|
655
701
|
class SchemaType < GraphQL::Introspection::SchemaType
|
656
702
|
graphql_name "__Schema"
|
657
703
|
|
@@ -705,6 +751,7 @@ module Jazz
|
|
705
751
|
end
|
706
752
|
if TESTING_INTERPRETER
|
707
753
|
use GraphQL::Execution::Interpreter
|
754
|
+
use GraphQL::Analysis::AST
|
708
755
|
end
|
709
756
|
end
|
710
757
|
end
|
@@ -1,5 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
module LazyHelpers
|
3
|
+
MAGIC_NUMBER_WITH_LAZY_AUTHORIZED_HOOK = 44
|
4
|
+
MAGIC_NUMBER_THAT_RETURNS_NIL = 0
|
5
|
+
MAGIC_NUMBER_THAT_RAISES_ERROR = 13
|
3
6
|
class Wrapper
|
4
7
|
def initialize(item = nil, &block)
|
5
8
|
if block
|
@@ -49,7 +52,19 @@ module LazyHelpers
|
|
49
52
|
class LazySum < GraphQL::Schema::Object
|
50
53
|
field :value, Integer, null: true
|
51
54
|
def value
|
52
|
-
object ==
|
55
|
+
if object == MAGIC_NUMBER_THAT_RAISES_ERROR
|
56
|
+
nil
|
57
|
+
else
|
58
|
+
object
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
def self.authorized?(obj, ctx)
|
63
|
+
if obj == MAGIC_NUMBER_WITH_LAZY_AUTHORIZED_HOOK
|
64
|
+
Wrapper.new { true }
|
65
|
+
else
|
66
|
+
true
|
67
|
+
end
|
53
68
|
end
|
54
69
|
|
55
70
|
field :nestedSum, LazySum, null: false do
|
@@ -57,7 +72,7 @@ module LazyHelpers
|
|
57
72
|
end
|
58
73
|
|
59
74
|
def nested_sum(value:)
|
60
|
-
if value ==
|
75
|
+
if value == MAGIC_NUMBER_THAT_RAISES_ERROR
|
61
76
|
Wrapper.new(nil)
|
62
77
|
else
|
63
78
|
SumAll.new(@object + value)
|
@@ -98,18 +113,20 @@ module LazyHelpers
|
|
98
113
|
end
|
99
114
|
|
100
115
|
def nullable_nested_sum(value:)
|
101
|
-
if value ==
|
102
|
-
Wrapper.new { raise GraphQL::ExecutionError.new("
|
116
|
+
if value == MAGIC_NUMBER_THAT_RAISES_ERROR
|
117
|
+
Wrapper.new { raise GraphQL::ExecutionError.new("#{MAGIC_NUMBER_THAT_RAISES_ERROR} is unlucky") }
|
118
|
+
elsif value == MAGIC_NUMBER_THAT_RETURNS_NIL
|
119
|
+
nil
|
103
120
|
else
|
104
121
|
SumAll.new(value)
|
105
122
|
end
|
106
123
|
end
|
107
124
|
|
108
|
-
field :list_sum, [LazySum], null: true do
|
125
|
+
field :list_sum, [LazySum, null: true], null: true do
|
109
126
|
argument :values, [Integer], required: true
|
110
127
|
end
|
111
128
|
def list_sum(values:)
|
112
|
-
values
|
129
|
+
values.map { |v| v == MAGIC_NUMBER_THAT_RETURNS_NIL ? nil : v }
|
113
130
|
end
|
114
131
|
end
|
115
132
|
|
@@ -156,6 +173,7 @@ module LazyHelpers
|
|
156
173
|
|
157
174
|
if TESTING_INTERPRETER
|
158
175
|
use GraphQL::Execution::Interpreter
|
176
|
+
use GraphQL::Analysis::AST
|
159
177
|
end
|
160
178
|
|
161
179
|
def self.sync_lazy(lazy)
|
@@ -168,7 +186,7 @@ module LazyHelpers
|
|
168
186
|
end
|
169
187
|
end
|
170
188
|
|
171
|
-
def run_query(query_str)
|
172
|
-
LazySchema.execute(query_str)
|
189
|
+
def run_query(query_str, **rest)
|
190
|
+
LazySchema.execute(query_str, **rest)
|
173
191
|
end
|
174
192
|
end
|
data/spec/support/new_relic.rb
CHANGED
@@ -6,9 +6,11 @@ end
|
|
6
6
|
|
7
7
|
module NewRelic
|
8
8
|
TRANSACTION_NAMES = []
|
9
|
+
EXECUTION_SCOPES = []
|
9
10
|
# Reset state between tests
|
10
11
|
def self.clear_all
|
11
12
|
TRANSACTION_NAMES.clear
|
13
|
+
EXECUTION_SCOPES.clear
|
12
14
|
end
|
13
15
|
module Agent
|
14
16
|
def self.set_transaction_name(name)
|
@@ -17,6 +19,7 @@ module NewRelic
|
|
17
19
|
|
18
20
|
module MethodTracerHelpers
|
19
21
|
def self.trace_execution_scoped(trace_name)
|
22
|
+
EXECUTION_SCOPES << trace_name
|
20
23
|
yield
|
21
24
|
end
|
22
25
|
end
|
data/spec/support/skylight.rb
CHANGED
@@ -9,9 +9,11 @@ end
|
|
9
9
|
|
10
10
|
module Skylight
|
11
11
|
ENDPOINT_NAMES = []
|
12
|
+
TITLE_NAMES = []
|
12
13
|
# Reset state between tests
|
13
14
|
def self.clear_all
|
14
15
|
ENDPOINT_NAMES.clear
|
16
|
+
TITLE_NAMES.clear
|
15
17
|
end
|
16
18
|
|
17
19
|
def self.instrumenter
|
@@ -19,6 +21,7 @@ module Skylight
|
|
19
21
|
end
|
20
22
|
|
21
23
|
def self.instrument(category:, title:)
|
24
|
+
TITLE_NAMES << title
|
22
25
|
yield
|
23
26
|
end
|
24
27
|
|
@@ -159,14 +159,18 @@ module StarWars
|
|
159
159
|
field :shipsWithMaxPageSize, "Ships with max page size", max_page_size: 2, resolver: ShipsWithMaxPageSize
|
160
160
|
|
161
161
|
field :bases, BasesConnectionWithTotalCountType, null: true, connection: true do
|
162
|
-
argument :
|
162
|
+
argument :nameIncludes, String, required: false
|
163
|
+
argument :complexOrder, Boolean, required: false
|
163
164
|
end
|
164
165
|
|
165
|
-
def bases(name_includes: nil)
|
166
|
+
def bases(name_includes: nil, complex_order: nil)
|
166
167
|
all_bases = Base.where(id: object.bases)
|
167
168
|
if name_includes
|
168
169
|
all_bases = all_bases.where("name LIKE ?", "%#{name_includes}%")
|
169
170
|
end
|
171
|
+
if complex_order
|
172
|
+
all_bases = all_bases.order("bases.name DESC")
|
173
|
+
end
|
170
174
|
all_bases
|
171
175
|
end
|
172
176
|
|
@@ -190,12 +194,12 @@ module StarWars
|
|
190
194
|
all_bases.to_a
|
191
195
|
end
|
192
196
|
|
193
|
-
field :basesWithMaxLimitRelation, BaseConnection, null: true, max_page_size: 2,
|
194
|
-
field :basesWithMaxLimitArray, BaseConnection, null: true, max_page_size: 2,
|
195
|
-
field :basesWithDefaultMaxLimitRelation, BaseConnection, null: true,
|
196
|
-
field :basesWithDefaultMaxLimitArray, BaseConnection, null: true,
|
197
|
-
field :basesWithLargeMaxLimitRelation, BaseConnection, null: true, max_page_size: 1000,
|
198
|
-
field :basesWithoutNodes, BaseConnectionWithoutNodes, null: true,
|
197
|
+
field :basesWithMaxLimitRelation, BaseConnection, null: true, max_page_size: 2, resolver_method: :all_bases
|
198
|
+
field :basesWithMaxLimitArray, BaseConnection, null: true, max_page_size: 2, resolver_method: :all_bases_array
|
199
|
+
field :basesWithDefaultMaxLimitRelation, BaseConnection, null: true, resolver_method: :all_bases
|
200
|
+
field :basesWithDefaultMaxLimitArray, BaseConnection, null: true, resolver_method: :all_bases_array
|
201
|
+
field :basesWithLargeMaxLimitRelation, BaseConnection, null: true, max_page_size: 1000, resolver_method: :all_bases
|
202
|
+
field :basesWithoutNodes, BaseConnectionWithoutNodes, null: true, resolver_method: :all_bases_array
|
199
203
|
|
200
204
|
field :basesAsSequelDataset, BasesConnectionWithTotalCountType, null: true, connection: true, max_page_size: 1000 do
|
201
205
|
argument :nameIncludes, String, required: false
|
@@ -209,7 +213,7 @@ module StarWars
|
|
209
213
|
all_bases
|
210
214
|
end
|
211
215
|
|
212
|
-
field :basesWithCustomEdge, CustomEdgeBaseConnectionType, null: true, connection: true,
|
216
|
+
field :basesWithCustomEdge, CustomEdgeBaseConnectionType, null: true, connection: true, resolver_method: :lazy_bases
|
213
217
|
|
214
218
|
def lazy_bases
|
215
219
|
LazyNodesWrapper.new(object.bases)
|
@@ -25,6 +25,8 @@ module StaticValidationHelpers
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def schema
|
28
|
-
|
28
|
+
# without #graphql_definition call here #errors / #error_messages will reference a different schema object
|
29
|
+
# than the one returned by schema so it's difficult to make changes in specs.
|
30
|
+
Dummy::Schema.graphql_definition
|
29
31
|
end
|
30
32
|
end
|
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: 1.9.0.
|
4
|
+
version: 1.9.0.pre2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Mosolgo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: benchmark-ips
|
@@ -66,20 +66,6 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '2.12'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: guard-bundler
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '2.1'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '2.1'
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
70
|
name: guard-minitest
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -420,6 +406,7 @@ files:
|
|
420
406
|
- lib/graphql/define/non_null_with_bang.rb
|
421
407
|
- lib/graphql/define/type_definer.rb
|
422
408
|
- lib/graphql/deprecated_dsl.rb
|
409
|
+
- lib/graphql/dig.rb
|
423
410
|
- lib/graphql/directive.rb
|
424
411
|
- lib/graphql/directive/deprecated_directive.rb
|
425
412
|
- lib/graphql/directive/include_directive.rb
|
@@ -433,6 +420,7 @@ files:
|
|
433
420
|
- lib/graphql/execution/interpreter.rb
|
434
421
|
- lib/graphql/execution/interpreter/execution_errors.rb
|
435
422
|
- lib/graphql/execution/interpreter/hash_response.rb
|
423
|
+
- lib/graphql/execution/interpreter/resolve.rb
|
436
424
|
- lib/graphql/execution/interpreter/runtime.rb
|
437
425
|
- lib/graphql/execution/lazy.rb
|
438
426
|
- lib/graphql/execution/lazy/lazy_method_map.rb
|
@@ -474,7 +462,6 @@ files:
|
|
474
462
|
- lib/graphql/invalid_null_error.rb
|
475
463
|
- lib/graphql/language.rb
|
476
464
|
- lib/graphql/language/block_string.rb
|
477
|
-
- lib/graphql/language/comments.rb
|
478
465
|
- lib/graphql/language/definition_slice.rb
|
479
466
|
- lib/graphql/language/document_from_schema_definition.rb
|
480
467
|
- lib/graphql/language/generation.rb
|
@@ -487,6 +474,7 @@ files:
|
|
487
474
|
- lib/graphql/language/token.rb
|
488
475
|
- lib/graphql/language/visitor.rb
|
489
476
|
- lib/graphql/list_type.rb
|
477
|
+
- lib/graphql/literal_validation_error.rb
|
490
478
|
- lib/graphql/name_validator.rb
|
491
479
|
- lib/graphql/non_null_type.rb
|
492
480
|
- lib/graphql/object_type.rb
|
@@ -544,6 +532,11 @@ files:
|
|
544
532
|
- lib/graphql/schema/catchall_middleware.rb
|
545
533
|
- lib/graphql/schema/default_parse_error.rb
|
546
534
|
- lib/graphql/schema/default_type_error.rb
|
535
|
+
- lib/graphql/schema/directive.rb
|
536
|
+
- lib/graphql/schema/directive/feature.rb
|
537
|
+
- lib/graphql/schema/directive/include.rb
|
538
|
+
- lib/graphql/schema/directive/skip.rb
|
539
|
+
- lib/graphql/schema/directive/transform.rb
|
547
540
|
- lib/graphql/schema/enum.rb
|
548
541
|
- lib/graphql/schema/enum_value.rb
|
549
542
|
- lib/graphql/schema/field.rb
|
@@ -595,35 +588,64 @@ files:
|
|
595
588
|
- lib/graphql/static_validation/base_visitor.rb
|
596
589
|
- lib/graphql/static_validation/default_visitor.rb
|
597
590
|
- lib/graphql/static_validation/definition_dependencies.rb
|
591
|
+
- lib/graphql/static_validation/error.rb
|
592
|
+
- lib/graphql/static_validation/interpreter_visitor.rb
|
598
593
|
- lib/graphql/static_validation/literal_validator.rb
|
599
|
-
- lib/graphql/static_validation/message.rb
|
600
594
|
- lib/graphql/static_validation/no_validate_visitor.rb
|
601
595
|
- lib/graphql/static_validation/rules/argument_literals_are_compatible.rb
|
596
|
+
- lib/graphql/static_validation/rules/argument_literals_are_compatible_error.rb
|
602
597
|
- lib/graphql/static_validation/rules/argument_names_are_unique.rb
|
598
|
+
- lib/graphql/static_validation/rules/argument_names_are_unique_error.rb
|
603
599
|
- lib/graphql/static_validation/rules/arguments_are_defined.rb
|
600
|
+
- lib/graphql/static_validation/rules/arguments_are_defined_error.rb
|
604
601
|
- lib/graphql/static_validation/rules/directives_are_defined.rb
|
602
|
+
- lib/graphql/static_validation/rules/directives_are_defined_error.rb
|
605
603
|
- lib/graphql/static_validation/rules/directives_are_in_valid_locations.rb
|
604
|
+
- lib/graphql/static_validation/rules/directives_are_in_valid_locations_error.rb
|
606
605
|
- lib/graphql/static_validation/rules/fields_are_defined_on_type.rb
|
606
|
+
- lib/graphql/static_validation/rules/fields_are_defined_on_type_error.rb
|
607
607
|
- lib/graphql/static_validation/rules/fields_have_appropriate_selections.rb
|
608
|
+
- lib/graphql/static_validation/rules/fields_have_appropriate_selections_error.rb
|
608
609
|
- lib/graphql/static_validation/rules/fields_will_merge.rb
|
610
|
+
- lib/graphql/static_validation/rules/fields_will_merge_error.rb
|
609
611
|
- lib/graphql/static_validation/rules/fragment_names_are_unique.rb
|
612
|
+
- lib/graphql/static_validation/rules/fragment_names_are_unique_error.rb
|
610
613
|
- lib/graphql/static_validation/rules/fragment_spreads_are_possible.rb
|
614
|
+
- lib/graphql/static_validation/rules/fragment_spreads_are_possible_error.rb
|
611
615
|
- lib/graphql/static_validation/rules/fragment_types_exist.rb
|
616
|
+
- lib/graphql/static_validation/rules/fragment_types_exist_error.rb
|
612
617
|
- lib/graphql/static_validation/rules/fragments_are_finite.rb
|
618
|
+
- lib/graphql/static_validation/rules/fragments_are_finite_error.rb
|
613
619
|
- lib/graphql/static_validation/rules/fragments_are_named.rb
|
620
|
+
- lib/graphql/static_validation/rules/fragments_are_named_error.rb
|
614
621
|
- lib/graphql/static_validation/rules/fragments_are_on_composite_types.rb
|
622
|
+
- lib/graphql/static_validation/rules/fragments_are_on_composite_types_error.rb
|
615
623
|
- lib/graphql/static_validation/rules/fragments_are_used.rb
|
624
|
+
- lib/graphql/static_validation/rules/fragments_are_used_error.rb
|
616
625
|
- lib/graphql/static_validation/rules/mutation_root_exists.rb
|
626
|
+
- lib/graphql/static_validation/rules/mutation_root_exists_error.rb
|
617
627
|
- lib/graphql/static_validation/rules/no_definitions_are_present.rb
|
628
|
+
- lib/graphql/static_validation/rules/no_definitions_are_present_error.rb
|
618
629
|
- lib/graphql/static_validation/rules/operation_names_are_valid.rb
|
630
|
+
- lib/graphql/static_validation/rules/operation_names_are_valid_error.rb
|
619
631
|
- lib/graphql/static_validation/rules/required_arguments_are_present.rb
|
632
|
+
- lib/graphql/static_validation/rules/required_arguments_are_present_error.rb
|
633
|
+
- lib/graphql/static_validation/rules/required_input_object_attributes_are_present.rb
|
634
|
+
- lib/graphql/static_validation/rules/required_input_object_attributes_are_present_error.rb
|
620
635
|
- lib/graphql/static_validation/rules/subscription_root_exists.rb
|
636
|
+
- lib/graphql/static_validation/rules/subscription_root_exists_error.rb
|
621
637
|
- lib/graphql/static_validation/rules/unique_directives_per_location.rb
|
638
|
+
- lib/graphql/static_validation/rules/unique_directives_per_location_error.rb
|
622
639
|
- lib/graphql/static_validation/rules/variable_default_values_are_correctly_typed.rb
|
640
|
+
- lib/graphql/static_validation/rules/variable_default_values_are_correctly_typed_error.rb
|
623
641
|
- lib/graphql/static_validation/rules/variable_names_are_unique.rb
|
642
|
+
- lib/graphql/static_validation/rules/variable_names_are_unique_error.rb
|
624
643
|
- lib/graphql/static_validation/rules/variable_usages_are_allowed.rb
|
644
|
+
- lib/graphql/static_validation/rules/variable_usages_are_allowed_error.rb
|
625
645
|
- lib/graphql/static_validation/rules/variables_are_input_types.rb
|
646
|
+
- lib/graphql/static_validation/rules/variables_are_input_types_error.rb
|
626
647
|
- lib/graphql/static_validation/rules/variables_are_used_and_defined.rb
|
648
|
+
- lib/graphql/static_validation/rules/variables_are_used_and_defined_error.rb
|
627
649
|
- lib/graphql/static_validation/type_stack.rb
|
628
650
|
- lib/graphql/static_validation/validation_context.rb
|
629
651
|
- lib/graphql/static_validation/validator.rb
|
@@ -664,6 +686,7 @@ files:
|
|
664
686
|
- lib/graphql/types/relay/page_info.rb
|
665
687
|
- lib/graphql/types/string.rb
|
666
688
|
- lib/graphql/unauthorized_error.rb
|
689
|
+
- lib/graphql/unauthorized_field_error.rb
|
667
690
|
- lib/graphql/union_type.rb
|
668
691
|
- lib/graphql/unresolved_type_error.rb
|
669
692
|
- lib/graphql/upgrader/member.rb
|
@@ -838,6 +861,8 @@ files:
|
|
838
861
|
- spec/graphql/schema/argument_spec.rb
|
839
862
|
- spec/graphql/schema/build_from_definition_spec.rb
|
840
863
|
- spec/graphql/schema/catchall_middleware_spec.rb
|
864
|
+
- spec/graphql/schema/directive/feature_spec.rb
|
865
|
+
- spec/graphql/schema/directive/transform_spec.rb
|
841
866
|
- spec/graphql/schema/enum_spec.rb
|
842
867
|
- spec/graphql/schema/enum_value_spec.rb
|
843
868
|
- spec/graphql/schema/field_extension_spec.rb
|
@@ -851,7 +876,6 @@ files:
|
|
851
876
|
- spec/graphql/schema/loader_spec.rb
|
852
877
|
- spec/graphql/schema/member/accepts_definition_spec.rb
|
853
878
|
- spec/graphql/schema/member/build_type_spec.rb
|
854
|
-
- spec/graphql/schema/member/has_fields_spec.rb
|
855
879
|
- spec/graphql/schema/member/scoped_spec.rb
|
856
880
|
- spec/graphql/schema/member/type_system_helpers_spec.rb
|
857
881
|
- spec/graphql/schema/middleware_chain_spec.rb
|
@@ -889,6 +913,7 @@ files:
|
|
889
913
|
- spec/graphql/static_validation/rules/no_definitions_are_present_spec.rb
|
890
914
|
- spec/graphql/static_validation/rules/operation_names_are_valid_spec.rb
|
891
915
|
- spec/graphql/static_validation/rules/required_arguments_are_present_spec.rb
|
916
|
+
- spec/graphql/static_validation/rules/required_input_object_attributes_are_present_spec.rb
|
892
917
|
- spec/graphql/static_validation/rules/subscription_root_exists_spec.rb
|
893
918
|
- spec/graphql/static_validation/rules/unique_directives_per_location_spec.rb
|
894
919
|
- spec/graphql/static_validation/rules/variable_default_values_are_correctly_typed_spec.rb
|
@@ -941,10 +966,58 @@ files:
|
|
941
966
|
- spec/integration/rails/graphql/schema_spec.rb
|
942
967
|
- spec/integration/rails/graphql/tracing/active_support_notifications_tracing_spec.rb
|
943
968
|
- spec/integration/rails/spec_helper.rb
|
944
|
-
- spec/integration/tmp/app/graphql/types/
|
969
|
+
- spec/integration/tmp/app/graphql/types/bird_type.rb
|
970
|
+
- spec/integration/tmp/dummy/Gemfile
|
971
|
+
- spec/integration/tmp/dummy/README.rdoc
|
972
|
+
- spec/integration/tmp/dummy/Rakefile
|
973
|
+
- spec/integration/tmp/dummy/app/assets/javascripts/application.js
|
974
|
+
- spec/integration/tmp/dummy/app/assets/stylesheets/application.css
|
975
|
+
- spec/integration/tmp/dummy/app/controllers/application_controller.rb
|
976
|
+
- spec/integration/tmp/dummy/app/controllers/graphql_controller.rb
|
977
|
+
- spec/integration/tmp/dummy/app/graphql/dummy_schema.rb
|
978
|
+
- spec/integration/tmp/dummy/app/graphql/types/base_enum.rb
|
979
|
+
- spec/integration/tmp/dummy/app/graphql/types/base_input_object.rb
|
980
|
+
- spec/integration/tmp/dummy/app/graphql/types/base_interface.rb
|
981
|
+
- spec/integration/tmp/dummy/app/graphql/types/base_object.rb
|
982
|
+
- spec/integration/tmp/dummy/app/graphql/types/base_scalar.rb
|
983
|
+
- spec/integration/tmp/dummy/app/graphql/types/base_union.rb
|
984
|
+
- spec/integration/tmp/dummy/app/graphql/types/mutation_type.rb
|
985
|
+
- spec/integration/tmp/dummy/app/graphql/types/query_type.rb
|
986
|
+
- spec/integration/tmp/dummy/app/helpers/application_helper.rb
|
987
|
+
- spec/integration/tmp/dummy/app/views/layouts/application.html.erb
|
988
|
+
- spec/integration/tmp/dummy/bin/bundle
|
989
|
+
- spec/integration/tmp/dummy/bin/rails
|
990
|
+
- spec/integration/tmp/dummy/bin/rake
|
991
|
+
- spec/integration/tmp/dummy/bin/setup
|
992
|
+
- spec/integration/tmp/dummy/config.ru
|
993
|
+
- spec/integration/tmp/dummy/config/application.rb
|
994
|
+
- spec/integration/tmp/dummy/config/boot.rb
|
995
|
+
- spec/integration/tmp/dummy/config/environment.rb
|
996
|
+
- spec/integration/tmp/dummy/config/environments/development.rb
|
997
|
+
- spec/integration/tmp/dummy/config/environments/production.rb
|
998
|
+
- spec/integration/tmp/dummy/config/environments/test.rb
|
999
|
+
- spec/integration/tmp/dummy/config/initializers/assets.rb
|
1000
|
+
- spec/integration/tmp/dummy/config/initializers/backtrace_silencers.rb
|
1001
|
+
- spec/integration/tmp/dummy/config/initializers/cookies_serializer.rb
|
1002
|
+
- spec/integration/tmp/dummy/config/initializers/filter_parameter_logging.rb
|
1003
|
+
- spec/integration/tmp/dummy/config/initializers/inflections.rb
|
1004
|
+
- spec/integration/tmp/dummy/config/initializers/mime_types.rb
|
1005
|
+
- spec/integration/tmp/dummy/config/initializers/session_store.rb
|
1006
|
+
- spec/integration/tmp/dummy/config/initializers/to_time_preserves_timezone.rb
|
1007
|
+
- spec/integration/tmp/dummy/config/initializers/wrap_parameters.rb
|
1008
|
+
- spec/integration/tmp/dummy/config/locales/en.yml
|
1009
|
+
- spec/integration/tmp/dummy/config/routes.rb
|
1010
|
+
- spec/integration/tmp/dummy/config/secrets.yml
|
1011
|
+
- spec/integration/tmp/dummy/db/seeds.rb
|
1012
|
+
- spec/integration/tmp/dummy/public/404.html
|
1013
|
+
- spec/integration/tmp/dummy/public/422.html
|
1014
|
+
- spec/integration/tmp/dummy/public/500.html
|
1015
|
+
- spec/integration/tmp/dummy/public/favicon.ico
|
1016
|
+
- spec/integration/tmp/dummy/public/robots.txt
|
945
1017
|
- spec/spec_helper.rb
|
946
1018
|
- spec/support/dummy/data.rb
|
947
1019
|
- spec/support/dummy/schema.rb
|
1020
|
+
- spec/support/error_bubbling_helpers.rb
|
948
1021
|
- spec/support/global_id.rb
|
949
1022
|
- spec/support/jazz.rb
|
950
1023
|
- spec/support/lazy_helpers.rb
|
@@ -1150,6 +1223,8 @@ test_files:
|
|
1150
1223
|
- spec/graphql/schema/argument_spec.rb
|
1151
1224
|
- spec/graphql/schema/build_from_definition_spec.rb
|
1152
1225
|
- spec/graphql/schema/catchall_middleware_spec.rb
|
1226
|
+
- spec/graphql/schema/directive/feature_spec.rb
|
1227
|
+
- spec/graphql/schema/directive/transform_spec.rb
|
1153
1228
|
- spec/graphql/schema/enum_spec.rb
|
1154
1229
|
- spec/graphql/schema/enum_value_spec.rb
|
1155
1230
|
- spec/graphql/schema/field_extension_spec.rb
|
@@ -1163,7 +1238,6 @@ test_files:
|
|
1163
1238
|
- spec/graphql/schema/loader_spec.rb
|
1164
1239
|
- spec/graphql/schema/member/accepts_definition_spec.rb
|
1165
1240
|
- spec/graphql/schema/member/build_type_spec.rb
|
1166
|
-
- spec/graphql/schema/member/has_fields_spec.rb
|
1167
1241
|
- spec/graphql/schema/member/scoped_spec.rb
|
1168
1242
|
- spec/graphql/schema/member/type_system_helpers_spec.rb
|
1169
1243
|
- spec/graphql/schema/middleware_chain_spec.rb
|
@@ -1201,6 +1275,7 @@ test_files:
|
|
1201
1275
|
- spec/graphql/static_validation/rules/no_definitions_are_present_spec.rb
|
1202
1276
|
- spec/graphql/static_validation/rules/operation_names_are_valid_spec.rb
|
1203
1277
|
- spec/graphql/static_validation/rules/required_arguments_are_present_spec.rb
|
1278
|
+
- spec/graphql/static_validation/rules/required_input_object_attributes_are_present_spec.rb
|
1204
1279
|
- spec/graphql/static_validation/rules/subscription_root_exists_spec.rb
|
1205
1280
|
- spec/graphql/static_validation/rules/unique_directives_per_location_spec.rb
|
1206
1281
|
- spec/graphql/static_validation/rules/variable_default_values_are_correctly_typed_spec.rb
|
@@ -1253,10 +1328,58 @@ test_files:
|
|
1253
1328
|
- spec/integration/rails/graphql/schema_spec.rb
|
1254
1329
|
- spec/integration/rails/graphql/tracing/active_support_notifications_tracing_spec.rb
|
1255
1330
|
- spec/integration/rails/spec_helper.rb
|
1256
|
-
- spec/integration/tmp/app/graphql/types/
|
1331
|
+
- spec/integration/tmp/app/graphql/types/bird_type.rb
|
1332
|
+
- spec/integration/tmp/dummy/app/assets/javascripts/application.js
|
1333
|
+
- spec/integration/tmp/dummy/app/assets/stylesheets/application.css
|
1334
|
+
- spec/integration/tmp/dummy/app/controllers/application_controller.rb
|
1335
|
+
- spec/integration/tmp/dummy/app/controllers/graphql_controller.rb
|
1336
|
+
- spec/integration/tmp/dummy/app/graphql/dummy_schema.rb
|
1337
|
+
- spec/integration/tmp/dummy/app/graphql/types/base_enum.rb
|
1338
|
+
- spec/integration/tmp/dummy/app/graphql/types/base_input_object.rb
|
1339
|
+
- spec/integration/tmp/dummy/app/graphql/types/base_interface.rb
|
1340
|
+
- spec/integration/tmp/dummy/app/graphql/types/base_object.rb
|
1341
|
+
- spec/integration/tmp/dummy/app/graphql/types/base_scalar.rb
|
1342
|
+
- spec/integration/tmp/dummy/app/graphql/types/base_union.rb
|
1343
|
+
- spec/integration/tmp/dummy/app/graphql/types/mutation_type.rb
|
1344
|
+
- spec/integration/tmp/dummy/app/graphql/types/query_type.rb
|
1345
|
+
- spec/integration/tmp/dummy/app/helpers/application_helper.rb
|
1346
|
+
- spec/integration/tmp/dummy/app/views/layouts/application.html.erb
|
1347
|
+
- spec/integration/tmp/dummy/bin/bundle
|
1348
|
+
- spec/integration/tmp/dummy/bin/rails
|
1349
|
+
- spec/integration/tmp/dummy/bin/rake
|
1350
|
+
- spec/integration/tmp/dummy/bin/setup
|
1351
|
+
- spec/integration/tmp/dummy/config/application.rb
|
1352
|
+
- spec/integration/tmp/dummy/config/boot.rb
|
1353
|
+
- spec/integration/tmp/dummy/config/environment.rb
|
1354
|
+
- spec/integration/tmp/dummy/config/environments/development.rb
|
1355
|
+
- spec/integration/tmp/dummy/config/environments/production.rb
|
1356
|
+
- spec/integration/tmp/dummy/config/environments/test.rb
|
1357
|
+
- spec/integration/tmp/dummy/config/initializers/assets.rb
|
1358
|
+
- spec/integration/tmp/dummy/config/initializers/backtrace_silencers.rb
|
1359
|
+
- spec/integration/tmp/dummy/config/initializers/cookies_serializer.rb
|
1360
|
+
- spec/integration/tmp/dummy/config/initializers/filter_parameter_logging.rb
|
1361
|
+
- spec/integration/tmp/dummy/config/initializers/inflections.rb
|
1362
|
+
- spec/integration/tmp/dummy/config/initializers/mime_types.rb
|
1363
|
+
- spec/integration/tmp/dummy/config/initializers/session_store.rb
|
1364
|
+
- spec/integration/tmp/dummy/config/initializers/to_time_preserves_timezone.rb
|
1365
|
+
- spec/integration/tmp/dummy/config/initializers/wrap_parameters.rb
|
1366
|
+
- spec/integration/tmp/dummy/config/locales/en.yml
|
1367
|
+
- spec/integration/tmp/dummy/config/routes.rb
|
1368
|
+
- spec/integration/tmp/dummy/config/secrets.yml
|
1369
|
+
- spec/integration/tmp/dummy/config.ru
|
1370
|
+
- spec/integration/tmp/dummy/db/seeds.rb
|
1371
|
+
- spec/integration/tmp/dummy/Gemfile
|
1372
|
+
- spec/integration/tmp/dummy/public/404.html
|
1373
|
+
- spec/integration/tmp/dummy/public/422.html
|
1374
|
+
- spec/integration/tmp/dummy/public/500.html
|
1375
|
+
- spec/integration/tmp/dummy/public/favicon.ico
|
1376
|
+
- spec/integration/tmp/dummy/public/robots.txt
|
1377
|
+
- spec/integration/tmp/dummy/Rakefile
|
1378
|
+
- spec/integration/tmp/dummy/README.rdoc
|
1257
1379
|
- spec/spec_helper.rb
|
1258
1380
|
- spec/support/dummy/data.rb
|
1259
1381
|
- spec/support/dummy/schema.rb
|
1382
|
+
- spec/support/error_bubbling_helpers.rb
|
1260
1383
|
- spec/support/global_id.rb
|
1261
1384
|
- spec/support/jazz.rb
|
1262
1385
|
- spec/support/lazy_helpers.rb
|