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 +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/apollo-federation/object.rb +4 -0
- data/lib/apollo-federation/schema.rb +6 -8
- 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: abfe3d2b974b652799d6a1c1ab7d756dcea8991567488d299bd202828ddc8d99
|
|
4
|
+
data.tar.gz: 3319040f0c287732714a6df41d076415872e98bb97d2e8bfd5151f554f2904b2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
|
@@ -12,15 +12,11 @@ module ApolloFederation
|
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
module CommonMethods
|
|
15
|
-
|
|
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:
|
|
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(
|
|
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.
|
|
64
|
+
@link(url: "https://specs.apollo.dev/federation/v2.3"#{federation_namespace})
|
|
67
65
|
|
|
68
66
|
SCHEMA
|
|
69
67
|
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.
|
|
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-
|
|
12
|
+
date: 2023-02-21 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: graphql
|