graphql-result_cache 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/graphql/result_cache/context_config.rb +1 -1
- data/lib/graphql/result_cache/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1d361dfd45a9552525e8b03e108f86a6189270ed20d4b37918e685b3d0e8efc
|
4
|
+
data.tar.gz: a489db1d9df11ad98b82781a6e570bdf769c8f86d8388ac7f49f591916b03962
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0bed904ded2a50739427161d9b66d4e7c446cdb0dbfdacbe38ebae1f4f096d028395d250322a9e25c23a5aa017554e2d5e71bb0b4e79c9b13af2f7bdf84d178d
|
7
|
+
data.tar.gz: 7f4c54005444a8ceda2551631f11f2ba9b99a4772afb42a55fd0faa854ffb844d5a2ef0605b53c9d1c7e9d443482d0e67e73970816ef2951227e2387c780493c
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
graphql-result_cache (0.1.
|
4
|
+
graphql-result_cache (0.1.6)
|
5
5
|
graphql (~> 1.9)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
10
|
diff-lcs (1.3)
|
11
|
-
graphql (1.9.
|
11
|
+
graphql (1.9.12)
|
12
12
|
rake (10.5.0)
|
13
13
|
rspec (3.8.0)
|
14
14
|
rspec-core (~> 3.8.0)
|
@@ -39,7 +39,7 @@ module GraphQL
|
|
39
39
|
def cache_or_amend_result result, config_of_query
|
40
40
|
config_of_query.each do |config|
|
41
41
|
if config[:result].nil?
|
42
|
-
cache.write config[:key],
|
42
|
+
cache.write config[:key], dig(result, 'data', *config[:path]), cache_write_options.merge(expires_in: expires_in)
|
43
43
|
else
|
44
44
|
# result already got from cache, need to amend to response
|
45
45
|
result_hash = result.to_h
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphql-result_cache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ying Fu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|