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 +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/apollo-federation/tracing/tracer.rb +7 -6
- data/lib/apollo-federation/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d3f90f1f5c832b3a29e663d64e80cc410b410c7c38dc04bf1eb7feb1d8bb5fa
|
4
|
+
data.tar.gz: 28da5806afb3b73b607ad6e3e4fa949c9e81e3a3984d2a1e402bac97429dc209
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
#
|
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 #
|
125
|
+
else # interpreter runtime
|
126
126
|
path = data.fetch(:path)
|
127
|
-
|
128
|
-
|
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
|
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.
|
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-
|
12
|
+
date: 2020-03-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: graphql
|