graphql-fragment_cache 1.20.2 → 1.20.4

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: 60e358fe9888ea1f73756e680a2cc7b6182a64986d42f5a59f94b2fca726764e
4
+ data.tar.gz: 794e7475d1e224a4f86da8f7326cd060dbfcf875da97b31c7dd6a1b5d17cef58
5
5
  SHA512:
6
- metadata.gz: 9e9eefdd11bebc7dac2f9a25ee593785ee69096dfbc483525b9cd550c6f613853adf5caba73d56aa24dffad4815b1101e07559e9555b7699495909cf19ebd56e
7
- data.tar.gz: 4329bf2d41694d5f8db515220c2bf10eedbce91d46f852014f49f708c5d0fb102ea89463c2c35b66df90628dc24b1b8b1791abe78f10adae5cb93a9174ca7002
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
@@ -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:
@@ -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 = Rails.application.config.active_support.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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module GraphQL
4
4
  module FragmentCache
5
- VERSION = "1.20.2"
5
+ VERSION = "1.20.4"
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.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-06-01 00:00:00.000000000 Z
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: 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