graphql-fragment_cache 1.8.0 → 1.9.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: 7ad8755b7ad0579ac5b5a663a9c680fd5132ef818f39881b4df5d2a9c09a3d4b
4
- data.tar.gz: b2132f313316e1f413b2fd07120b3c2a8c0465f66cc6183f32661a8f606074a4
3
+ metadata.gz: 7232944f544614a7b67e6efea2048a31b4d7ea219ef9785a55491c564be7a3c8
4
+ data.tar.gz: 7249e56428dc4ff290182f10d519a442bd1bcfb85dc8f4d328dac42067a8f2e9
5
5
  SHA512:
6
- metadata.gz: 562098e2cfdb77fd07eef41b316fff4b052dcd7fab1b1b05672b5c2c5bf7f3627a7f3f754adae2e6a8c902816f7fb78428c85ab6d9e29395b33bfc1bfab4663e
7
- data.tar.gz: 309be07ee6de769b32b2d13b258d3e0bd90ee043d4198d10f44c28edcfdbfafc3a52b0f81629fe0b40cc4efb8f8c62b5d801e3c42bec985b8426d205c41e724f
6
+ metadata.gz: f5102cb286a4a4acdd2b3c323329d9cf9b43ddec005776e5d0e4c342314d25faf52a71bfeba21d99f5316f4f743b598b15549f498c5004a14132ba4fc95f9b7e
7
+ data.tar.gz: 0fb760a419d58c9ab8488fd8464c69cbc740c9bc9f4d55b80ee527f22e6cd0f9a87ae5cff4db3b42c5636b45c7d76bbe5924e929359be6e904a9fcd83f79a781
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ## 1.9.0 (2021-08-19)
6
+
7
+ - [PR#71](https://github.com/DmitryTsepelev/graphql-ruby-fragment_cache/pull/71) Add selection alias to cache keys ([@mretzak][])
8
+
5
9
  ## 1.8.0 (2021-05-13)
6
10
 
7
11
  - [PR#65](https://github.com/DmitryTsepelev/graphql-ruby-fragment_cache/pull/65) Add default options ([@jeromedalbert][])
@@ -111,3 +115,4 @@
111
115
  [@reabiliti]: https://github.com/reabiliti
112
116
  [@bbugh]: https://github.com/bbugh
113
117
  [@jeromedalbert]: https://github.com/jeromedalbert
118
+ [@mretzak]: https://github.com/mretzak
@@ -22,6 +22,8 @@ module GraphQL
22
22
  children = val.selections.empty? ? "" : "[#{val.selections.to_selections_key}]"
23
23
 
24
24
  field_name = val.field.name
25
+ field_alias = val.ast_nodes.map(&:alias).join
26
+ field_name = "#{field_alias}:#{field_name}" unless field_alias.empty?
25
27
 
26
28
  unless val.arguments.empty?
27
29
  args = val.arguments.map { "#{_1}:#{traverse_argument(_2)}" }.sort.join(",")
@@ -2,6 +2,6 @@
2
2
 
3
3
  module GraphQL
4
4
  module FragmentCache
5
- VERSION = "1.8.0"
5
+ VERSION = "1.9.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql-fragment_cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - DmitryTsepelev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-13 00:00:00.000000000 Z
11
+ date: 2021-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphql