apollo-federation 0.4.1 → 0.4.2
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/README.md +1 -1
- data/lib/apollo-federation/tracing.rb +9 -4
- 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: 9b23e8e6582014ecb08d00aa62407aa4e87af5ba7d0dc1eae13a69a952e75650
|
4
|
+
data.tar.gz: 0a75121a8d4648dbbdc033698776e55976be0a203be8db7f5fefa6e23cd54094
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c76a59f808c1226153708164828d48a447d4244d94b7d335cbf9afa63829197819bcdb80a48e08f268d468be394e1d5aa49f59c6be3df9e286e39dadf73cb968
|
7
|
+
data.tar.gz: 0a0cfc682cfb2cef505eb01d36ae2aee19a21f33c60fc65749a16a9177641e442640a574af5981799db22eae110e8e6a7b94449188ef9415569613cb3d6425cc
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## [0.4.2](https://github.com/Gusto/apollo-federation-ruby/compare/v0.4.1...v0.4.2) (2019-10-21)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* typo in exception message ([#33](https://github.com/Gusto/apollo-federation-ruby/issues/33)) ([0a337f3](https://github.com/Gusto/apollo-federation-ruby/commit/0a337f3))
|
7
|
+
|
1
8
|
## [0.4.1](https://github.com/Gusto/apollo-federation-ruby/compare/v0.4.0...v0.4.1) (2019-10-12)
|
2
9
|
|
3
10
|
|
data/README.md
CHANGED
@@ -172,7 +172,7 @@ To support [federated tracing](https://www.apollographql.com/docs/apollo-server/
|
|
172
172
|
```
|
173
173
|
|
174
174
|
## Known Issues and Limitations
|
175
|
-
-
|
175
|
+
- Only works with class-based schemas, the legacy `.define` API will not be supported
|
176
176
|
- Does not add directives to the output of `Schema.to_definition`. Since `graphql-ruby` doesn't natively support schema directives, the directives will only be visible to the [Apollo Gateway](https://www.apollographql.com/docs/apollo-server/api/apollo-gateway/) through the `Query._service` field (see the [Apollo Federation specification](https://www.apollographql.com/docs/apollo-server/federation/federation-spec/))
|
177
177
|
|
178
178
|
## Maintainers
|
@@ -4,6 +4,14 @@ module ApolloFederation
|
|
4
4
|
module Tracing
|
5
5
|
KEY = :ftv1
|
6
6
|
DEBUG_KEY = "#{KEY}_debug".to_sym
|
7
|
+
class NotInstalledError < StandardError
|
8
|
+
MESSAGE = 'Apollo Federation Tracing not installed. \
|
9
|
+
Add `use ApolloFederation::Tracing` to your schema.'
|
10
|
+
|
11
|
+
def message
|
12
|
+
MESSAGE
|
13
|
+
end
|
14
|
+
end
|
7
15
|
|
8
16
|
module_function
|
9
17
|
|
@@ -19,10 +27,7 @@ module ApolloFederation
|
|
19
27
|
return result unless result.context[:tracing_enabled]
|
20
28
|
|
21
29
|
trace = result.context.namespace(KEY)
|
22
|
-
unless trace[:start_time]
|
23
|
-
raise StandardError.new, 'Apollo Federation Tracing not installed. \
|
24
|
-
Add `use ApollFederation::Tracing` to your schema.'
|
25
|
-
end
|
30
|
+
raise NotInstalledError unless trace[:start_time]
|
26
31
|
|
27
32
|
result['errors']&.each do |error|
|
28
33
|
trace[:node_map].add_error(error)
|
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: 0.4.
|
4
|
+
version: 0.4.2
|
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: 2019-10-
|
12
|
+
date: 2019-10-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: graphql
|