graphql-fragment_cache 1.20.2 → 1.20.3

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: a8252cb743e4298ff655dac94a07a4f2adfaa2872bc030252a267bf937e207e5
4
- data.tar.gz: 202261d17d990297574e85e9f8a39a9299b68029ea73ad82ad28a145cbaeb61a
3
+ metadata.gz: f580417b89128378d1b76c5ea11b24bb272a8f7fa30713b42d5c81a212d9cd67
4
+ data.tar.gz: 837c9cec653c5dbdd6a25932576d9e4abf5c82650c0b9610515e640307f715f4
5
5
  SHA512:
6
- metadata.gz: 9e9eefdd11bebc7dac2f9a25ee593785ee69096dfbc483525b9cd550c6f613853adf5caba73d56aa24dffad4815b1101e07559e9555b7699495909cf19ebd56e
7
- data.tar.gz: 4329bf2d41694d5f8db515220c2bf10eedbce91d46f852014f49f708c5d0fb102ea89463c2c35b66df90628dc24b1b8b1791abe78f10adae5cb93a9174ca7002
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
@@ -9,6 +9,8 @@ class PostType < BaseObject
9
9
  end
10
10
  ```
11
11
 
12
+ You can support my open–source work [here](https://boosty.to/dmitry_tsepelev).
13
+
12
14
  ## Getting started
13
15
 
14
16
  Add the gem to your Gemfile `gem 'graphql-fragment_cache'` and add the plugin to your schema class:
@@ -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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module GraphQL
4
4
  module FragmentCache
5
- VERSION = "1.20.2"
5
+ VERSION = "1.20.3"
6
6
  end
7
7
  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(GraphQL::Tracing::LegacyHooksTrace)
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.2
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-01 00:00:00.000000000 Z
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: 1.12.0
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: 1.12.0
26
+ version: 2.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: ruby-next
29
29
  requirement: !ruby/object:Gem::Requirement