graphql 1.13.0 → 1.13.24

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.
Files changed (141) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generators/graphql/core.rb +3 -8
  3. data/lib/generators/graphql/enum_generator.rb +4 -10
  4. data/lib/generators/graphql/field_extractor.rb +31 -0
  5. data/lib/generators/graphql/input_generator.rb +50 -0
  6. data/lib/generators/graphql/install/mutation_root_generator.rb +34 -0
  7. data/lib/generators/graphql/install_generator.rb +10 -3
  8. data/lib/generators/graphql/interface_generator.rb +7 -7
  9. data/lib/generators/graphql/mutation_create_generator.rb +22 -0
  10. data/lib/generators/graphql/mutation_delete_generator.rb +22 -0
  11. data/lib/generators/graphql/mutation_generator.rb +5 -30
  12. data/lib/generators/graphql/mutation_update_generator.rb +22 -0
  13. data/lib/generators/graphql/object_generator.rb +8 -37
  14. data/lib/generators/graphql/orm_mutations_base.rb +40 -0
  15. data/lib/generators/graphql/scalar_generator.rb +4 -2
  16. data/lib/generators/graphql/templates/enum.erb +5 -1
  17. data/lib/generators/graphql/templates/input.erb +9 -0
  18. data/lib/generators/graphql/templates/interface.erb +4 -2
  19. data/lib/generators/graphql/templates/mutation.erb +1 -1
  20. data/lib/generators/graphql/templates/mutation_create.erb +20 -0
  21. data/lib/generators/graphql/templates/mutation_delete.erb +20 -0
  22. data/lib/generators/graphql/templates/mutation_update.erb +21 -0
  23. data/lib/generators/graphql/templates/object.erb +4 -2
  24. data/lib/generators/graphql/templates/scalar.erb +3 -1
  25. data/lib/generators/graphql/templates/union.erb +4 -2
  26. data/lib/generators/graphql/type_generator.rb +46 -9
  27. data/lib/generators/graphql/union_generator.rb +5 -5
  28. data/lib/graphql/analysis/ast/field_usage.rb +6 -2
  29. data/lib/graphql/analysis/ast/visitor.rb +2 -1
  30. data/lib/graphql/argument.rb +1 -1
  31. data/lib/graphql/base_type.rb +5 -3
  32. data/lib/graphql/boolean_type.rb +1 -1
  33. data/lib/graphql/dataloader/source.rb +2 -2
  34. data/lib/graphql/date_encoding_error.rb +16 -0
  35. data/lib/graphql/define/instance_definable.rb +15 -0
  36. data/lib/graphql/directive/deprecated_directive.rb +1 -1
  37. data/lib/graphql/directive/include_directive.rb +1 -1
  38. data/lib/graphql/directive/skip_directive.rb +1 -1
  39. data/lib/graphql/directive.rb +1 -1
  40. data/lib/graphql/enum_type.rb +2 -2
  41. data/lib/graphql/execution/interpreter/arguments_cache.rb +4 -2
  42. data/lib/graphql/execution/interpreter/runtime.rb +48 -28
  43. data/lib/graphql/execution/multiplex.rb +3 -0
  44. data/lib/graphql/field.rb +1 -1
  45. data/lib/graphql/float_type.rb +1 -1
  46. data/lib/graphql/id_type.rb +1 -1
  47. data/lib/graphql/input_object_type.rb +1 -1
  48. data/lib/graphql/int_type.rb +1 -1
  49. data/lib/graphql/interface_type.rb +1 -1
  50. data/lib/graphql/introspection/directive_location_enum.rb +2 -2
  51. data/lib/graphql/introspection/directive_type.rb +4 -2
  52. data/lib/graphql/introspection/field_type.rb +1 -1
  53. data/lib/graphql/introspection/schema_type.rb +7 -2
  54. data/lib/graphql/introspection/type_type.rb +14 -8
  55. data/lib/graphql/introspection.rb +4 -1
  56. data/lib/graphql/language/block_string.rb +2 -2
  57. data/lib/graphql/language/document_from_schema_definition.rb +8 -3
  58. data/lib/graphql/language/lexer.rb +50 -25
  59. data/lib/graphql/language/lexer.rl +2 -0
  60. data/lib/graphql/language/nodes.rb +15 -3
  61. data/lib/graphql/language/parser.rb +829 -816
  62. data/lib/graphql/language/parser.y +8 -2
  63. data/lib/graphql/language/printer.rb +4 -0
  64. data/lib/graphql/object_type.rb +2 -2
  65. data/lib/graphql/pagination/active_record_relation_connection.rb +43 -6
  66. data/lib/graphql/pagination/relation_connection.rb +59 -29
  67. data/lib/graphql/query/context.rb +10 -0
  68. data/lib/graphql/query/input_validation_result.rb +9 -0
  69. data/lib/graphql/query/validation_pipeline.rb +2 -3
  70. data/lib/graphql/query/variable_validation_error.rb +2 -2
  71. data/lib/graphql/query/variables.rb +30 -3
  72. data/lib/graphql/query.rb +0 -1
  73. data/lib/graphql/relay/connection_type.rb +15 -2
  74. data/lib/graphql/relay/global_id_resolve.rb +1 -2
  75. data/lib/graphql/relay/mutation.rb +1 -1
  76. data/lib/graphql/relay/page_info.rb +1 -1
  77. data/lib/graphql/relay/range_add.rb +4 -0
  78. data/lib/graphql/rubocop/graphql/default_required_true.rb +4 -4
  79. data/lib/graphql/scalar_type.rb +1 -1
  80. data/lib/graphql/schema/argument.rb +29 -16
  81. data/lib/graphql/schema/build_from_definition.rb +9 -7
  82. data/lib/graphql/schema/directive.rb +25 -2
  83. data/lib/graphql/schema/enum.rb +4 -3
  84. data/lib/graphql/schema/enum_value.rb +3 -1
  85. data/lib/graphql/schema/field.rb +196 -92
  86. data/lib/graphql/schema/field_extension.rb +89 -2
  87. data/lib/graphql/schema/input_object.rb +27 -9
  88. data/lib/graphql/schema/interface.rb +8 -2
  89. data/lib/graphql/schema/introspection_system.rb +1 -1
  90. data/lib/graphql/schema/list.rb +21 -4
  91. data/lib/graphql/schema/loader.rb +3 -0
  92. data/lib/graphql/schema/member/accepts_definition.rb +7 -2
  93. data/lib/graphql/schema/member/base_dsl_methods.rb +1 -1
  94. data/lib/graphql/schema/member/cached_graphql_definition.rb +29 -2
  95. data/lib/graphql/schema/member/has_arguments.rb +2 -2
  96. data/lib/graphql/schema/member/has_fields.rb +1 -1
  97. data/lib/graphql/schema/member/has_interfaces.rb +11 -1
  98. data/lib/graphql/schema/member/validates_input.rb +2 -2
  99. data/lib/graphql/schema/non_null.rb +9 -3
  100. data/lib/graphql/schema/object.rb +3 -1
  101. data/lib/graphql/schema/relay_classic_mutation.rb +8 -0
  102. data/lib/graphql/schema/resolver.rb +19 -13
  103. data/lib/graphql/schema/scalar.rb +15 -1
  104. data/lib/graphql/schema/traversal.rb +1 -1
  105. data/lib/graphql/schema/union.rb +2 -0
  106. data/lib/graphql/schema/validator/required_validator.rb +29 -15
  107. data/lib/graphql/schema/validator.rb +4 -7
  108. data/lib/graphql/schema/warden.rb +11 -2
  109. data/lib/graphql/schema.rb +34 -10
  110. data/lib/graphql/static_validation/all_rules.rb +1 -0
  111. data/lib/graphql/static_validation/base_visitor.rb +1 -1
  112. data/lib/graphql/static_validation/rules/arguments_are_defined.rb +1 -1
  113. data/lib/graphql/static_validation/rules/directives_are_in_valid_locations.rb +1 -1
  114. data/lib/graphql/static_validation/rules/fields_will_merge.rb +14 -7
  115. data/lib/graphql/static_validation/rules/query_root_exists.rb +17 -0
  116. data/lib/graphql/static_validation/rules/query_root_exists_error.rb +26 -0
  117. data/lib/graphql/static_validation/rules/required_arguments_are_present.rb +3 -1
  118. data/lib/graphql/static_validation/rules/unique_directives_per_location.rb +1 -1
  119. data/lib/graphql/static_validation/rules/variable_usages_are_allowed.rb +6 -0
  120. data/lib/graphql/static_validation/validation_context.rb +4 -0
  121. data/lib/graphql/string_type.rb +1 -1
  122. data/lib/graphql/subscriptions/action_cable_subscriptions.rb +2 -0
  123. data/lib/graphql/subscriptions/serialize.rb +22 -2
  124. data/lib/graphql/tracing/active_support_notifications_tracing.rb +6 -20
  125. data/lib/graphql/tracing/data_dog_tracing.rb +24 -15
  126. data/lib/graphql/tracing/notifications_tracing.rb +59 -0
  127. data/lib/graphql/tracing/platform_tracing.rb +20 -10
  128. data/lib/graphql/types/iso_8601_date.rb +13 -5
  129. data/lib/graphql/types/iso_8601_date_time.rb +8 -1
  130. data/lib/graphql/types/relay/connection_behaviors.rb +28 -10
  131. data/lib/graphql/types/relay/default_relay.rb +5 -1
  132. data/lib/graphql/types/relay/edge_behaviors.rb +13 -2
  133. data/lib/graphql/types/relay/node_field.rb +2 -3
  134. data/lib/graphql/types/relay/nodes_field.rb +19 -3
  135. data/lib/graphql/types/string.rb +1 -1
  136. data/lib/graphql/union_type.rb +1 -1
  137. data/lib/graphql/version.rb +1 -1
  138. data/lib/graphql.rb +14 -1
  139. metadata +56 -30
  140. /data/lib/generators/graphql/{templates → install/templates}/base_mutation.erb +0 -0
  141. /data/lib/generators/graphql/{templates → install/templates}/mutation_type.erb +0 -0
@@ -10,6 +10,10 @@ module GraphQL
10
10
  class PlatformTracing
11
11
  class << self
12
12
  attr_accessor :platform_keys
13
+
14
+ def inherited(child_class)
15
+ child_class.platform_keys = self.platform_keys
16
+ end
13
17
  end
14
18
 
15
19
  def initialize(options = {})
@@ -32,6 +36,7 @@ module GraphQL
32
36
  trace_field = true # implemented with instrumenter
33
37
  else
34
38
  field = data[:field]
39
+ # HERE
35
40
  return_type = field.type.unwrap
36
41
  trace_field = if return_type.kind.scalar? || return_type.kind.enum?
37
42
  (field.trace.nil? && @trace_scalars) || field.trace
@@ -41,7 +46,7 @@ module GraphQL
41
46
 
42
47
  platform_key = if trace_field
43
48
  context = data.fetch(:query).context
44
- cached_platform_key(context, field) { platform_field_key(data[:owner], field) }
49
+ cached_platform_key(context, field, :field) { platform_field_key(data[:owner], field) }
45
50
  else
46
51
  nil
47
52
  end
@@ -57,14 +62,14 @@ module GraphQL
57
62
  when "authorized", "authorized_lazy"
58
63
  type = data.fetch(:type)
59
64
  context = data.fetch(:context)
60
- platform_key = cached_platform_key(context, type) { platform_authorized_key(type) }
65
+ platform_key = cached_platform_key(context, type, :authorized) { platform_authorized_key(type) }
61
66
  platform_trace(platform_key, key, data) do
62
67
  yield
63
68
  end
64
69
  when "resolve_type", "resolve_type_lazy"
65
70
  type = data.fetch(:type)
66
71
  context = data.fetch(:context)
67
- platform_key = cached_platform_key(context, type) { platform_resolve_type_key(type) }
72
+ platform_key = cached_platform_key(context, type, :resolve_type) { platform_resolve_type_key(type) }
68
73
  platform_trace(platform_key, key, data) do
69
74
  yield
70
75
  end
@@ -104,17 +109,22 @@ module GraphQL
104
109
 
105
110
  private
106
111
 
107
- # Get the transaction name based on the operation type and name
112
+ # Get the transaction name based on the operation type and name if possible, or fall back to a user provided
113
+ # one. Useful for anonymous queries.
108
114
  def transaction_name(query)
109
115
  selected_op = query.selected_operation
110
- if selected_op
116
+ txn_name = if selected_op
111
117
  op_type = selected_op.operation_type
112
- op_name = selected_op.name || "anonymous"
118
+ op_name = selected_op.name || fallback_transaction_name(query.context) || "anonymous"
119
+ "#{op_type}.#{op_name}"
113
120
  else
114
- op_type = "query"
115
- op_name = "anonymous"
121
+ "query.anonymous"
116
122
  end
117
- "GraphQL/#{op_type}.#{op_name}"
123
+ "GraphQL/#{txn_name}"
124
+ end
125
+
126
+ def fallback_transaction_name(context)
127
+ context[:tracing_fallback_transaction_name]
118
128
  end
119
129
 
120
130
  attr_reader :options
@@ -130,7 +140,7 @@ module GraphQL
130
140
  # If the key isn't present, the given block is called and the result is cached for `key`.
131
141
  #
132
142
  # @return [String]
133
- def cached_platform_key(ctx, key)
143
+ def cached_platform_key(ctx, key, trace_phase)
134
144
  cache = ctx.namespace(self.class)[:platform_key_cache] ||= {}
135
145
  cache.fetch(key) { cache[key] = yield }
136
146
  end
@@ -21,13 +21,21 @@ module GraphQL
21
21
  Date.parse(value.to_s).iso8601
22
22
  end
23
23
 
24
- # @param str_value [String]
24
+ # @param str_value [String, Date, DateTime, Time]
25
25
  # @return [Date]
26
- def self.coerce_input(str_value, _ctx)
27
- Date.iso8601(str_value)
26
+ def self.coerce_input(value, ctx)
27
+ if value.is_a?(::Date)
28
+ value
29
+ elsif value.is_a?(::DateTime)
30
+ value.to_date
31
+ elsif value.is_a?(::Time)
32
+ value.to_date
33
+ else
34
+ Date.iso8601(value)
35
+ end
28
36
  rescue ArgumentError, TypeError
29
- # Invalid input
30
- nil
37
+ err = GraphQL::DateEncodingError.new(value)
38
+ ctx.schema.type_error(err, ctx)
31
39
  end
32
40
  end
33
41
  end
@@ -54,7 +54,14 @@ module GraphQL
54
54
  Time.iso8601(str_value)
55
55
  rescue ArgumentError, TypeError
56
56
  begin
57
- Date.iso8601(str_value).to_time
57
+ dt = Date.iso8601(str_value).to_time
58
+ # For compatibility, continue accepting dates given without times
59
+ # But without this, it would zero out given any time part of `str_value` (hours and/or minutes)
60
+ if dt.iso8601.start_with?(str_value)
61
+ dt
62
+ else
63
+ nil
64
+ end
58
65
  rescue ArgumentError, TypeError
59
66
  # Invalid input
60
67
  nil
@@ -35,7 +35,8 @@ module GraphQL
35
35
  # It's called when you subclass this base connection, trying to use the
36
36
  # class name to set defaults. You can call it again in the class definition
37
37
  # to override the default (or provide a value, if the default lookup failed).
38
- def edge_type(edge_type_class, edge_class: GraphQL::Relay::Edge, node_type: edge_type_class.node_type, nodes_field: self.has_nodes_field, node_nullable: self.node_nullable, edges_nullable: self.edges_nullable, edge_nullable: self.edge_nullable)
38
+ # @param field_options [Hash] Any extra keyword arguments to pass to the `field :edges, ...` and `field :nodes, ...` configurations
39
+ def edge_type(edge_type_class, edge_class: GraphQL::Relay::Edge, node_type: edge_type_class.node_type, nodes_field: self.has_nodes_field, node_nullable: self.node_nullable, edges_nullable: self.edges_nullable, edge_nullable: self.edge_nullable, field_options: nil)
39
40
  # Set this connection's graphql name
40
41
  node_type_name = node_type.graphql_name
41
42
 
@@ -43,13 +44,22 @@ module GraphQL
43
44
  @edge_type = edge_type_class
44
45
  @edge_class = edge_class
45
46
 
46
- field :edges, [edge_type_class, null: edge_nullable],
47
+ base_field_options = {
48
+ name: :edges,
49
+ type: [edge_type_class, null: edge_nullable],
47
50
  null: edges_nullable,
48
51
  description: "A list of edges.",
49
52
  legacy_edge_class: edge_class, # This is used by the old runtime only, for EdgesInstrumentation
50
- connection: false
53
+ connection: false,
54
+ }
51
55
 
52
- define_nodes_field(node_nullable) if nodes_field
56
+ if field_options
57
+ base_field_options.merge!(field_options)
58
+ end
59
+
60
+ field(**base_field_options)
61
+
62
+ define_nodes_field(node_nullable, field_options: field_options) if nodes_field
53
63
 
54
64
  description("The connection type for #{node_type_name}.")
55
65
  end
@@ -60,8 +70,8 @@ module GraphQL
60
70
  end
61
71
 
62
72
  # Add the shortcut `nodes` field to this connection and its subclasses
63
- def nodes_field(node_nullable: self.node_nullable)
64
- define_nodes_field(node_nullable)
73
+ def nodes_field(node_nullable: self.node_nullable, field_options: nil)
74
+ define_nodes_field(node_nullable, field_options: field_options)
65
75
  end
66
76
 
67
77
  def authorized?(obj, ctx)
@@ -73,7 +83,8 @@ module GraphQL
73
83
  end
74
84
 
75
85
  def visible?(ctx)
76
- node_type.visible?(ctx)
86
+ # if this is an abstract base class, there may be no `node_type`
87
+ node_type ? node_type.visible?(ctx) : super
77
88
  end
78
89
 
79
90
  # Set the default `node_nullable` for this class and its child classes. (Defaults to `true`.)
@@ -118,11 +129,18 @@ module GraphQL
118
129
 
119
130
  private
120
131
 
121
- def define_nodes_field(nullable)
122
- field :nodes, [@node_type, null: nullable],
132
+ def define_nodes_field(nullable, field_options: nil)
133
+ base_field_options = {
134
+ name: :nodes,
135
+ type: [@node_type, null: nullable],
123
136
  null: nullable,
124
137
  description: "A list of nodes.",
125
- connection: false
138
+ connection: false,
139
+ }
140
+ if field_options
141
+ base_field_options.merge!(field_options)
142
+ end
143
+ field(**base_field_options)
126
144
  end
127
145
  end
128
146
 
@@ -17,7 +17,11 @@ module GraphQL
17
17
  end
18
18
 
19
19
  def to_graphql
20
- type_defn = super
20
+ type_defn = if method(:to_graphql).super_method.arity
21
+ super(silence_deprecation_warning: true)
22
+ else
23
+ super
24
+ end
21
25
  type_defn.default_relay = default_relay?
22
26
  type_defn
23
27
  end
@@ -16,11 +16,22 @@ module GraphQL
16
16
  #
17
17
  # @param node_type [Class] A `Schema::Object` subclass
18
18
  # @param null [Boolean]
19
- def node_type(node_type = nil, null: self.node_nullable)
19
+ # @param field_options [Hash] Any extra arguments to pass to the `field :node` configuration
20
+ def node_type(node_type = nil, null: self.node_nullable, field_options: nil)
20
21
  if node_type
21
22
  @node_type = node_type
22
23
  # Add a default `node` field
23
- field :node, node_type, null: null, description: "The item at the end of the edge.", connection: false
24
+ base_field_options = {
25
+ name: :node,
26
+ type: node_type,
27
+ null: null,
28
+ description: "The item at the end of the edge.",
29
+ connection: false,
30
+ }
31
+ if field_options
32
+ base_field_options.merge!(field_options)
33
+ end
34
+ field(**base_field_options)
24
35
  end
25
36
  @node_type
26
37
  end
@@ -2,8 +2,7 @@
2
2
  module GraphQL
3
3
  module Types
4
4
  module Relay
5
- # This can be used for implementing `Query.node(id: ...)`,
6
- # or use it for inspiration for your own field definition.
5
+ # Don't use this field directly, instead, use one of these approaches:
7
6
  #
8
7
  # @example Adding this field directly
9
8
  # include GraphQL::Types::Relay::HasNodeField
@@ -19,7 +18,7 @@ module GraphQL
19
18
  # context.schema.object_from_id(id, context)
20
19
  # end
21
20
  #
22
- NodeField = GraphQL::Schema::Field.new(owner: nil, **HasNodeField.field_options, &HasNodeField.field_block)
21
+ DeprecatedNodeField = GraphQL::Schema::Field.new(owner: nil, **HasNodeField.field_options, &HasNodeField.field_block)
23
22
  end
24
23
  end
25
24
  end
@@ -2,8 +2,7 @@
2
2
  module GraphQL
3
3
  module Types
4
4
  module Relay
5
- # This can be used for implementing `Query.nodes(ids: ...)`,
6
- # or use it for inspiration for your own field definition.
5
+ # Don't use this directly, instead, use one of these:
7
6
  #
8
7
  # @example Adding this field directly
9
8
  # include GraphQL::Types::Relay::HasNodesField
@@ -21,7 +20,24 @@ module GraphQL
21
20
  # end
22
21
  # end
23
22
  #
24
- NodesField = GraphQL::Schema::Field.new(owner: nil, **HasNodesField.field_options, &HasNodesField.field_block)
23
+ def self.const_missing(const_name)
24
+ if const_name == :NodesField
25
+ message = "NodesField is deprecated, use `include GraphQL::Types::Relay::HasNodesField` instead."
26
+ message += "\n(referenced from #{caller(1, 1).first})"
27
+ GraphQL::Deprecation.warn(message)
28
+
29
+ DeprecatedNodesField
30
+ elsif const_name == :NodeField
31
+ message = "NodeField is deprecated, use `include GraphQL::Types::Relay::HasNodeField` instead."
32
+ message += "\n(referenced from #{caller(1, 1).first})"
33
+ GraphQL::Deprecation.warn(message)
34
+
35
+ DeprecatedNodeField
36
+ else
37
+ super
38
+ end
39
+ end
40
+ DeprecatedNodesField = GraphQL::Schema::Field.new(owner: nil, **HasNodesField.field_options, &HasNodesField.field_block)
25
41
  end
26
42
  end
27
43
  end
@@ -7,7 +7,7 @@ module GraphQL
7
7
 
8
8
  def self.coerce_result(value, ctx)
9
9
  str = value.to_s
10
- if str.encoding == Encoding::UTF_8
10
+ if str.ascii_only? || str.encoding == Encoding::UTF_8
11
11
  str
12
12
  elsif str.frozen?
13
13
  str.encode(Encoding::UTF_8)
@@ -11,7 +11,7 @@ module GraphQL
11
11
  end
12
12
  end
13
13
 
14
- accepts_definitions :resolve_type, :type_membership_class,
14
+ deprecated_accepts_definitions :resolve_type, :type_membership_class,
15
15
  possible_types: AcceptPossibleTypesDefinition
16
16
  ensure_defined :possible_types, :resolve_type, :resolve_type_proc, :type_membership_class
17
17
 
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module GraphQL
3
- VERSION = "1.13.0"
3
+ VERSION = "1.13.24"
4
4
  end
data/lib/graphql.rb CHANGED
@@ -4,6 +4,7 @@ require "json"
4
4
  require "set"
5
5
  require "singleton"
6
6
  require "forwardable"
7
+ require "ostruct"
7
8
 
8
9
  module GraphQL
9
10
  # forwards-compat for argument handling
@@ -17,6 +18,17 @@ module GraphQL
17
18
  class Error < StandardError
18
19
  end
19
20
 
21
+ # This error is raised when GraphQL-Ruby encounters a situation
22
+ # that it *thought* would never happen. Please report this bug!
23
+ class InvariantError < Error
24
+ def initialize(message)
25
+ message += "
26
+
27
+ This is probably a bug in GraphQL-Ruby, please report this error on GitHub: https://github.com/rmosolgo/graphql-ruby/issues/new?template=bug_report.md"
28
+ super(message)
29
+ end
30
+ end
31
+
20
32
  class RequiredImplementationMissingError < Error
21
33
  end
22
34
 
@@ -69,8 +81,10 @@ require "graphql/invalid_name_error"
69
81
  require "graphql/integer_decoding_error"
70
82
  require "graphql/integer_encoding_error"
71
83
  require "graphql/string_encoding_error"
84
+ require "graphql/date_encoding_error"
72
85
 
73
86
  require "graphql/define"
87
+ require "graphql/deprecation"
74
88
  require "graphql/base_type"
75
89
  require "graphql/object_type"
76
90
  require "graphql/enum_type"
@@ -130,7 +144,6 @@ require "graphql/authorization"
130
144
  require "graphql/unauthorized_error"
131
145
  require "graphql/unauthorized_field_error"
132
146
  require "graphql/load_application_object_failed_error"
133
- require "graphql/deprecation"
134
147
  require "graphql/directive/include_directive"
135
148
  require "graphql/directive/skip_directive"
136
149
  require "graphql/directive/deprecated_directive"
metadata CHANGED
@@ -1,15 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.0
4
+ version: 1.13.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Mosolgo
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2021-11-24 00:00:00.000000000 Z
10
+ date: 2025-03-12 00:00:00.000000000 Z
12
11
  dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: base64
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: '0'
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - ">="
24
+ - !ruby/object:Gem::Version
25
+ version: '0'
13
26
  - !ruby/object:Gem::Dependency
14
27
  name: benchmark-ips
15
28
  requirement: !ruby/object:Gem::Requirement
@@ -56,72 +69,72 @@ dependencies:
56
69
  name: minitest
57
70
  requirement: !ruby/object:Gem::Requirement
58
71
  requirements:
59
- - - "~>"
72
+ - - ">="
60
73
  - !ruby/object:Gem::Version
61
- version: 5.9.0
74
+ version: '0'
62
75
  type: :development
63
76
  prerelease: false
64
77
  version_requirements: !ruby/object:Gem::Requirement
65
78
  requirements:
66
- - - "~>"
79
+ - - ">="
67
80
  - !ruby/object:Gem::Version
68
- version: 5.9.0
81
+ version: '0'
69
82
  - !ruby/object:Gem::Dependency
70
83
  name: minitest-focus
71
84
  requirement: !ruby/object:Gem::Requirement
72
85
  requirements:
73
- - - "~>"
86
+ - - ">="
74
87
  - !ruby/object:Gem::Version
75
- version: '1.1'
88
+ version: '0'
76
89
  type: :development
77
90
  prerelease: false
78
91
  version_requirements: !ruby/object:Gem::Requirement
79
92
  requirements:
80
- - - "~>"
93
+ - - ">="
81
94
  - !ruby/object:Gem::Version
82
- version: '1.1'
95
+ version: '0'
83
96
  - !ruby/object:Gem::Dependency
84
97
  name: minitest-reporters
85
98
  requirement: !ruby/object:Gem::Requirement
86
99
  requirements:
87
- - - "~>"
100
+ - - ">="
88
101
  - !ruby/object:Gem::Version
89
- version: '1.0'
102
+ version: '0'
90
103
  type: :development
91
104
  prerelease: false
92
105
  version_requirements: !ruby/object:Gem::Requirement
93
106
  requirements:
94
- - - "~>"
107
+ - - ">="
95
108
  - !ruby/object:Gem::Version
96
- version: '1.0'
109
+ version: '0'
97
110
  - !ruby/object:Gem::Dependency
98
- name: racc
111
+ name: rake
99
112
  requirement: !ruby/object:Gem::Requirement
100
113
  requirements:
101
- - - "~>"
114
+ - - ">="
102
115
  - !ruby/object:Gem::Version
103
- version: '1.4'
116
+ version: '0'
104
117
  type: :development
105
118
  prerelease: false
106
119
  version_requirements: !ruby/object:Gem::Requirement
107
120
  requirements:
108
- - - "~>"
121
+ - - ">="
109
122
  - !ruby/object:Gem::Version
110
- version: '1.4'
123
+ version: '0'
111
124
  - !ruby/object:Gem::Dependency
112
- name: rake
125
+ name: rake-compiler
113
126
  requirement: !ruby/object:Gem::Requirement
114
127
  requirements:
115
- - - "~>"
128
+ - - ">="
116
129
  - !ruby/object:Gem::Version
117
- version: '12'
130
+ version: '0'
118
131
  type: :development
119
132
  prerelease: false
120
133
  version_requirements: !ruby/object:Gem::Requirement
121
134
  requirements:
122
- - - "~>"
135
+ - - ">="
123
136
  - !ruby/object:Gem::Version
124
- version: '12'
137
+ version: '0'
125
138
  - !ruby/object:Gem::Dependency
126
139
  name: rubocop
127
140
  requirement: !ruby/object:Gem::Requirement
@@ -245,11 +258,20 @@ files:
245
258
  - MIT-LICENSE
246
259
  - lib/generators/graphql/core.rb
247
260
  - lib/generators/graphql/enum_generator.rb
261
+ - lib/generators/graphql/field_extractor.rb
262
+ - lib/generators/graphql/input_generator.rb
263
+ - lib/generators/graphql/install/mutation_root_generator.rb
264
+ - lib/generators/graphql/install/templates/base_mutation.erb
265
+ - lib/generators/graphql/install/templates/mutation_type.erb
248
266
  - lib/generators/graphql/install_generator.rb
249
267
  - lib/generators/graphql/interface_generator.rb
250
268
  - lib/generators/graphql/loader_generator.rb
269
+ - lib/generators/graphql/mutation_create_generator.rb
270
+ - lib/generators/graphql/mutation_delete_generator.rb
251
271
  - lib/generators/graphql/mutation_generator.rb
272
+ - lib/generators/graphql/mutation_update_generator.rb
252
273
  - lib/generators/graphql/object_generator.rb
274
+ - lib/generators/graphql/orm_mutations_base.rb
253
275
  - lib/generators/graphql/relay.rb
254
276
  - lib/generators/graphql/relay_generator.rb
255
277
  - lib/generators/graphql/scalar_generator.rb
@@ -260,16 +282,18 @@ files:
260
282
  - lib/generators/graphql/templates/base_field.erb
261
283
  - lib/generators/graphql/templates/base_input_object.erb
262
284
  - lib/generators/graphql/templates/base_interface.erb
263
- - lib/generators/graphql/templates/base_mutation.erb
264
285
  - lib/generators/graphql/templates/base_object.erb
265
286
  - lib/generators/graphql/templates/base_scalar.erb
266
287
  - lib/generators/graphql/templates/base_union.erb
267
288
  - lib/generators/graphql/templates/enum.erb
268
289
  - lib/generators/graphql/templates/graphql_controller.erb
290
+ - lib/generators/graphql/templates/input.erb
269
291
  - lib/generators/graphql/templates/interface.erb
270
292
  - lib/generators/graphql/templates/loader.erb
271
293
  - lib/generators/graphql/templates/mutation.erb
272
- - lib/generators/graphql/templates/mutation_type.erb
294
+ - lib/generators/graphql/templates/mutation_create.erb
295
+ - lib/generators/graphql/templates/mutation_delete.erb
296
+ - lib/generators/graphql/templates/mutation_update.erb
273
297
  - lib/generators/graphql/templates/node_type.erb
274
298
  - lib/generators/graphql/templates/object.erb
275
299
  - lib/generators/graphql/templates/query_type.erb
@@ -323,6 +347,7 @@ files:
323
347
  - lib/graphql/dataloader/request.rb
324
348
  - lib/graphql/dataloader/request_all.rb
325
349
  - lib/graphql/dataloader/source.rb
350
+ - lib/graphql/date_encoding_error.rb
326
351
  - lib/graphql/define.rb
327
352
  - lib/graphql/define/assign_argument.rb
328
353
  - lib/graphql/define/assign_connection.rb
@@ -606,6 +631,8 @@ files:
606
631
  - lib/graphql/static_validation/rules/no_definitions_are_present_error.rb
607
632
  - lib/graphql/static_validation/rules/operation_names_are_valid.rb
608
633
  - lib/graphql/static_validation/rules/operation_names_are_valid_error.rb
634
+ - lib/graphql/static_validation/rules/query_root_exists.rb
635
+ - lib/graphql/static_validation/rules/query_root_exists_error.rb
609
636
  - lib/graphql/static_validation/rules/required_arguments_are_present.rb
610
637
  - lib/graphql/static_validation/rules/required_arguments_are_present_error.rb
611
638
  - lib/graphql/static_validation/rules/required_input_object_attributes_are_present.rb
@@ -644,6 +671,7 @@ files:
644
671
  - lib/graphql/tracing/appsignal_tracing.rb
645
672
  - lib/graphql/tracing/data_dog_tracing.rb
646
673
  - lib/graphql/tracing/new_relic_tracing.rb
674
+ - lib/graphql/tracing/notifications_tracing.rb
647
675
  - lib/graphql/tracing/platform_tracing.rb
648
676
  - lib/graphql/tracing/prometheus_tracing.rb
649
677
  - lib/graphql/tracing/prometheus_tracing/graphql_collector.rb
@@ -692,7 +720,6 @@ metadata:
692
720
  source_code_uri: https://github.com/rmosolgo/graphql-ruby
693
721
  bug_tracker_uri: https://github.com/rmosolgo/graphql-ruby/issues
694
722
  mailing_list_uri: https://tinyletter.com/graphql-ruby
695
- post_install_message:
696
723
  rdoc_options: []
697
724
  require_paths:
698
725
  - lib
@@ -707,8 +734,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
707
734
  - !ruby/object:Gem::Version
708
735
  version: '0'
709
736
  requirements: []
710
- rubygems_version: 3.2.22
711
- signing_key:
737
+ rubygems_version: 3.6.3
712
738
  specification_version: 4
713
739
  summary: A GraphQL language and runtime for Ruby
714
740
  test_files: []