apollo-federation 1.0.2 → 1.0.3

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: 3bba6484dd50766b5b896bc8ba754d3f2332e6dfc8f62776f45f7378316995a4
4
- data.tar.gz: eef5867e52e8fcaa45727754f25b64ecc6d1daad69baedebe499ba354c37fe72
3
+ metadata.gz: 0d3f90f1f5c832b3a29e663d64e80cc410b410c7c38dc04bf1eb7feb1d8bb5fa
4
+ data.tar.gz: 28da5806afb3b73b607ad6e3e4fa949c9e81e3a3984d2a1e402bac97429dc209
5
5
  SHA512:
6
- metadata.gz: 87870f073d0957e84c6f3618acdd12cb1348cdcb7dbeba97a27f770b85cc2f29a0a241b0f308e19d231fce153bda5189795298ffa9eb980d1833f9c182c48acf
7
- data.tar.gz: d2401b6d42952a41f34fab5657331936dcc415dc06b65d79dd32add7afa26c0a8bba60a3484f033eacaa3ffca87fa76e834c9aed6001311beea645c89cc9d089
6
+ metadata.gz: b4748b68638d6051d49a78659a9a568b3bca5f4ac98d8628ff6e4edba281a0aaf5d6baef21f215f6d93e6dd3e2948b9826ca35495de64fdf10a59b745b26ed4c
7
+ data.tar.gz: 1512dc028abf4cb815566b44ac1183081c872bfc7e4e50411a10fdc3fb9e9e8bfb949b5399884766defdd602220d5f248051f8fa478af90ce73fbbda77b31dcd
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [1.0.3](https://github.com/Gusto/apollo-federation-ruby/compare/v1.0.2...v1.0.3) (2020-03-25)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Make the tracer work with the new interpreter runtime ([#59](https://github.com/Gusto/apollo-federation-ruby/issues/59)) ([de4caf0](https://github.com/Gusto/apollo-federation-ruby/commit/de4caf0))
7
+
1
8
  ## [1.0.2](https://github.com/Gusto/apollo-federation-ruby/compare/v1.0.1...v1.0.2) (2020-02-19)
2
9
 
3
10
 
@@ -103,7 +103,7 @@ module ApolloFederation
103
103
  # because we don't have the error `location` here.
104
104
  # rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
105
105
  def self.execute_field(data, &block)
106
- context = data.fetch(:context) || data.fetch(:query).context
106
+ context = data.fetch(:context, nil) || data.fetch(:query).context
107
107
  return block.call unless context && context[:tracing_enabled]
108
108
 
109
109
  start_time_nanos = Process.clock_gettime(Process::CLOCK_MONOTONIC, :nanosecond)
@@ -116,16 +116,17 @@ module ApolloFederation
116
116
 
117
117
  end_time_nanos = Process.clock_gettime(Process::CLOCK_MONOTONIC, :nanosecond)
118
118
 
119
- # interpreter runtime
119
+ # legacy runtime
120
120
  if data.include?(:context)
121
121
  path = context.path
122
122
  field_name = context.field.graphql_name
123
123
  field_type = context.field.type.to_s
124
124
  parent_type = context.parent_type.graphql_name
125
- else # legacy runtime
125
+ else # interpreter runtime
126
126
  path = data.fetch(:path)
127
- field_name = data.fetch(:field).graphql_name
128
- field_type = data.fetch(:field).type.unwrap.graphql_name
127
+ field = data.fetch(:field)
128
+ field_name = field.graphql_name
129
+ field_type = field.type.to_type_signature
129
130
  parent_type = data.fetch(:owner).graphql_name
130
131
  end
131
132
 
@@ -147,7 +148,7 @@ module ApolloFederation
147
148
  # Optional Step 3:
148
149
  # Overwrite the end times on the trace node if the resolver was lazy.
149
150
  def self.execute_field_lazy(data, &block)
150
- context = data.fetch(:context) || data.fetch(:query).context
151
+ context = data.fetch(:context, nil) || data.fetch(:query).context
151
152
  return block.call unless context && context[:tracing_enabled]
152
153
 
153
154
  begin
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ApolloFederation
4
- VERSION = '1.0.2'
4
+ VERSION = '1.0.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apollo-federation
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Noa Elad
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-02-19 00:00:00.000000000 Z
12
+ date: 2020-03-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: graphql