apollo-federation 1.1.0 → 1.1.1
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/entity_type_resolution_extension.rb +9 -11
- 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: a520e4e58f160aa1029b433dc2b35cb3026a7b78a976510632fcfa6c85535208
|
4
|
+
data.tar.gz: cc672c543e40bdc06d20635bf9ebd41b5832ec97868931c8759ae01bc5be6d80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f5ecaf9d65c0440b2a6ff9f7211a318ff8ef34daa48192615f7d9f33ee9b00362043249a221606b118cc1909c382fb150fd8a75ec92eedd50e816a61343a56f
|
7
|
+
data.tar.gz: b39f9288f6928f1998647b63495127c98180f0b4287dcd6528c0b25b9f66c26df617405ac30b484d768df3022f341b491058dde22b33d78f217ffffeb16936fb
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## [1.1.1](https://github.com/Gusto/apollo-federation-ruby/compare/v1.1.0...v1.1.1) (2020-05-29)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* **lazy resolve:** Handle problem with sync resolve ([#58](https://github.com/Gusto/apollo-federation-ruby/issues/58)) ([e66c22b](https://github.com/Gusto/apollo-federation-ruby/commit/e66c22ba6fe51a7c282190ee77bd02dbfa514a66))
|
7
|
+
|
1
8
|
# [1.1.0](https://github.com/Gusto/apollo-federation-ruby/compare/v1.0.4...v1.1.0) (2020-05-27)
|
2
9
|
|
3
10
|
|
@@ -2,17 +2,15 @@
|
|
2
2
|
|
3
3
|
class EntityTypeResolutionExtension < GraphQL::Schema::FieldExtension
|
4
4
|
def after_resolve(value:, context:, **_rest)
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
value.map do |type, result|
|
6
|
+
context.schema.after_lazy(result) do |resolved_value|
|
7
|
+
# TODO: This isn't 100% correct: if (for some reason) 2 different resolve_reference calls
|
8
|
+
# return the same object, it might not have the right type
|
9
|
+
# Right now, apollo-federation just adds a __typename property to the result,
|
10
|
+
# but I don't really like the idea of modifying the resolved object
|
11
|
+
context[resolved_value] = type
|
12
|
+
resolved_value
|
8
13
|
end
|
9
|
-
|
10
|
-
# TODO: This isn't 100% correct: if (for some reason) 2 different resolve_reference calls
|
11
|
-
# return the same object, it might not have the right type
|
12
|
-
# Right now, apollo-federation just adds a __typename property to the result,
|
13
|
-
# but I don't really like the idea of modifying the resolved object
|
14
|
-
synced_value.each { |type, result| context[result] = type }
|
15
|
-
|
16
|
-
synced_value.map { |_, result| result }
|
14
|
+
end
|
17
15
|
end
|
18
16
|
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: 1.1.
|
4
|
+
version: 1.1.1
|
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-05-
|
12
|
+
date: 2020-05-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: graphql
|