apollo-federation 3.3.1 → 3.4.0

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: 7fae5c467c54e48866d1700c3ac557045efc4d6e7a0977917827d6f0a37b0870
4
- data.tar.gz: 524ef930053f086182567648fffa099902e69ecfeb759d2958df0e557644caef
3
+ metadata.gz: abfe3d2b974b652799d6a1c1ab7d756dcea8991567488d299bd202828ddc8d99
4
+ data.tar.gz: 3319040f0c287732714a6df41d076415872e98bb97d2e8bfd5151f554f2904b2
5
5
  SHA512:
6
- metadata.gz: c47a2a35d1308e9c9f4f7c7839f620f556c771230ee36ea189a93b0bd7b35def410887c3d0d1da5f01d691fbe5cda45a43938dad53e7ab5d5f6be52014909a37
7
- data.tar.gz: '099a8b6aa26465eb88a9654649f37deb76e8ab554b8c2ca9c3665ed4c2d7f2286187eb306bf070544e81e93fa09de98f274bde07e9e7c9aa2b4f2c912b113fab'
6
+ metadata.gz: 311f8b35a3c28096b69e0fdd3c06e267bc59c3ff0456de6ba1c39bfa01f72cdfdeeaf8f7571bfc1127cac2bee4b1766abd4e917b35ecaeb570898b971032e932
7
+ data.tar.gz: 87d6515278affeeba7addc41fa1bcbd0fe0b8303e297c12db5330c77b228890377e66baac944cbeb988a3e1beb171ef9716cfb82868f190aff6f075517e2f77e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # [3.4.0](https://github.com/Gusto/apollo-federation-ruby/compare/v3.3.1...v3.4.0) (2023-02-21)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * address some lint violations ([#219](https://github.com/Gusto/apollo-federation-ruby/issues/219)) ([dcd11e9](https://github.com/Gusto/apollo-federation-ruby/commit/dcd11e9384f168d125d2b60941d4bff161799824))
7
+
8
+
9
+ ### Features
10
+
11
+ * add support for the [@interface](https://github.com/interface)Object directive ([#218](https://github.com/Gusto/apollo-federation-ruby/issues/218)) ([c7b987d](https://github.com/Gusto/apollo-federation-ruby/commit/c7b987de1d2b32a4a77ceb09718373ffa5a60abb))
12
+
1
13
  ## [3.3.1](https://github.com/Gusto/apollo-federation-ruby/compare/v3.3.0...v3.3.1) (2023-01-05)
2
14
 
3
15
 
@@ -24,6 +24,10 @@ module ApolloFederation
24
24
  add_directive(name: 'inaccessible')
25
25
  end
26
26
 
27
+ def interface_object
28
+ add_directive(name: 'interfaceObject')
29
+ end
30
+
27
31
  def key(fields:, camelize: true)
28
32
  add_directive(
29
33
  name: 'key',
@@ -12,15 +12,11 @@ module ApolloFederation
12
12
  end
13
13
 
14
14
  module CommonMethods
15
- FEDERATION_2_PREFIX = <<~SCHEMA
16
- extend schema
17
- @link(url: "https://specs.apollo.dev/federation/v2.0")
18
-
19
- SCHEMA
15
+ DEFAULT_LINK_NAMESPACE = 'federation'
20
16
 
21
17
  def federation(version: '1.0', link: {})
22
18
  @federation_version = version
23
- @link = { as: 'federation' }.merge(link)
19
+ @link = { as: DEFAULT_LINK_NAMESPACE }.merge(link)
24
20
  end
25
21
 
26
22
  def federation_version
@@ -35,7 +31,7 @@ module ApolloFederation
35
31
  document_from_schema = FederatedDocumentFromSchemaDefinition.new(self, context: context)
36
32
 
37
33
  output = GraphQL::Language::Printer.new.print(document_from_schema.document)
38
- output.prepend(FEDERATION_2_PREFIX) if federation_2?
34
+ output.prepend(federation_2_prefix) if federation_2?
39
35
  output
40
36
  end
41
37
 
@@ -61,9 +57,11 @@ module ApolloFederation
61
57
  private
62
58
 
63
59
  def federation_2_prefix
60
+ federation_namespace = ", as: \"#{link_namespace}\"" if link_namespace != DEFAULT_LINK_NAMESPACE
61
+
64
62
  <<~SCHEMA
65
63
  extend schema
66
- @link(url: "https://specs.apollo.dev/federation/v2.0", as: "#{link_namespace}")
64
+ @link(url: "https://specs.apollo.dev/federation/v2.3"#{federation_namespace})
67
65
 
68
66
  SCHEMA
69
67
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ApolloFederation
4
- VERSION = '3.3.1'
4
+ VERSION = '3.4.0'
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: 3.3.1
4
+ version: 3.4.0
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: 2023-01-05 00:00:00.000000000 Z
12
+ date: 2023-02-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: graphql