graphql-fragment_cache 1.20.2 → 1.20.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +2 -0
- 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: f580417b89128378d1b76c5ea11b24bb272a8f7fa30713b42d5c81a212d9cd67
|
4
|
+
data.tar.gz: 837c9cec653c5dbdd6a25932576d9e4abf5c82650c0b9610515e640307f715f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf0aa30ceea8cbec00ce47340886812b770fb933a82256089255eb537639a5db239818b694a53fd687a5b8208030855f872058b0df6d3e07852a0cd2aaa6bbe4
|
7
|
+
data.tar.gz: cb8e62a66a20c271843f477e73422e9564f74a097cc08e74436ef0af76640a954158ff145b139ae86261a267670a7a55a67e498a6c6289b14797abaadcb3ff2b
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
|
3
3
|
## master
|
4
4
|
|
5
|
+
## 1.20.3 (2024-09-06)
|
6
|
+
|
7
|
+
- [PR#117](https://github.com/DmitryTsepelev/graphql-ruby-fragment_cache/pull/117) Deprecate old ruby and gql versions ([@DmitryTsepelev][])
|
8
|
+
- [PR#116](https://github.com/DmitryTsepelev/graphql-ruby-fragment_cache/pull/116) Migrate CompiledQueries instrumentation to tracer ([@DmitryTsepelev][])
|
9
|
+
|
5
10
|
## 1.20.2 (2024-06-01)
|
6
11
|
|
7
12
|
- [PR#115](https://github.com/DmitryTsepelev/graphql-ruby-fragment_cache/pull/115) Fix deprecation warning for cache_format_version in Rails 7.1 ([@rince][])
|
data/README.md
CHANGED
@@ -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.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DmitryTsepelev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06
|
11
|
+
date: 2024-09-06 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
|