apollo-federation 3.6.9 → 3.7.0

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: ca65263393e858c48499b29d8e2121b25f515708c1f831f54b03219d0f7f13b6
4
- data.tar.gz: 01cf7071792dfa1b1a4aa036c0e7ebc061f4194d52036ffef6e9a3b031336fdd
3
+ metadata.gz: 7a3acf99a330df8e02ac0217773a9443b400d97a1ad47ed518a2f5631499711f
4
+ data.tar.gz: f9482d80b73b9ba0396fc51676a1ab28a12910c6a7fc3b7666421efff705a1ef
5
5
  SHA512:
6
- metadata.gz: aae86a03f465d0a063385b6e6cc60f6c50363b67261623ca3531656e73b0a6a662a811f207accbe3f504cd88fd9442a2710abde4ca9438a853fc65ae0bc86763
7
- data.tar.gz: 1de8a1c7007064e4ec3d327cc38c7e08a80ab3ffd6ca1f6956d4e360dbb4bc22425cbd751f0d04c4b94a4157bc3b30422871c86e86b8e77f5078142c84b10231
6
+ metadata.gz: 10f57a06a03f32dec83f3fbbd293c695a8019914b577b5ae25e6fedd86fa0d0e27be640ccc9261a5fed2f22154535e39d9d9408bfd16cce016ff2bd9cea7beda
7
+ data.tar.gz: c7bc892658495ae8576159aa0c14be88837744bfde4dbcd30acb15b443eb817b17400e49f8cd46c59e161ac5975374e84f5405bb30eb8f0280fd80dc2a646f51
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [3.7.0](https://github.com/Gusto/apollo-federation-ruby/compare/v3.6.9...v3.7.0) (2023-05-26)
2
+
3
+
4
+ ### Features
5
+
6
+ * support [@key](https://github.com/key) directive resolvable argument ([#249](https://github.com/Gusto/apollo-federation-ruby/issues/249)) ([6df7030](https://github.com/Gusto/apollo-federation-ruby/commit/6df70305d3e6035946c9ac35d74387014b08b28a))
7
+
1
8
  ## [3.6.9](https://github.com/Gusto/apollo-federation-ruby/compare/v3.6.8...v3.6.9) (2023-05-23)
2
9
 
3
10
 
data/README.md CHANGED
@@ -178,6 +178,14 @@ class User < BaseObject
178
178
  end
179
179
  ```
180
180
 
181
+ As well as non-resolvable keys:
182
+
183
+ ```ruby
184
+ class User < BaseObject
185
+ key fields: :id, resolvable: false
186
+ end
187
+ ```
188
+
181
189
  See [field set syntax](#field-set-syntax) for more details on the format of the `fields` option.
182
190
 
183
191
  ### The `@external` directive
@@ -32,13 +32,15 @@ module ApolloFederation
32
32
  add_directive(name: 'tag', arguments: [name: 'name', values: name])
33
33
  end
34
34
 
35
- def key(fields:, camelize: true)
35
+ def key(fields:, camelize: true, resolvable: true)
36
+ arguments = [
37
+ name: 'fields',
38
+ values: ApolloFederation::FieldSetSerializer.serialize(fields, camelize: camelize),
39
+ ]
40
+ arguments.append(name: 'resolvable', values: resolvable) unless resolvable
36
41
  add_directive(
37
42
  name: 'key',
38
- arguments: [
39
- name: 'fields',
40
- values: ApolloFederation::FieldSetSerializer.serialize(fields, camelize: camelize),
41
- ],
43
+ arguments: arguments,
42
44
  )
43
45
  end
44
46
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ApolloFederation
4
- VERSION = '3.6.9'
4
+ VERSION = '3.7.0'
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: 3.6.9
4
+ version: 3.7.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-05-23 00:00:00.000000000 Z
12
+ date: 2023-05-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: graphql