graphql 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/graphql/base_type.rb +33 -5
- data/lib/graphql/boolean_type.rb +1 -0
- data/lib/graphql/compatibility/execution_specification.rb +1 -1
- data/lib/graphql/compatibility/execution_specification/specification_schema.rb +1 -0
- data/lib/graphql/directive.rb +10 -2
- data/lib/graphql/directive/deprecated_directive.rb +1 -0
- data/lib/graphql/directive/include_directive.rb +1 -0
- data/lib/graphql/directive/skip_directive.rb +1 -0
- data/lib/graphql/enum_type.rb +1 -0
- data/lib/graphql/execution/execute.rb +1 -13
- data/lib/graphql/float_type.rb +1 -0
- data/lib/graphql/id_type.rb +1 -0
- data/lib/graphql/input_object_type.rb +12 -2
- data/lib/graphql/int_type.rb +1 -0
- data/lib/graphql/interface_type.rb +1 -0
- data/lib/graphql/introspection/directive_location_enum.rb +1 -0
- data/lib/graphql/introspection/directive_type.rb +1 -0
- data/lib/graphql/introspection/enum_value_type.rb +1 -0
- data/lib/graphql/introspection/field_type.rb +1 -0
- data/lib/graphql/introspection/input_fields_field.rb +1 -1
- data/lib/graphql/introspection/input_value_type.rb +1 -0
- data/lib/graphql/introspection/schema_type.rb +2 -0
- data/lib/graphql/introspection/type_kind_enum.rb +1 -0
- data/lib/graphql/introspection/type_type.rb +1 -0
- data/lib/graphql/list_type.rb +1 -0
- data/lib/graphql/non_null_type.rb +1 -0
- data/lib/graphql/object_type.rb +1 -0
- data/lib/graphql/query.rb +50 -13
- data/lib/graphql/query/context.rb +5 -4
- data/lib/graphql/query/serial_execution/field_resolution.rb +1 -22
- data/lib/graphql/relay/array_connection.rb +3 -1
- data/lib/graphql/relay/connection_type.rb +15 -1
- data/lib/graphql/relay/node.rb +1 -0
- data/lib/graphql/relay/page_info.rb +1 -0
- data/lib/graphql/relay/relation_connection.rb +2 -0
- data/lib/graphql/schema.rb +21 -13
- data/lib/graphql/schema/catchall_middleware.rb +2 -2
- data/lib/graphql/schema/middleware_chain.rb +71 -13
- data/lib/graphql/schema/null_mask.rb +10 -0
- data/lib/graphql/schema/printer.rb +85 -59
- data/lib/graphql/schema/rescue_middleware.rb +2 -2
- data/lib/graphql/schema/timeout_middleware.rb +2 -2
- data/lib/graphql/schema/validation.rb +1 -12
- data/lib/graphql/schema/warden.rb +48 -24
- data/lib/graphql/static_validation/literal_validator.rb +2 -2
- data/lib/graphql/string_type.rb +1 -0
- data/lib/graphql/union_type.rb +7 -1
- data/lib/graphql/version.rb +1 -1
- data/readme.md +0 -19
- data/spec/graphql/directive/skip_directive_spec.rb +8 -0
- data/spec/graphql/directive_spec.rb +9 -3
- data/spec/graphql/input_object_type_spec.rb +67 -0
- data/spec/graphql/query/variables_spec.rb +1 -1
- data/spec/graphql/relay/array_connection_spec.rb +9 -0
- data/spec/graphql/relay/connection_type_spec.rb +20 -0
- data/spec/graphql/relay/node_spec.rb +6 -0
- data/spec/graphql/relay/page_info_spec.rb +4 -0
- data/spec/graphql/relay/relation_connection_spec.rb +8 -0
- data/spec/graphql/scalar_type_spec.rb +4 -0
- data/spec/graphql/schema/middleware_chain_spec.rb +27 -13
- data/spec/graphql/schema/printer_spec.rb +121 -6
- data/spec/graphql/schema/rescue_middleware_spec.rb +4 -4
- data/spec/graphql/schema/warden_spec.rb +16 -12
- data/spec/graphql/schema_spec.rb +9 -0
- data/spec/graphql/string_type_spec.rb +10 -4
- data/spec/spec_helper.rb +2 -1
- data/spec/support/star_wars_schema.rb +2 -2
- metadata +19 -2
data/spec/spec_helper.rb
CHANGED
@@ -3,6 +3,7 @@ require "codeclimate-test-reporter"
|
|
3
3
|
CodeClimate::TestReporter.start
|
4
4
|
require "sqlite3"
|
5
5
|
require "active_record"
|
6
|
+
require "action_controller"
|
6
7
|
require "sequel"
|
7
8
|
require "graphql"
|
8
9
|
require "benchmark"
|
@@ -27,7 +28,7 @@ GraphQL::EnumType::EnumValue.accepts_definitions(metadata: assign_metadata_key)
|
|
27
28
|
|
28
29
|
# Can be used as a GraphQL::Schema::Warden for some purposes, but allows anything
|
29
30
|
module PermissiveWarden
|
30
|
-
def self.
|
31
|
+
def self.arguments(input_obj)
|
31
32
|
input_obj.arguments.values
|
32
33
|
end
|
33
34
|
|
@@ -18,7 +18,7 @@ BaseType = GraphQL::ObjectType.define do
|
|
18
18
|
end
|
19
19
|
|
20
20
|
# Use an optional block to add fields to the connection type:
|
21
|
-
BaseConnectionWithTotalCountType = BaseType.define_connection do
|
21
|
+
BaseConnectionWithTotalCountType = BaseType.define_connection(nodes_field: true) do
|
22
22
|
name "BasesConnectionWithTotalCount"
|
23
23
|
field :totalCount do
|
24
24
|
type types.Int
|
@@ -45,7 +45,7 @@ CustomBaseEdgeType = BaseType.define_edge do
|
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
-
CustomEdgeBaseConnectionType = BaseType.define_connection(edge_class: CustomBaseEdge, edge_type: CustomBaseEdgeType) do
|
48
|
+
CustomEdgeBaseConnectionType = BaseType.define_connection(edge_class: CustomBaseEdge, edge_type: CustomBaseEdgeType, nodes_field: true) do
|
49
49
|
name "CustomEdgeBaseConnection"
|
50
50
|
|
51
51
|
field :totalCountTimes100 do
|
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.
|
4
|
+
version: 1.4.0
|
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: 2017-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: codeclimate-test-reporter
|
@@ -192,6 +192,20 @@ dependencies:
|
|
192
192
|
- - ">="
|
193
193
|
- !ruby/object:Gem::Version
|
194
194
|
version: '0'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: actionpack
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - ">="
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
195
209
|
- !ruby/object:Gem::Dependency
|
196
210
|
name: appraisal
|
197
211
|
requirement: !ruby/object:Gem::Requirement
|
@@ -389,6 +403,7 @@ files:
|
|
389
403
|
- lib/graphql/schema/invalid_type_error.rb
|
390
404
|
- lib/graphql/schema/loader.rb
|
391
405
|
- lib/graphql/schema/middleware_chain.rb
|
406
|
+
- lib/graphql/schema/null_mask.rb
|
392
407
|
- lib/graphql/schema/possible_types.rb
|
393
408
|
- lib/graphql/schema/printer.rb
|
394
409
|
- lib/graphql/schema/reduce_types.rb
|
@@ -449,6 +464,7 @@ files:
|
|
449
464
|
- spec/graphql/compatibility/schema_parser_specification_spec.rb
|
450
465
|
- spec/graphql/define/assign_argument_spec.rb
|
451
466
|
- spec/graphql/define/instance_definable_spec.rb
|
467
|
+
- spec/graphql/directive/skip_directive_spec.rb
|
452
468
|
- spec/graphql/directive_spec.rb
|
453
469
|
- spec/graphql/enum_type_spec.rb
|
454
470
|
- spec/graphql/execution/execute_spec.rb
|
@@ -577,6 +593,7 @@ test_files:
|
|
577
593
|
- spec/graphql/compatibility/schema_parser_specification_spec.rb
|
578
594
|
- spec/graphql/define/assign_argument_spec.rb
|
579
595
|
- spec/graphql/define/instance_definable_spec.rb
|
596
|
+
- spec/graphql/directive/skip_directive_spec.rb
|
580
597
|
- spec/graphql/directive_spec.rb
|
581
598
|
- spec/graphql/enum_type_spec.rb
|
582
599
|
- spec/graphql/execution/execute_spec.rb
|