graphql 1.11.5 → 1.12.2
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.
Potentially problematic release.
This version of graphql might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/generators/graphql/install_generator.rb +5 -5
- data/lib/generators/graphql/object_generator.rb +2 -0
- data/lib/generators/graphql/relay_generator.rb +63 -0
- data/lib/generators/graphql/templates/base_connection.erb +8 -0
- data/lib/generators/graphql/templates/base_edge.erb +8 -0
- data/lib/generators/graphql/templates/node_type.erb +9 -0
- data/lib/generators/graphql/templates/object.erb +1 -1
- data/lib/generators/graphql/templates/query_type.erb +1 -3
- data/lib/generators/graphql/templates/schema.erb +8 -35
- data/lib/graphql.rb +39 -4
- data/lib/graphql/analysis/analyze_query.rb +7 -0
- data/lib/graphql/analysis/ast.rb +11 -2
- data/lib/graphql/analysis/ast/visitor.rb +9 -1
- data/lib/graphql/backtrace.rb +28 -19
- data/lib/graphql/backtrace/legacy_tracer.rb +56 -0
- data/lib/graphql/backtrace/table.rb +22 -2
- data/lib/graphql/backtrace/tracer.rb +40 -9
- data/lib/graphql/backwards_compatibility.rb +2 -1
- data/lib/graphql/base_type.rb +1 -1
- data/lib/graphql/compatibility/execution_specification.rb +1 -0
- data/lib/graphql/compatibility/lazy_execution_specification.rb +2 -0
- data/lib/graphql/compatibility/query_parser_specification.rb +2 -0
- data/lib/graphql/compatibility/schema_parser_specification.rb +2 -0
- data/lib/graphql/dataloader.rb +198 -0
- data/lib/graphql/dataloader/null_dataloader.rb +21 -0
- data/lib/graphql/dataloader/request.rb +24 -0
- data/lib/graphql/dataloader/request_all.rb +22 -0
- data/lib/graphql/dataloader/source.rb +93 -0
- data/lib/graphql/define/assign_global_id_field.rb +2 -2
- data/lib/graphql/define/instance_definable.rb +32 -2
- data/lib/graphql/define/type_definer.rb +5 -5
- data/lib/graphql/deprecated_dsl.rb +7 -2
- data/lib/graphql/deprecation.rb +13 -0
- data/lib/graphql/enum_type.rb +2 -0
- data/lib/graphql/execution/errors.rb +4 -0
- data/lib/graphql/execution/execute.rb +7 -0
- data/lib/graphql/execution/interpreter.rb +10 -6
- data/lib/graphql/execution/interpreter/arguments.rb +57 -5
- data/lib/graphql/execution/interpreter/arguments_cache.rb +8 -0
- data/lib/graphql/execution/interpreter/handles_raw_value.rb +0 -7
- data/lib/graphql/execution/interpreter/runtime.rb +219 -117
- data/lib/graphql/execution/multiplex.rb +20 -6
- data/lib/graphql/function.rb +4 -0
- data/lib/graphql/input_object_type.rb +2 -0
- data/lib/graphql/integer_decoding_error.rb +17 -0
- data/lib/graphql/interface_type.rb +3 -1
- data/lib/graphql/internal_representation/document.rb +2 -2
- data/lib/graphql/internal_representation/rewrite.rb +1 -1
- data/lib/graphql/invalid_null_error.rb +1 -1
- data/lib/graphql/language/document_from_schema_definition.rb +50 -23
- data/lib/graphql/object_type.rb +2 -0
- data/lib/graphql/pagination/connection.rb +5 -1
- data/lib/graphql/pagination/connections.rb +15 -19
- data/lib/graphql/query.rb +6 -1
- data/lib/graphql/query/arguments.rb +1 -1
- data/lib/graphql/query/context.rb +8 -1
- data/lib/graphql/query/serial_execution.rb +1 -0
- data/lib/graphql/query/validation_pipeline.rb +1 -1
- data/lib/graphql/relay/array_connection.rb +2 -2
- data/lib/graphql/relay/base_connection.rb +7 -0
- data/lib/graphql/relay/connection_instrumentation.rb +4 -4
- data/lib/graphql/relay/connection_type.rb +1 -1
- data/lib/graphql/relay/mutation.rb +1 -0
- data/lib/graphql/relay/node.rb +3 -0
- data/lib/graphql/relay/range_add.rb +14 -5
- data/lib/graphql/relay/type_extensions.rb +2 -0
- data/lib/graphql/scalar_type.rb +2 -0
- data/lib/graphql/schema.rb +80 -29
- data/lib/graphql/schema/argument.rb +25 -7
- data/lib/graphql/schema/build_from_definition.rb +150 -58
- data/lib/graphql/schema/default_type_error.rb +2 -0
- data/lib/graphql/schema/directive.rb +76 -0
- data/lib/graphql/schema/directive/flagged.rb +57 -0
- data/lib/graphql/schema/enum.rb +3 -0
- data/lib/graphql/schema/enum_value.rb +12 -6
- data/lib/graphql/schema/field.rb +52 -23
- data/lib/graphql/schema/field/connection_extension.rb +10 -8
- data/lib/graphql/schema/field/scope_extension.rb +1 -1
- data/lib/graphql/schema/input_object.rb +33 -22
- data/lib/graphql/schema/interface.rb +1 -0
- data/lib/graphql/schema/member.rb +4 -0
- data/lib/graphql/schema/member/base_dsl_methods.rb +1 -0
- data/lib/graphql/schema/member/build_type.rb +3 -3
- data/lib/graphql/schema/member/has_arguments.rb +67 -50
- data/lib/graphql/schema/member/has_deprecation_reason.rb +25 -0
- data/lib/graphql/schema/member/has_directives.rb +98 -0
- data/lib/graphql/schema/member/has_fields.rb +2 -2
- data/lib/graphql/schema/member/has_validators.rb +31 -0
- data/lib/graphql/schema/member/type_system_helpers.rb +1 -1
- data/lib/graphql/schema/middleware_chain.rb +1 -1
- data/lib/graphql/schema/object.rb +11 -0
- data/lib/graphql/schema/printer.rb +5 -4
- data/lib/graphql/schema/relay_classic_mutation.rb +1 -1
- data/lib/graphql/schema/resolver.rb +7 -0
- data/lib/graphql/schema/resolver/has_payload_type.rb +2 -0
- data/lib/graphql/schema/subscription.rb +19 -1
- data/lib/graphql/schema/timeout_middleware.rb +3 -1
- data/lib/graphql/schema/unique_within_type.rb +1 -2
- data/lib/graphql/schema/validation.rb +4 -2
- data/lib/graphql/schema/validator.rb +163 -0
- data/lib/graphql/schema/validator/exclusion_validator.rb +31 -0
- data/lib/graphql/schema/validator/format_validator.rb +49 -0
- data/lib/graphql/schema/validator/inclusion_validator.rb +33 -0
- data/lib/graphql/schema/validator/length_validator.rb +57 -0
- data/lib/graphql/schema/validator/numericality_validator.rb +71 -0
- data/lib/graphql/schema/validator/required_validator.rb +68 -0
- data/lib/graphql/static_validation.rb +1 -0
- data/lib/graphql/static_validation/all_rules.rb +1 -0
- data/lib/graphql/static_validation/rules/fields_will_merge.rb +25 -17
- data/lib/graphql/static_validation/rules/input_object_names_are_unique.rb +30 -0
- data/lib/graphql/static_validation/rules/input_object_names_are_unique_error.rb +30 -0
- data/lib/graphql/static_validation/validation_timeout_error.rb +25 -0
- data/lib/graphql/static_validation/validator.rb +32 -9
- data/lib/graphql/subscriptions.rb +17 -20
- data/lib/graphql/subscriptions/subscription_root.rb +1 -1
- data/lib/graphql/tracing.rb +2 -2
- data/lib/graphql/tracing/appoptics_tracing.rb +3 -1
- data/lib/graphql/tracing/platform_tracing.rb +4 -2
- data/lib/graphql/tracing/prometheus_tracing/graphql_collector.rb +4 -1
- data/lib/graphql/tracing/skylight_tracing.rb +1 -1
- data/lib/graphql/types/int.rb +9 -2
- data/lib/graphql/types/relay.rb +11 -3
- data/lib/graphql/types/relay/base_connection.rb +2 -91
- data/lib/graphql/types/relay/base_edge.rb +2 -34
- data/lib/graphql/types/relay/connection_behaviors.rb +123 -0
- data/lib/graphql/types/relay/default_relay.rb +27 -0
- data/lib/graphql/types/relay/edge_behaviors.rb +42 -0
- data/lib/graphql/types/relay/has_node_field.rb +41 -0
- data/lib/graphql/types/relay/has_nodes_field.rb +41 -0
- data/lib/graphql/types/relay/node.rb +2 -4
- data/lib/graphql/types/relay/node_behaviors.rb +15 -0
- data/lib/graphql/types/relay/node_field.rb +1 -19
- data/lib/graphql/types/relay/nodes_field.rb +1 -19
- data/lib/graphql/types/relay/page_info.rb +2 -14
- data/lib/graphql/types/relay/page_info_behaviors.rb +25 -0
- data/lib/graphql/types/string.rb +7 -1
- data/lib/graphql/unauthorized_error.rb +1 -1
- data/lib/graphql/union_type.rb +2 -0
- data/lib/graphql/upgrader/member.rb +1 -0
- data/lib/graphql/upgrader/schema.rb +1 -0
- data/lib/graphql/version.rb +1 -1
- data/readme.md +1 -1
- metadata +50 -6
- data/lib/graphql/types/relay/base_field.rb +0 -22
- data/lib/graphql/types/relay/base_interface.rb +0 -29
- data/lib/graphql/types/relay/base_object.rb +0 -26
@@ -7,10 +7,8 @@ module GraphQL
|
|
7
7
|
# or you can take it as inspiration for your own implementation
|
8
8
|
# of the `Node` interface.
|
9
9
|
module Node
|
10
|
-
include
|
11
|
-
|
12
|
-
description "An object with an ID."
|
13
|
-
field(:id, ID, null: false, description: "ID of the object.")
|
10
|
+
include GraphQL::Schema::Interface
|
11
|
+
include Types::Relay::NodeBehaviors
|
14
12
|
end
|
15
13
|
end
|
16
14
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module GraphQL
|
4
|
+
module Types
|
5
|
+
module Relay
|
6
|
+
module NodeBehaviors
|
7
|
+
def self.included(child_module)
|
8
|
+
child_module.extend(DefaultRelay)
|
9
|
+
child_module.description("An object with an ID.")
|
10
|
+
child_module.field(:id, ID, null: false, description: "ID of the object.")
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -19,25 +19,7 @@ module GraphQL
|
|
19
19
|
# context.schema.object_from_id(id, context)
|
20
20
|
# end
|
21
21
|
#
|
22
|
-
NodeField = GraphQL::Schema::Field.new(
|
23
|
-
name: "node",
|
24
|
-
owner: nil,
|
25
|
-
type: GraphQL::Types::Relay::Node,
|
26
|
-
null: true,
|
27
|
-
description: "Fetches an object given its ID.",
|
28
|
-
relay_node_field: true,
|
29
|
-
) do
|
30
|
-
argument :id, "ID!", required: true,
|
31
|
-
description: "ID of the object."
|
32
|
-
|
33
|
-
def resolve(obj, args, ctx)
|
34
|
-
ctx.schema.object_from_id(args[:id], ctx)
|
35
|
-
end
|
36
|
-
|
37
|
-
def resolve_field(obj, args, ctx)
|
38
|
-
resolve(obj, args, ctx)
|
39
|
-
end
|
40
|
-
end
|
22
|
+
NodeField = GraphQL::Schema::Field.new(**HasNodeField.field_options, &HasNodeField.field_block)
|
41
23
|
end
|
42
24
|
end
|
43
25
|
end
|
@@ -21,25 +21,7 @@ module GraphQL
|
|
21
21
|
# end
|
22
22
|
# end
|
23
23
|
#
|
24
|
-
NodesField = GraphQL::Schema::Field.new(
|
25
|
-
name: "nodes",
|
26
|
-
owner: nil,
|
27
|
-
type: [GraphQL::Types::Relay::Node, null: true],
|
28
|
-
null: false,
|
29
|
-
description: "Fetches a list of objects given a list of IDs.",
|
30
|
-
relay_nodes_field: true,
|
31
|
-
) do
|
32
|
-
argument :ids, "[ID!]!", required: true,
|
33
|
-
description: "IDs of the objects."
|
34
|
-
|
35
|
-
def resolve(obj, args, ctx)
|
36
|
-
args[:ids].map { |id| ctx.schema.object_from_id(id, ctx) }
|
37
|
-
end
|
38
|
-
|
39
|
-
def resolve_field(obj, args, ctx)
|
40
|
-
resolve(obj, args, ctx)
|
41
|
-
end
|
42
|
-
end
|
24
|
+
NodesField = GraphQL::Schema::Field.new(**HasNodesField.field_options, &HasNodesField.field_block)
|
43
25
|
end
|
44
26
|
end
|
45
27
|
end
|
@@ -3,20 +3,8 @@ module GraphQL
|
|
3
3
|
module Types
|
4
4
|
module Relay
|
5
5
|
# The return type of a connection's `pageInfo` field
|
6
|
-
class PageInfo <
|
7
|
-
|
8
|
-
description "Information about pagination in a connection."
|
9
|
-
field :has_next_page, Boolean, null: false,
|
10
|
-
description: "When paginating forwards, are there more items?"
|
11
|
-
|
12
|
-
field :has_previous_page, Boolean, null: false,
|
13
|
-
description: "When paginating backwards, are there more items?"
|
14
|
-
|
15
|
-
field :start_cursor, String, null: true,
|
16
|
-
description: "When paginating backwards, the cursor to continue."
|
17
|
-
|
18
|
-
field :end_cursor, String, null: true,
|
19
|
-
description: "When paginating forwards, the cursor to continue."
|
6
|
+
class PageInfo < GraphQL::Schema::Object
|
7
|
+
include PageInfoBehaviors
|
20
8
|
end
|
21
9
|
end
|
22
10
|
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module GraphQL
|
3
|
+
module Types
|
4
|
+
module Relay
|
5
|
+
module PageInfoBehaviors
|
6
|
+
def self.included(child_class)
|
7
|
+
child_class.extend GraphQL::Types::Relay::DefaultRelay
|
8
|
+
|
9
|
+
child_class.description "Information about pagination in a connection."
|
10
|
+
child_class.field :has_next_page, Boolean, null: false,
|
11
|
+
description: "When paginating forwards, are there more items?"
|
12
|
+
|
13
|
+
child_class.field :has_previous_page, Boolean, null: false,
|
14
|
+
description: "When paginating backwards, are there more items?"
|
15
|
+
|
16
|
+
child_class.field :start_cursor, String, null: true,
|
17
|
+
description: "When paginating backwards, the cursor to continue."
|
18
|
+
|
19
|
+
child_class.field :end_cursor, String, null: true,
|
20
|
+
description: "When paginating forwards, the cursor to continue."
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/lib/graphql/types/string.rb
CHANGED
@@ -7,7 +7,13 @@ module GraphQL
|
|
7
7
|
|
8
8
|
def self.coerce_result(value, ctx)
|
9
9
|
str = value.to_s
|
10
|
-
str.encoding == Encoding::UTF_8
|
10
|
+
if str.encoding == Encoding::UTF_8
|
11
|
+
str
|
12
|
+
elsif str.frozen?
|
13
|
+
str.encode(Encoding::UTF_8)
|
14
|
+
else
|
15
|
+
str.encode!(Encoding::UTF_8)
|
16
|
+
end
|
11
17
|
rescue EncodingError
|
12
18
|
err = GraphQL::StringEncodingError.new(str)
|
13
19
|
ctx.schema.type_error(err, ctx)
|
@@ -22,7 +22,7 @@ module GraphQL
|
|
22
22
|
@object = object
|
23
23
|
@type = type
|
24
24
|
@context = context
|
25
|
-
message ||= "An instance of #{object.class} failed #{type.
|
25
|
+
message ||= "An instance of #{object.class} failed #{type.graphql_name}'s authorization check"
|
26
26
|
super(message)
|
27
27
|
end
|
28
28
|
end
|
data/lib/graphql/union_type.rb
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
module GraphQL
|
3
3
|
# @api deprecated
|
4
4
|
class UnionType < GraphQL::BaseType
|
5
|
+
extend Define::InstanceDefinable::DeprecatedDefine
|
6
|
+
|
5
7
|
# Rubocop was unhappy about the syntax when this was a proc literal
|
6
8
|
class AcceptPossibleTypesDefinition
|
7
9
|
def self.call(target, possible_types, options = {})
|
@@ -771,6 +771,7 @@ module GraphQL
|
|
771
771
|
|
772
772
|
class Member
|
773
773
|
def initialize(member, skip: SkipOnNullKeyword, type_transforms: DEFAULT_TYPE_TRANSFORMS, field_transforms: DEFAULT_FIELD_TRANSFORMS, clean_up_transforms: DEFAULT_CLEAN_UP_TRANSFORMS)
|
774
|
+
GraphQL::Deprecation.warn "#{self.class} will be removed from GraphQL-Ruby 2.0 (but there's no point in using it after you've transformed your code, anyways)"
|
774
775
|
@member = member
|
775
776
|
@skip = skip
|
776
777
|
@type_transforms = type_transforms
|
data/lib/graphql/version.rb
CHANGED
data/readme.md
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
A Ruby implementation of [GraphQL](https://graphql.org/).
|
10
10
|
|
11
11
|
- [Website](https://graphql-ruby.org/)
|
12
|
-
- [API Documentation](https://www.rubydoc.info/
|
12
|
+
- [API Documentation](https://www.rubydoc.info/github/rmosolgo/graphql-ruby)
|
13
13
|
- [Newsletter](https://tinyletter.com/graphql-ruby)
|
14
14
|
|
15
15
|
## Installation
|
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.12.2
|
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: 2021-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: benchmark-ips
|
@@ -318,6 +318,20 @@ dependencies:
|
|
318
318
|
- - "~>"
|
319
319
|
- !ruby/object:Gem::Version
|
320
320
|
version: 1.5.0
|
321
|
+
- !ruby/object:Gem::Dependency
|
322
|
+
name: webrick
|
323
|
+
requirement: !ruby/object:Gem::Requirement
|
324
|
+
requirements:
|
325
|
+
- - ">="
|
326
|
+
- !ruby/object:Gem::Version
|
327
|
+
version: '0'
|
328
|
+
type: :development
|
329
|
+
prerelease: false
|
330
|
+
version_requirements: !ruby/object:Gem::Requirement
|
331
|
+
requirements:
|
332
|
+
- - ">="
|
333
|
+
- !ruby/object:Gem::Version
|
334
|
+
version: '0'
|
321
335
|
description: A plain-Ruby implementation of GraphQL.
|
322
336
|
email:
|
323
337
|
- rdmosolgo@gmail.com
|
@@ -334,8 +348,11 @@ files:
|
|
334
348
|
- lib/generators/graphql/loader_generator.rb
|
335
349
|
- lib/generators/graphql/mutation_generator.rb
|
336
350
|
- lib/generators/graphql/object_generator.rb
|
351
|
+
- lib/generators/graphql/relay_generator.rb
|
337
352
|
- lib/generators/graphql/scalar_generator.rb
|
338
353
|
- lib/generators/graphql/templates/base_argument.erb
|
354
|
+
- lib/generators/graphql/templates/base_connection.erb
|
355
|
+
- lib/generators/graphql/templates/base_edge.erb
|
339
356
|
- lib/generators/graphql/templates/base_enum.erb
|
340
357
|
- lib/generators/graphql/templates/base_field.erb
|
341
358
|
- lib/generators/graphql/templates/base_input_object.erb
|
@@ -350,6 +367,7 @@ files:
|
|
350
367
|
- lib/generators/graphql/templates/loader.erb
|
351
368
|
- lib/generators/graphql/templates/mutation.erb
|
352
369
|
- lib/generators/graphql/templates/mutation_type.erb
|
370
|
+
- lib/generators/graphql/templates/node_type.erb
|
353
371
|
- lib/generators/graphql/templates/object.erb
|
354
372
|
- lib/generators/graphql/templates/query_type.erb
|
355
373
|
- lib/generators/graphql/templates/scalar.erb
|
@@ -379,6 +397,7 @@ files:
|
|
379
397
|
- lib/graphql/authorization.rb
|
380
398
|
- lib/graphql/backtrace.rb
|
381
399
|
- lib/graphql/backtrace/inspect_result.rb
|
400
|
+
- lib/graphql/backtrace/legacy_tracer.rb
|
382
401
|
- lib/graphql/backtrace/table.rb
|
383
402
|
- lib/graphql/backtrace/traced_error.rb
|
384
403
|
- lib/graphql/backtrace/tracer.rb
|
@@ -396,6 +415,11 @@ files:
|
|
396
415
|
- lib/graphql/compatibility/query_parser_specification/parse_error_specification.rb
|
397
416
|
- lib/graphql/compatibility/query_parser_specification/query_assertions.rb
|
398
417
|
- lib/graphql/compatibility/schema_parser_specification.rb
|
418
|
+
- lib/graphql/dataloader.rb
|
419
|
+
- lib/graphql/dataloader/null_dataloader.rb
|
420
|
+
- lib/graphql/dataloader/request.rb
|
421
|
+
- lib/graphql/dataloader/request_all.rb
|
422
|
+
- lib/graphql/dataloader/source.rb
|
399
423
|
- lib/graphql/define.rb
|
400
424
|
- lib/graphql/define/assign_argument.rb
|
401
425
|
- lib/graphql/define/assign_connection.rb
|
@@ -409,6 +433,7 @@ files:
|
|
409
433
|
- lib/graphql/define/non_null_with_bang.rb
|
410
434
|
- lib/graphql/define/type_definer.rb
|
411
435
|
- lib/graphql/deprecated_dsl.rb
|
436
|
+
- lib/graphql/deprecation.rb
|
412
437
|
- lib/graphql/dig.rb
|
413
438
|
- lib/graphql/directive.rb
|
414
439
|
- lib/graphql/directive/deprecated_directive.rb
|
@@ -445,6 +470,7 @@ files:
|
|
445
470
|
- lib/graphql/id_type.rb
|
446
471
|
- lib/graphql/input_object_type.rb
|
447
472
|
- lib/graphql/int_type.rb
|
473
|
+
- lib/graphql/integer_decoding_error.rb
|
448
474
|
- lib/graphql/integer_encoding_error.rb
|
449
475
|
- lib/graphql/interface_type.rb
|
450
476
|
- lib/graphql/internal_representation.rb
|
@@ -554,6 +580,7 @@ files:
|
|
554
580
|
- lib/graphql/schema/directive.rb
|
555
581
|
- lib/graphql/schema/directive/deprecated.rb
|
556
582
|
- lib/graphql/schema/directive/feature.rb
|
583
|
+
- lib/graphql/schema/directive/flagged.rb
|
557
584
|
- lib/graphql/schema/directive/include.rb
|
558
585
|
- lib/graphql/schema/directive/skip.rb
|
559
586
|
- lib/graphql/schema/directive/transform.rb
|
@@ -580,9 +607,12 @@ files:
|
|
580
607
|
- lib/graphql/schema/member/graphql_type_names.rb
|
581
608
|
- lib/graphql/schema/member/has_arguments.rb
|
582
609
|
- lib/graphql/schema/member/has_ast_node.rb
|
610
|
+
- lib/graphql/schema/member/has_deprecation_reason.rb
|
611
|
+
- lib/graphql/schema/member/has_directives.rb
|
583
612
|
- lib/graphql/schema/member/has_fields.rb
|
584
613
|
- lib/graphql/schema/member/has_path.rb
|
585
614
|
- lib/graphql/schema/member/has_unresolved_type_error.rb
|
615
|
+
- lib/graphql/schema/member/has_validators.rb
|
586
616
|
- lib/graphql/schema/member/instrumentation.rb
|
587
617
|
- lib/graphql/schema/member/relay_shortcuts.rb
|
588
618
|
- lib/graphql/schema/member/scoped.rb
|
@@ -609,6 +639,13 @@ files:
|
|
609
639
|
- lib/graphql/schema/union.rb
|
610
640
|
- lib/graphql/schema/unique_within_type.rb
|
611
641
|
- lib/graphql/schema/validation.rb
|
642
|
+
- lib/graphql/schema/validator.rb
|
643
|
+
- lib/graphql/schema/validator/exclusion_validator.rb
|
644
|
+
- lib/graphql/schema/validator/format_validator.rb
|
645
|
+
- lib/graphql/schema/validator/inclusion_validator.rb
|
646
|
+
- lib/graphql/schema/validator/length_validator.rb
|
647
|
+
- lib/graphql/schema/validator/numericality_validator.rb
|
648
|
+
- lib/graphql/schema/validator/required_validator.rb
|
612
649
|
- lib/graphql/schema/warden.rb
|
613
650
|
- lib/graphql/schema/wrapper.rb
|
614
651
|
- lib/graphql/static_validation.rb
|
@@ -650,6 +687,8 @@ files:
|
|
650
687
|
- lib/graphql/static_validation/rules/fragments_are_on_composite_types_error.rb
|
651
688
|
- lib/graphql/static_validation/rules/fragments_are_used.rb
|
652
689
|
- lib/graphql/static_validation/rules/fragments_are_used_error.rb
|
690
|
+
- lib/graphql/static_validation/rules/input_object_names_are_unique.rb
|
691
|
+
- lib/graphql/static_validation/rules/input_object_names_are_unique_error.rb
|
653
692
|
- lib/graphql/static_validation/rules/mutation_root_exists.rb
|
654
693
|
- lib/graphql/static_validation/rules/mutation_root_exists_error.rb
|
655
694
|
- lib/graphql/static_validation/rules/no_definitions_are_present.rb
|
@@ -676,6 +715,7 @@ files:
|
|
676
715
|
- lib/graphql/static_validation/rules/variables_are_used_and_defined_error.rb
|
677
716
|
- lib/graphql/static_validation/type_stack.rb
|
678
717
|
- lib/graphql/static_validation/validation_context.rb
|
718
|
+
- lib/graphql/static_validation/validation_timeout_error.rb
|
679
719
|
- lib/graphql/static_validation/validator.rb
|
680
720
|
- lib/graphql/string_encoding_error.rb
|
681
721
|
- lib/graphql/string_type.rb
|
@@ -712,13 +752,17 @@ files:
|
|
712
752
|
- lib/graphql/types/relay.rb
|
713
753
|
- lib/graphql/types/relay/base_connection.rb
|
714
754
|
- lib/graphql/types/relay/base_edge.rb
|
715
|
-
- lib/graphql/types/relay/
|
716
|
-
- lib/graphql/types/relay/
|
717
|
-
- lib/graphql/types/relay/
|
755
|
+
- lib/graphql/types/relay/connection_behaviors.rb
|
756
|
+
- lib/graphql/types/relay/default_relay.rb
|
757
|
+
- lib/graphql/types/relay/edge_behaviors.rb
|
758
|
+
- lib/graphql/types/relay/has_node_field.rb
|
759
|
+
- lib/graphql/types/relay/has_nodes_field.rb
|
718
760
|
- lib/graphql/types/relay/node.rb
|
761
|
+
- lib/graphql/types/relay/node_behaviors.rb
|
719
762
|
- lib/graphql/types/relay/node_field.rb
|
720
763
|
- lib/graphql/types/relay/nodes_field.rb
|
721
764
|
- lib/graphql/types/relay/page_info.rb
|
765
|
+
- lib/graphql/types/relay/page_info_behaviors.rb
|
722
766
|
- lib/graphql/types/string.rb
|
723
767
|
- lib/graphql/unauthorized_error.rb
|
724
768
|
- lib/graphql/unauthorized_field_error.rb
|
@@ -752,7 +796,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
752
796
|
- !ruby/object:Gem::Version
|
753
797
|
version: '0'
|
754
798
|
requirements: []
|
755
|
-
rubygems_version: 3.
|
799
|
+
rubygems_version: 3.0.3
|
756
800
|
signing_key:
|
757
801
|
specification_version: 4
|
758
802
|
summary: A GraphQL language and runtime for Ruby
|
@@ -1,22 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module GraphQL
|
4
|
-
module Types
|
5
|
-
module Relay
|
6
|
-
class BaseField < GraphQL::Schema::Field
|
7
|
-
def initialize(edge_class: nil, **rest, &block)
|
8
|
-
@edge_class = edge_class
|
9
|
-
super(**rest, &block)
|
10
|
-
end
|
11
|
-
|
12
|
-
def to_graphql
|
13
|
-
field = super
|
14
|
-
if @edge_class
|
15
|
-
field.edge_class = @edge_class
|
16
|
-
end
|
17
|
-
field
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module GraphQL
|
4
|
-
module Types
|
5
|
-
module Relay
|
6
|
-
module BaseInterface
|
7
|
-
include GraphQL::Schema::Interface
|
8
|
-
|
9
|
-
field_class(Types::Relay::BaseField)
|
10
|
-
|
11
|
-
definition_methods do
|
12
|
-
def default_relay(new_value)
|
13
|
-
@default_relay = new_value
|
14
|
-
end
|
15
|
-
|
16
|
-
def default_relay?
|
17
|
-
!!@default_relay
|
18
|
-
end
|
19
|
-
|
20
|
-
def to_graphql
|
21
|
-
type_defn = super
|
22
|
-
type_defn.default_relay = default_relay?
|
23
|
-
type_defn
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module GraphQL
|
4
|
-
module Types
|
5
|
-
module Relay
|
6
|
-
class BaseObject < GraphQL::Schema::Object
|
7
|
-
field_class(Types::Relay::BaseField)
|
8
|
-
class << self
|
9
|
-
def default_relay(new_value)
|
10
|
-
@default_relay = new_value
|
11
|
-
end
|
12
|
-
|
13
|
-
def default_relay?
|
14
|
-
!!@default_relay
|
15
|
-
end
|
16
|
-
|
17
|
-
def to_graphql
|
18
|
-
type_defn = super
|
19
|
-
type_defn.default_relay = default_relay?
|
20
|
-
type_defn
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|