graphql-fragment_cache 1.1.0 → 1.2.0
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7335be135632f708b99b20d71dc28b4711e0899c68a042f0b29950f560eeb543
|
|
4
|
+
data.tar.gz: 30674b1fff64a0457d5de9e690b8b219545702a68eaeab186f000b0f64733e34
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1a4e4a3bcaf2ef3d51e3bd3cd399474e6e1b655ab8ad7583d79157db20f4fc466bc2d6f99796a4025c62a0249ef77d3471798f868e4a63a5948ff8ecb9d4f3ae
|
|
7
|
+
data.tar.gz: 9dec0c5bb94b0b08c09854098ac2bd8ae6cbfb8ebc005925b43b862e84b1a4542d168b2e3cb2ae13b69beca39ccfe403df322f59b0239d79c055a29375214fdc
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
## master
|
|
4
4
|
|
|
5
|
+
## 1.2.0 (2020-10-26)
|
|
6
|
+
|
|
7
|
+
- [PR#37](https://github.com/DmitryTsepelev/graphql-ruby-fragment_cache/pull/37) Try to use `cache_key_with_version` or `cache_key` with Rails CacheKeyBuilder ([@bbugh][])
|
|
8
|
+
|
|
5
9
|
## 1.1.0 (2020-10-26)
|
|
6
10
|
|
|
7
11
|
- [PR#38](https://github.com/DmitryTsepelev/graphql-ruby-fragment_cache/pull/38) Support caching from other places than field or resolver ([@DmitryTsepelev][])
|
|
@@ -69,3 +73,4 @@
|
|
|
69
73
|
[@palkan]: https://github.com/palkan
|
|
70
74
|
[@ssnickolay]: https://github.com/ssnickolay
|
|
71
75
|
[@reabiliti]: https://github.com/reabiliti
|
|
76
|
+
[@bbugh]: https://github.com/bbugh
|
|
@@ -6,6 +6,8 @@ module GraphQL
|
|
|
6
6
|
class CacheKeyBuilder
|
|
7
7
|
def object_key(obj)
|
|
8
8
|
return obj.graphql_cache_key if obj.respond_to?(:graphql_cache_key)
|
|
9
|
+
return obj.cache_key_with_version if obj.respond_to?(:cache_key_with_version)
|
|
10
|
+
return obj.cache_key if obj.respond_to?(:cache_key)
|
|
9
11
|
return obj.map { |item| object_key(item) }.join("/") if obj.is_a?(Array)
|
|
10
12
|
return object_key(obj.to_a) if obj.respond_to?(:to_a)
|
|
11
13
|
|
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.
|
|
4
|
+
version: 1.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- DmitryTsepelev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-11-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: graphql
|