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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 92f976bf624ea2dc6d01ddc126f2fd83d8e6f4f4ff8100aaa8d19f7121b55ac8
4
- data.tar.gz: e6a6b9db376504172050286130adf835276021fadfd74801f69cde81717d8c1a
3
+ metadata.gz: 9b23e8e6582014ecb08d00aa62407aa4e87af5ba7d0dc1eae13a69a952e75650
4
+ data.tar.gz: 0a75121a8d4648dbbdc033698776e55976be0a203be8db7f5fefa6e23cd54094
5
5
  SHA512:
6
- metadata.gz: 7457cd2e513cbfb792a484e6bba2aace79aef7c79d0aebdb1f5323fa37e99ea7ba7ad3a1be42702bc5058713fd468dbd3c57b0891e27dbc4d5690b20fb6dce5d
7
- data.tar.gz: 64f79b2ee040273c0304886f3ed025485db08c33077d101bbcb721a36f6ea71b51e255cfdd8422720a1370046100c358eefe1d5c2424c7332ba69c23a76a8f45
6
+ metadata.gz: c76a59f808c1226153708164828d48a447d4244d94b7d335cbf9afa63829197819bcdb80a48e08f268d468be394e1d5aa49f59c6be3df9e286e39dadf73cb968
7
+ data.tar.gz: 0a0cfc682cfb2cef505eb01d36ae2aee19a21f33c60fc65749a16a9177641e442640a574af5981799db22eae110e8e6a7b94449188ef9415569613cb3d6425cc
@@ -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
- - Currently only works with class-based schemas
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ApolloFederation
4
- VERSION = '0.4.1'
4
+ VERSION = '0.4.2'
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: 0.4.1
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 00:00:00.000000000 Z
12
+ date: 2019-10-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: graphql