graphql 2.3.15 → 2.3.16

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fe9b171f92b1787bd8733bf0fad9843275a95d39905719c5f10694e7999beed9
4
- data.tar.gz: fa6a3502ddf18968eb7f371529225c5982fef12b3f2bee95ffb68dc6bc121382
3
+ metadata.gz: eba638ac8e67c3d902cbc181c1236f58ed00b58c17ddb3dfa49a506e37c2e413
4
+ data.tar.gz: 2b7912e761ebbfc5188603c90f0ec273ed06d58cf648f2690be483b38760cde5
5
5
  SHA512:
6
- metadata.gz: 7cc5ff5de4cc47a3de35255c92410895f381f9bb1a0fd4e0d049e7071a63ed9ab6e57a8d5994447ea8cbf01f7f43de069c3e1ef2804b16385ce783e45186dfcf
7
- data.tar.gz: 8232a0a0dc4722cf85d17cd6a8870ee1208d1b37bc3ba2c15b8b69c5ba05607bcc12b7140b7df7964230087b00a59b5c928d510c6adfe8506ec2d0720d77832c
6
+ metadata.gz: 2eddfe7d8008e1fa918f3e5ab12deab7f85e4edf4d73474f8fd878c321c10f6d711ef7edcdb53ec227852f240feca0fbcd1e18850ec2665ab58ff1af005fee71
7
+ data.tar.gz: 0464ae90b5770e507bcffb02ef8b99fbff8da6f521c1704306674aca5bfd96609b0c72a088589f650e64466b8746661a3967d470e325bf4afe8100a68fadafa5
@@ -110,7 +110,15 @@ module GraphQL
110
110
  end
111
111
 
112
112
  def determine_field_indent(send_node)
113
- surrounding_node = send_node.parent.parent
113
+ surrounding_node = send_node.parent
114
+ if !surrounding_node.is_a?(RuboCop::AST::ClassNode)
115
+ surrounding_node = surrounding_node.parent
116
+ end
117
+
118
+ if !surrounding_node.is_a?(RuboCop::AST::ClassNode)
119
+ raise "Invariant: Something went wrong in GraphQL-Ruby, couldn't find surrounding class definition for field (#{send_node}).\n\nPlease report this error on GitHub."
120
+ end
121
+
114
122
  surrounding_source = surrounding_node.source
115
123
  indent_test_idx = send_node.location.expression.begin_pos - surrounding_node.source_range.begin_pos - 1
116
124
  field_indent = "".dup
@@ -55,6 +55,7 @@ module GraphQL
55
55
  visible_field = dummy_query.types.field(object_type, field_name) # rubocop:disable Development/ContextIsPassedCop
56
56
  if visible_field
57
57
  dummy_query.context.dataloader.run_isolated {
58
+ query_context[:current_field] = visible_field
58
59
  field_args = visible_field.coerce_arguments(graphql_result, arguments, query_context)
59
60
  field_args = schema.sync_lazy(field_args)
60
61
  if visible_field.extras.any?
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module GraphQL
3
- VERSION = "2.3.15"
3
+ VERSION = "2.3.16"
4
4
  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: 2.3.15
4
+ version: 2.3.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Mosolgo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-10 00:00:00.000000000 Z
11
+ date: 2024-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base64
@@ -168,16 +168,16 @@ dependencies:
168
168
  name: rubocop
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - '='
171
+ - - ">="
172
172
  - !ruby/object:Gem::Version
173
- version: '1.12'
173
+ version: '0'
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - '='
178
+ - - ">="
179
179
  - !ruby/object:Gem::Version
180
- version: '1.12'
180
+ version: '0'
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: jekyll
183
183
  requirement: !ruby/object:Gem::Requirement