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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c06244e9136f28d4a4c15906ab176c9d4d83ea685c1b2a73bcac91d6f1ac8e65
4
- data.tar.gz: f9f9eec152182226fe35fc07f97f7e4a787a7ba2cd45442f2725f8c7a593a28e
3
+ metadata.gz: a520e4e58f160aa1029b433dc2b35cb3026a7b78a976510632fcfa6c85535208
4
+ data.tar.gz: cc672c543e40bdc06d20635bf9ebd41b5832ec97868931c8759ae01bc5be6d80
5
5
  SHA512:
6
- metadata.gz: 451f1e7582fcbe3a85061755ef537678c819532879994584243c9ce9424883496d4ae9db79926dd25a7b5baab374395438d670e0c1967735ca31cf07519c5058
7
- data.tar.gz: b118eda2b44fb44499745b4161cb75fc75dc59b59e29158d434b8152e23ce772b1b51c47820a8e4c9fb5c0275262b0a02d826dc1bfeda56ad3d4fac697fb3ab7
6
+ metadata.gz: 8f5ecaf9d65c0440b2a6ff9f7211a318ff8ef34daa48192615f7d9f33ee9b00362043249a221606b118cc1909c382fb150fd8a75ec92eedd50e816a61343a56f
7
+ data.tar.gz: b39f9288f6928f1998647b63495127c98180f0b4287dcd6528c0b25b9f66c26df617405ac30b484d768df3022f341b491058dde22b33d78f217ffffeb16936fb
@@ -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
- synced_value =
6
- value.map do |type, result|
7
- [type, context.query.schema.sync_lazy(result)]
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ApolloFederation
4
- VERSION = '1.1.0'
4
+ VERSION = '1.1.1'
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: 1.1.0
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-27 00:00:00.000000000 Z
12
+ date: 2020-05-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: graphql