graphql 2.5.13 → 2.5.14

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7a8341f92c813c7cf9966f197291a352352fed53c76a321b59741ab5fb2d9088
4
- data.tar.gz: 6143a1d8d8fca259d978ead2529336e16601eff0a620146244677c419b374679
3
+ metadata.gz: deb0ac3bea401c53909c6880f133ee810f3e0882c7a023ed33b27f7b12a4c82b
4
+ data.tar.gz: be2d8e55d131a62863d4ecf6665c22c9ba6c9ba467bdd205ec83d96f9b952098
5
5
  SHA512:
6
- metadata.gz: a19043a93971994bf9d8b19a9d901cb6bff5f3c4d3037dc42c7475e9bc919d4c4eef53975becfac6600b0b3e2466cac66620dcaa003b831bded920925e0ee0f9
7
- data.tar.gz: 51910baef2d36f72f2921e990735f1ea350c3e8cb8f2db033d95fc2321ab0657b49d0b1a9402789828c9a7fc81481f9a8662d87e7568fc35be7db539f497fbdd
6
+ metadata.gz: 494296336070a677965ceaaad1e14412f1b8a6589ab3ae3466c5c00071a59f763f2af2df8aacd394c9fd912afd0a5f9df988991411213dbfab285d762d1a6e75
7
+ data.tar.gz: 8d65056236ddb32eabe498d93bb026f8d7ea145b627d6a4554b2add2d8c00db202f9bbe16cae816e58aeb6dd77f3e8aed99dcaa802af2643f73b03a5d10b0b63
@@ -42,6 +42,14 @@ module GraphQL
42
42
  end
43
43
  end
44
44
 
45
+ def depth
46
+ @depth ||= if @graphql_parent
47
+ @graphql_parent.depth + 1
48
+ else
49
+ 1
50
+ end
51
+ end
52
+
45
53
  attr_accessor :graphql_dead
46
54
  attr_reader :graphql_parent, :graphql_result_name, :graphql_is_non_null_in_parent,
47
55
  :graphql_application_value, :graphql_result_type, :graphql_selections, :graphql_is_eager, :ast_node, :graphql_arguments, :graphql_field
@@ -890,7 +890,6 @@ module GraphQL
890
890
  # @return [GraphQL::Execution::Lazy, Object] If loading `object` will be deferred, it's a wrapper over it.
891
891
  def after_lazy(lazy_obj, field:, owner_object:, arguments:, ast_node:, result:, result_name:, eager: false, runtime_state:, trace: true, &block)
892
892
  if lazy?(lazy_obj)
893
- orig_result = result
894
893
  was_authorized_by_scope_items = runtime_state.was_authorized_by_scope_items
895
894
  lazy = GraphQL::Execution::Lazy.new(field: field) do
896
895
  # This block might be called in a new fiber;
@@ -900,13 +899,13 @@ module GraphQL
900
899
  runtime_state.current_field = field
901
900
  runtime_state.current_arguments = arguments
902
901
  runtime_state.current_result_name = result_name
903
- runtime_state.current_result = orig_result
902
+ runtime_state.current_result = result
904
903
  runtime_state.was_authorized_by_scope_items = was_authorized_by_scope_items
905
904
  # Wrap the execution of _this_ method with tracing,
906
905
  # but don't wrap the continuation below
907
- result = nil
906
+ sync_result = nil
908
907
  inner_obj = begin
909
- result = if trace
908
+ sync_result = if trace
910
909
  @current_trace.begin_execute_field(field, owner_object, arguments, query)
911
910
  @current_trace.execute_field_lazy(field: field, query: query, object: owner_object, arguments: arguments, ast_node: ast_node) do
912
911
  schema.sync_lazy(lazy_obj)
@@ -924,7 +923,7 @@ module GraphQL
924
923
  end
925
924
  ensure
926
925
  if trace
927
- @current_trace.end_execute_field(field, owner_object, arguments, query, result)
926
+ @current_trace.end_execute_field(field, owner_object, arguments, query, sync_result)
928
927
  end
929
928
  end
930
929
  yield(inner_obj, runtime_state)
@@ -934,12 +933,7 @@ module GraphQL
934
933
  lazy.value
935
934
  else
936
935
  set_result(result, result_name, lazy, false, false) # is_non_null is irrelevant here
937
- current_depth = 0
938
- while result
939
- current_depth += 1
940
- result = result.graphql_parent
941
- end
942
- @dataloader.lazy_at_depth(current_depth, lazy)
936
+ @dataloader.lazy_at_depth(result.depth, lazy)
943
937
  lazy
944
938
  end
945
939
  else
@@ -41,7 +41,9 @@ module GraphQL
41
41
  if query.selected_operation_name
42
42
  span.set_data('graphql.operation.name', query.selected_operation_name)
43
43
  end
44
- span.set_data('graphql.operation.type', query.selected_operation.operation_type)
44
+ if query.selected_operation
45
+ span.set_data('graphql.operation.type', query.selected_operation.operation_type)
46
+ end
45
47
  end
46
48
  end
47
49
 
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module GraphQL
3
- VERSION = "2.5.13"
3
+ VERSION = "2.5.14"
4
4
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.13
4
+ version: 2.5.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Mosolgo
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-09-22 00:00:00.000000000 Z
10
+ date: 2025-10-08 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: base64