apollo-federation 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a520e4e58f160aa1029b433dc2b35cb3026a7b78a976510632fcfa6c85535208
4
- data.tar.gz: cc672c543e40bdc06d20635bf9ebd41b5832ec97868931c8759ae01bc5be6d80
3
+ metadata.gz: 2363ab0739ef4119e0c16d88151e575f664c33d9a66eb2a3c6aa6756770d759c
4
+ data.tar.gz: 8ed8b3c011adcecdaaed0f5aebe7a159079c56ea2296878c6c18a93a04f257d4
5
5
  SHA512:
6
- metadata.gz: 8f5ecaf9d65c0440b2a6ff9f7211a318ff8ef34daa48192615f7d9f33ee9b00362043249a221606b118cc1909c382fb150fd8a75ec92eedd50e816a61343a56f
7
- data.tar.gz: b39f9288f6928f1998647b63495127c98180f0b4287dcd6528c0b25b9f66c26df617405ac30b484d768df3022f341b491058dde22b33d78f217ffffeb16936fb
6
+ metadata.gz: 5f54f342bb56723f70550b1b0748de3c14191281f3bc1a8d496cc9b893d2c8bbb278bdf58d11f70141fd59ef1710d48d2a8de5b4b98940124edf253d688bf3fa
7
+ data.tar.gz: a762847991cda4b9526ca56686991a752fc24d33a5cbeea1a01f2b863ea2667b823fd2f750ac3c40052627c647b1bc70b9395a1e4dae58a25594b0e7f70233ad
@@ -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
- extend GraphQL::Schema::Member::HasFields
8
+ def self.included(base)
9
+ base.extend(ClassMethods)
10
+ end
11
+
12
+ module ClassMethods
13
+ extend GraphQL::Schema::Member::HasFields
9
14
 
10
- field(:_service, Service, null: false)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ApolloFederation
4
- VERSION = '1.1.1'
4
+ VERSION = '1.1.2'
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.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-05-29 00:00:00.000000000 Z
12
+ date: 2020-06-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: graphql