graphql-fragment_cache 1.20.1 → 1.20.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1290ae93c3ed819164a80214348eb8539ca1f502d66494c78b67a70442cc377f
4
- data.tar.gz: 90bab17ae895c6164ae77da598d7afa3073ca0e0cb6b6f21f848fc4038d71a89
3
+ metadata.gz: f580417b89128378d1b76c5ea11b24bb272a8f7fa30713b42d5c81a212d9cd67
4
+ data.tar.gz: 837c9cec653c5dbdd6a25932576d9e4abf5c82650c0b9610515e640307f715f4
5
5
  SHA512:
6
- metadata.gz: ae23bb92581ad0a5527516675ea08ad1668ea98dc6bf63e85411576f5e1321a5db679c0fe24111abdd1db8629577d67bfc5f2223f9cca69c7c94ca3f57cd779a
7
- data.tar.gz: 07b1772b1862c3a7905894321b17ddf8b3beec3520565e654530b185d269746f8f94c3fa397fa9707bf41afbcb51cc5d6332b81fd2f571d492aab1d05c66529b
6
+ metadata.gz: bf0aa30ceea8cbec00ce47340886812b770fb933a82256089255eb537639a5db239818b694a53fd687a5b8208030855f872058b0df6d3e07852a0cd2aaa6bbe4
7
+ data.tar.gz: cb8e62a66a20c271843f477e73422e9564f74a097cc08e74436ef0af76640a954158ff145b139ae86261a267670a7a55a67e498a6c6289b14797abaadcb3ff2b
data/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
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
+
10
+ ## 1.20.2 (2024-06-01)
11
+
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][])
13
+
5
14
  ## 1.20.1 (2024-04-03)
6
15
 
7
16
  - [PR#112](https://github.com/DmitryTsepelev/graphql-ruby-fragment_cache/pull/112) fix tracer deprecation warnings ([@diegofigueroa][])
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:
@@ -10,6 +10,11 @@ module GraphQL
10
10
  module Config
11
11
  class << self
12
12
  def store=(store)
13
+ if Rails.version.to_f >= 7.0 && Rails.application
14
+ cache_format_version = Rails.application.config.active_support.cache_format_version
15
+ ActiveSupport::Cache.format_version = cache_format_version if cache_format_version
16
+ end
17
+
13
18
  # Handle both:
14
19
  # store = :memory
15
20
  # store = :mem_cache, ENV['MEMCACHE']
@@ -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.1"
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.1
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-04-03 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
@@ -70,16 +70,16 @@ dependencies:
70
70
  name: sqlite3
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: '1.4'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: '1.4'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rake
85
85
  requirement: !ruby/object:Gem::Requirement