graphql-fragment_cache 1.20.2 → 1.20.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +2 -0
- data/lib/graphql/fragment_cache/railtie.rb +1 -1
- data/lib/graphql/fragment_cache/schema/instrumentation.rb +19 -0
- data/lib/graphql/fragment_cache/version.rb +1 -1
- data/lib/graphql/fragment_cache.rb +1 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60e358fe9888ea1f73756e680a2cc7b6182a64986d42f5a59f94b2fca726764e
|
4
|
+
data.tar.gz: 794e7475d1e224a4f86da8f7326cd060dbfcf875da97b31c7dd6a1b5d17cef58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 327232242668577406dd4eefc0ed35aa9349e26d77d2b7205814a9456f431785e02e414348c541dd84f9a525f1e9f58766af6698b0b0318b99cd4c01dd0c073a
|
7
|
+
data.tar.gz: be792187fb433608540d1da350be76353ce14b36137ea9ba25b480805787a3ebcb3500a9077dae0ede01ff8c965732491e63a23157dff2bc5afab89079ae26f9
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,15 @@
|
|
2
2
|
|
3
3
|
## master
|
4
4
|
|
5
|
+
## 1.20.4 (2024-10-05)
|
6
|
+
|
7
|
+
- [PR#119](https://github.com/DmitryTsepelev/graphql-ruby-fragment_cache/pull/119) Fix Rails cache_format_version deprecation ([@noma4i][])
|
8
|
+
|
9
|
+
## 1.20.3 (2024-09-06)
|
10
|
+
|
11
|
+
- [PR#117](https://github.com/DmitryTsepelev/graphql-ruby-fragment_cache/pull/117) Deprecate old ruby and gql versions ([@DmitryTsepelev][])
|
12
|
+
- [PR#116](https://github.com/DmitryTsepelev/graphql-ruby-fragment_cache/pull/116) Migrate CompiledQueries instrumentation to tracer ([@DmitryTsepelev][])
|
13
|
+
|
5
14
|
## 1.20.2 (2024-06-01)
|
6
15
|
|
7
16
|
- [PR#115](https://github.com/DmitryTsepelev/graphql-ruby-fragment_cache/pull/115) Fix deprecation warning for cache_format_version in Rails 7.1 ([@rince][])
|
@@ -196,3 +205,4 @@
|
|
196
205
|
[@rince]: https://github.com/rince
|
197
206
|
[@camero2734]: https://github.com/camero2734
|
198
207
|
[@diegofigueroa]: https://github.com/diegofigueroa
|
208
|
+
[@noma4i]: https://github.com/noma4i
|
data/README.md
CHANGED
@@ -11,7 +11,7 @@ module GraphQL
|
|
11
11
|
class << self
|
12
12
|
def store=(store)
|
13
13
|
if Rails.version.to_f >= 7.0 && Rails.application
|
14
|
-
cache_format_version =
|
14
|
+
cache_format_version = 7.0
|
15
15
|
ActiveSupport::Cache.format_version = cache_format_version if cache_format_version
|
16
16
|
end
|
17
17
|
|
@@ -22,6 +22,25 @@ module GraphQL
|
|
22
22
|
!query.valid? ||
|
23
23
|
GraphQL::FragmentCache.skip_cache_when_query_has_errors? && query.context.errors.any?
|
24
24
|
end
|
25
|
+
|
26
|
+
# Instrumentations were deprecated in 2.2.5, this is a module to migrate to new interface
|
27
|
+
module Tracer
|
28
|
+
def execute_query(query:)
|
29
|
+
result = super
|
30
|
+
ensure
|
31
|
+
GraphQL::FragmentCache::Schema::Instrumentation.after_query(query)
|
32
|
+
result
|
33
|
+
end
|
34
|
+
|
35
|
+
def execute_multiplex(multiplex:)
|
36
|
+
result = super
|
37
|
+
multiplex.queries.each do |query|
|
38
|
+
GraphQL::FragmentCache::Schema::Instrumentation.after_query(query)
|
39
|
+
end
|
40
|
+
|
41
|
+
result
|
42
|
+
end
|
43
|
+
end
|
25
44
|
end
|
26
45
|
end
|
27
46
|
end
|
@@ -34,8 +34,7 @@ module GraphQL
|
|
34
34
|
verify_interpreter_and_analysis!(schema_defn)
|
35
35
|
|
36
36
|
if GraphRubyVersion.after_2_2_5?
|
37
|
-
schema_defn.trace_with(
|
38
|
-
schema_defn.instance_exec { own_instrumenters[:query] << Schema::Instrumentation }
|
37
|
+
schema_defn.trace_with(Schema::Instrumentation::Tracer)
|
39
38
|
else
|
40
39
|
schema_defn.tracer(Schema::Tracer)
|
41
40
|
schema_defn.instrument(:query, Schema::Instrumentation)
|
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.20.
|
4
|
+
version: 1.20.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DmitryTsepelev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: graphql
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 2.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: ruby-next
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|