graphql-extras 0.4.1 → 0.4.2

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: 98e38072429fdb32cbd085ce64d1ac8fa5e295989580b8f2cab3008ef232a7bb
4
- data.tar.gz: c7fa03896dd5f5122dff890f5c2e97fcf2d02450a3efd269e14582de4b402a6b
3
+ metadata.gz: 8f3927449d4c9cea85828d5df7ea64954fa489c602ba39e35f938248962d65da
4
+ data.tar.gz: 3b9564bc9e6d32832e868c983826d007ad99d490c9316ecd8b20ca6eef4ec121
5
5
  SHA512:
6
- metadata.gz: 962ff3bb31aaa27d4bac5028fa6dd2400e2330d51d0b2172abd3e7627bbcb206517bc962bc25fcb6687f5660f36403d91e7a0bb20ca0e13087c26ae968cda3e2
7
- data.tar.gz: 263a13b184ff89f7f28f60d7b74ab0dc1a454fefb33f27f2ef6fe2e6dca0c2134f4ba828b65e9409f30a80ef3c2fdd692033dac42c333044afac73004dd87be4
6
+ metadata.gz: ac5e8a5230c0543d7897ef73ee6634ef44b932adf7af91d6ce1e4f5711955965967ebed75d8b3c23ce97af9e2c24915dc423be3b32aa9af9219f9cd590183acd
7
+ data.tar.gz: 973a08ada1e4e313299c0f8724d338e2b2b405374e7fb91f7791a3a1d2ead7cf2788564367f747aef563b8be7a2e8e258f2eba7cc18acbbed2484637892626b0
@@ -10,7 +10,7 @@ jobs:
10
10
  - name: Setup Ruby
11
11
  uses: actions/setup-ruby@v1
12
12
  with:
13
- ruby-version: 2.6.x
13
+ ruby-version: 3.1.x
14
14
 
15
15
  - name: Install packages
16
16
  run: sudo apt-get install libsqlite3-dev
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.require_paths = ["lib"]
26
26
 
27
27
  spec.add_dependency "activesupport", ">= 5.2"
28
- spec.add_dependency "graphql", "~> 1.12"
28
+ spec.add_dependency "graphql", [">= 1.12", "< 3"]
29
29
 
30
30
  spec.add_development_dependency "bundler", "~> 2.0"
31
31
  spec.add_development_dependency "rake", "~> 13.0"
@@ -6,8 +6,17 @@ module GraphQL
6
6
  end
7
7
 
8
8
  def fetch(records)
9
- preloader = ActiveRecord::Associations::Preloader.new
10
- preloader.preload(records, @preload)
9
+ if ActiveRecord::VERSION::MAJOR >= 7
10
+ preloader = ActiveRecord::Associations::Preloader.new(
11
+ records: records,
12
+ associations: @preload
13
+ )
14
+ preloader.call
15
+ else
16
+ preloader = ActiveRecord::Associations::Preloader.new
17
+ preloader.preload(records, @preload)
18
+ end
19
+
11
20
  records
12
21
  end
13
22
  end
@@ -1,5 +1,5 @@
1
1
  module GraphQL
2
2
  module Extras
3
- VERSION = "0.4.1"
3
+ VERSION = "0.4.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql-extras
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ray Zane
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-08-13 00:00:00.000000000 Z
11
+ date: 2022-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -28,16 +28,22 @@ dependencies:
28
28
  name: graphql
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.12'
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
36
+ version: '3'
34
37
  type: :runtime
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
37
40
  requirements:
38
- - - "~>"
41
+ - - ">="
39
42
  - !ruby/object:Gem::Version
40
43
  version: '1.12'
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: '3'
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: bundler
43
49
  requirement: !ruby/object:Gem::Requirement