apollo-federation 1.1.1 → 1.1.2
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 +7 -0
- data/lib/apollo-federation/schema.rb +4 -1
- data/lib/apollo-federation/service_field.rb +10 -2
- 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: 2363ab0739ef4119e0c16d88151e575f664c33d9a66eb2a3c6aa6756770d759c
|
|
4
|
+
data.tar.gz: 8ed8b3c011adcecdaaed0f5aebe7a159079c56ea2296878c6c18a93a04f257d4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5f54f342bb56723f70550b1b0748de3c14191281f3bc1a8d496cc9b893d2c8bbb278bdf58d11f70141fd59ef1710d48d2a8de5b4b98940124edf253d688bf3fa
|
|
7
|
+
data.tar.gz: a762847991cda4b9526ca56686991a752fc24d33a5cbeea1a01f2b863ea2667b823fd2f750ac3c40052627c647b1bc70b9395a1e4dae58a25594b0e7f70233ad
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.1.2](https://github.com/Gusto/apollo-federation-ruby/compare/v1.1.1...v1.1.2) (2020-06-09)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* Fix _service field type owner ([#70](https://github.com/Gusto/apollo-federation-ruby/issues/70)) ([364e54f](https://github.com/Gusto/apollo-federation-ruby/commit/364e54fbb333b7cd4fe30f04bf72733b0e18d3f4))
|
|
7
|
+
|
|
1
8
|
## [1.1.1](https://github.com/Gusto/apollo-federation-ruby/compare/v1.1.0...v1.1.1) (2020-05-29)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -33,7 +33,7 @@ module ApolloFederation
|
|
|
33
33
|
base = query_obj.metadata[:type_class]
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
-
Class.new(base) do
|
|
36
|
+
klass = Class.new(base) do
|
|
37
37
|
# TODO: Maybe the name should inherit from the original Query name
|
|
38
38
|
# Or MAYBE we should just modify the original class?
|
|
39
39
|
graphql_name 'Query'
|
|
@@ -41,6 +41,9 @@ module ApolloFederation
|
|
|
41
41
|
include EntitiesField
|
|
42
42
|
include ServiceField
|
|
43
43
|
end
|
|
44
|
+
|
|
45
|
+
klass.define_service_field
|
|
46
|
+
klass
|
|
44
47
|
end
|
|
45
48
|
end
|
|
46
49
|
|
|
@@ -5,9 +5,17 @@ require 'apollo-federation/service'
|
|
|
5
5
|
|
|
6
6
|
module ApolloFederation
|
|
7
7
|
module ServiceField
|
|
8
|
-
|
|
8
|
+
def self.included(base)
|
|
9
|
+
base.extend(ClassMethods)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
module ClassMethods
|
|
13
|
+
extend GraphQL::Schema::Member::HasFields
|
|
9
14
|
|
|
10
|
-
|
|
15
|
+
def define_service_field
|
|
16
|
+
field(:_service, Service, null: false)
|
|
17
|
+
end
|
|
18
|
+
end
|
|
11
19
|
|
|
12
20
|
def _service
|
|
13
21
|
schema_class = context.schema.is_a?(GraphQL::Schema) ? context.schema.class : context.schema
|
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.1.
|
|
4
|
+
version: 1.1.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: 2020-
|
|
12
|
+
date: 2020-06-09 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: graphql
|