graphql-pagination 2.1.3 → 2.3.0

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: b4957b0f34272595a82bbdd6fd645800f324a7fcf6b0a4dbf29f9ca077d2bf47
4
- data.tar.gz: efbac1904152ec230e65d4cbd964c6bd14f77ee30ee4fff86537fdf0f2ddb32b
3
+ metadata.gz: 7e8d0c7a992008746a3ded2753d3d6440db80b2267c213a52df2761ab7c0cd9f
4
+ data.tar.gz: 6a19b6dad36411021495b09dee4c3e52236ea168af90e13345991abbb5202024
5
5
  SHA512:
6
- metadata.gz: b688737afcde10674e2f7a1348f6eb7c49bd172e36863a86131c933cf8aad4daf9559bd0b8a3195a178b036583b13ba1c5a701515ae1d169e25f1eda7fa4b0e0
7
- data.tar.gz: f7aa28fb0557930ba5d1c6dafb237086b9ba56e17eec74d6c55c0126836d214f608329ad9182e8105b24f1dd68909b915436447a93e00d863a7131719d4e0e3b
6
+ metadata.gz: 1759f21fcd299077d44b9e9118e69dedeeba3bdf809331b43f78a6b12af32a9fafff5322b8de37fe1ce278b93719a67446b73c8fd458198c5ef59bc79110ce90
7
+ data.tar.gz: 5e05fe083686683c8b501bfba5911a1371b00f413c4d678a4f1904f8082e54133e4d061a7b71ed62cbf3b0f370cc9145fb4146425229acdada117c34fbaea19a
data/.bundler-version CHANGED
@@ -1 +1 @@
1
- 2.4.19
1
+ 2.5.23
@@ -1,19 +1,15 @@
1
- version: 1
1
+ version: 2
2
2
 
3
- update_configs:
4
- - package_manager: "ruby:bundler"
3
+ updates:
4
+ - package-ecosystem: "bundler"
5
5
  directory: "/"
6
- update_schedule: "daily"
7
- commit_message:
6
+ schedule:
7
+ interval: "weekly"
8
+ day: "monday"
9
+ time: "08:00"
10
+ timezone: "UTC"
11
+ commit-message:
8
12
  prefix: "[dependabot]"
9
- allowed_updates:
10
- - match:
11
- dependency_type: "all"
12
- update_type: "security"
13
- automerged_updates:
14
- - match:
15
- dependency_type: "all"
16
- update_type: "security:patch"
17
13
  labels:
18
14
  - "automerge"
19
15
  - "dependencies"
@@ -0,0 +1,15 @@
1
+ version: 2
2
+
3
+ updates:
4
+ - package-ecosystem: "bundler"
5
+ directory: "/"
6
+ schedule:
7
+ interval: "weekly"
8
+ day: "monday"
9
+ time: "08:00"
10
+ timezone: "UTC"
11
+ commit-message:
12
+ prefix: "[dependabot]"
13
+ labels:
14
+ - "automerge"
15
+ - "dependencies"
@@ -1,13 +1,14 @@
1
1
  name: Auto approve dependency upgrades and hot-fix PRs
2
2
  on:
3
3
  pull_request_target:
4
- types: [labeled, unlabeled, edited, ready_for_review, review_requested, auto_merge_enabled]
5
-
4
+ types:
5
+ - labeled
6
+ - ready_for_review
6
7
  jobs:
7
8
  auto-approve:
8
9
  runs-on: ubuntu-latest
9
10
  steps:
10
11
  - uses: hmarr/auto-approve-action@v3
11
- if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' || github.actor == 'renofidev' || contains(toJson(github), 'HOTFIX-AUTO-APPROVE')
12
+ if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' || github.actor == 'renofidev' || contains(github.event.pull_request.labels.*.name, 'HOTFIX-AUTO-APPROVE') || contains(github.event.pull_request.labels.*.name, 'self-approve') || contains(github.event.pull_request.labels.*.name, 'dependencies')
12
13
  with:
13
14
  github-token: "${{ secrets.GITHUB_TOKEN }}"
@@ -1,22 +1,31 @@
1
1
  name: automerge
2
2
  on:
3
+ pull_request_target:
4
+ types:
5
+ - labeled
3
6
  pull_request_review:
4
7
  types:
5
8
  - submitted
6
9
  check_suite:
7
10
  types:
8
11
  - completed
9
- label:
10
- types:
11
- - created
12
12
  status: {}
13
13
  jobs:
14
14
  automerge:
15
15
  runs-on: ubuntu-latest
16
16
  steps:
17
17
  - name: automerge
18
- uses: pascalgn/automerge-action@v0.15.6
18
+ uses: pascalgn/automerge-action@v0.16.4
19
+ env:
20
+ GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
21
+ MERGE_METHOD: squash
22
+ MERGE_DELETE_BRANCH: true
23
+ MERGE_LABELS: "automerge,!automerge blocked"
24
+ - name: automerge-dependencies
25
+ uses: pascalgn/automerge-action@v0.16.4
19
26
  env:
20
27
  GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
21
28
  MERGE_METHOD: squash
22
29
  MERGE_DELETE_BRANCH: true
30
+ MERGE_LABELS: "dependencies,!automerge blocked"
31
+ MERGE_REMOVE_LABELS: ""
@@ -7,11 +7,11 @@ on:
7
7
  branches: [ main ]
8
8
 
9
9
  jobs:
10
- test:
10
+ ci_tests_ruby:
11
11
  runs-on: ubuntu-latest
12
12
  strategy:
13
13
  matrix:
14
- ruby-version: [3.1, 3.2]
14
+ ruby-version: [3.2, 3.3]
15
15
 
16
16
  steps:
17
17
  - uses: actions/checkout@v3
data/Gemfile.lock CHANGED
@@ -1,91 +1,104 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- graphql-pagination (2.1.3)
5
- graphql (~> 2.0)
4
+ graphql-pagination (2.3.0)
5
+ graphql (>= 2.4.7)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activemodel (7.0.8)
11
- activesupport (= 7.0.8)
12
- activerecord (7.0.8)
13
- activemodel (= 7.0.8)
14
- activesupport (= 7.0.8)
15
- activesupport (7.0.8)
16
- concurrent-ruby (~> 1.0, >= 1.0.2)
10
+ activemodel (8.0.0)
11
+ activesupport (= 8.0.0)
12
+ activerecord (8.0.0)
13
+ activemodel (= 8.0.0)
14
+ activesupport (= 8.0.0)
15
+ timeout (>= 0.4.0)
16
+ activesupport (8.0.0)
17
+ base64
18
+ benchmark (>= 0.3)
19
+ bigdecimal
20
+ concurrent-ruby (~> 1.0, >= 1.3.1)
21
+ connection_pool (>= 2.2.5)
22
+ drb
17
23
  i18n (>= 1.6, < 2)
24
+ logger (>= 1.4.2)
18
25
  minitest (>= 5.1)
19
- tzinfo (~> 2.0)
26
+ securerandom (>= 0.3)
27
+ tzinfo (~> 2.0, >= 2.0.5)
28
+ uri (>= 0.13.1)
20
29
  ast (2.4.2)
21
- base64 (0.1.1)
30
+ base64 (0.2.0)
31
+ benchmark (0.4.0)
32
+ bigdecimal (3.1.8)
22
33
  coderay (1.1.3)
23
- concurrent-ruby (1.2.2)
24
- diff-lcs (1.5.0)
25
- graphql (2.1.0)
26
- i18n (1.14.1)
34
+ concurrent-ruby (1.3.4)
35
+ connection_pool (2.4.1)
36
+ diff-lcs (1.5.1)
37
+ drb (2.2.1)
38
+ fiber-storage (1.0.0)
39
+ graphql (2.4.7)
40
+ base64
41
+ fiber-storage
42
+ i18n (1.14.6)
27
43
  concurrent-ruby (~> 1.0)
28
- json (2.6.3)
44
+ json (2.9.0)
29
45
  kaminari-activerecord (1.2.2)
30
46
  activerecord
31
47
  kaminari-core (= 1.2.2)
32
48
  kaminari-core (1.2.2)
33
49
  language_server-protocol (3.17.0.3)
34
- method_source (1.0.0)
35
- minitest (5.20.0)
36
- parallel (1.23.0)
37
- parser (3.2.2.3)
50
+ logger (1.6.2)
51
+ method_source (1.1.0)
52
+ minitest (5.25.4)
53
+ parallel (1.26.3)
54
+ parser (3.3.6.0)
38
55
  ast (~> 2.4.1)
39
56
  racc
40
- pry (0.14.2)
57
+ pry (0.15.0)
41
58
  coderay (~> 1.1)
42
59
  method_source (~> 1.0)
43
- racc (1.7.1)
60
+ racc (1.8.1)
44
61
  rainbow (3.1.1)
45
- rake (13.0.6)
46
- regexp_parser (2.8.1)
47
- rexml (3.2.6)
48
- rspec (3.12.0)
49
- rspec-core (~> 3.12.0)
50
- rspec-expectations (~> 3.12.0)
51
- rspec-mocks (~> 3.12.0)
52
- rspec-core (3.12.2)
53
- rspec-support (~> 3.12.0)
54
- rspec-expectations (3.12.3)
62
+ rake (13.2.1)
63
+ regexp_parser (2.9.3)
64
+ rspec (3.13.0)
65
+ rspec-core (~> 3.13.0)
66
+ rspec-expectations (~> 3.13.0)
67
+ rspec-mocks (~> 3.13.0)
68
+ rspec-core (3.13.2)
69
+ rspec-support (~> 3.13.0)
70
+ rspec-expectations (3.13.3)
55
71
  diff-lcs (>= 1.2.0, < 2.0)
56
- rspec-support (~> 3.12.0)
57
- rspec-mocks (3.12.6)
72
+ rspec-support (~> 3.13.0)
73
+ rspec-mocks (3.13.2)
58
74
  diff-lcs (>= 1.2.0, < 2.0)
59
- rspec-support (~> 3.12.0)
60
- rspec-support (3.12.1)
61
- rubocop (1.56.3)
62
- base64 (~> 0.1.1)
75
+ rspec-support (~> 3.13.0)
76
+ rspec-support (3.13.2)
77
+ rubocop (1.69.1)
63
78
  json (~> 2.3)
64
79
  language_server-protocol (>= 3.17.0)
65
80
  parallel (~> 1.10)
66
- parser (>= 3.2.2.3)
81
+ parser (>= 3.3.0.2)
67
82
  rainbow (>= 2.2.2, < 4.0)
68
- regexp_parser (>= 1.8, < 3.0)
69
- rexml (>= 3.2.5, < 4.0)
70
- rubocop-ast (>= 1.28.1, < 2.0)
83
+ regexp_parser (>= 2.9.3, < 3.0)
84
+ rubocop-ast (>= 1.36.2, < 2.0)
71
85
  ruby-progressbar (~> 1.7)
72
- unicode-display_width (>= 2.4.0, < 3.0)
73
- rubocop-ast (1.29.0)
74
- parser (>= 3.2.1.0)
75
- rubocop-capybara (2.18.0)
76
- rubocop (~> 1.41)
77
- rubocop-factory_bot (2.23.1)
78
- rubocop (~> 1.33)
86
+ unicode-display_width (>= 2.4.0, < 4.0)
87
+ rubocop-ast (1.36.2)
88
+ parser (>= 3.3.1.0)
79
89
  rubocop-rake (0.6.0)
80
90
  rubocop (~> 1.0)
81
- rubocop-rspec (2.24.0)
82
- rubocop (~> 1.33)
83
- rubocop-capybara (~> 2.17)
84
- rubocop-factory_bot (~> 2.22)
91
+ rubocop-rspec (3.2.0)
92
+ rubocop (~> 1.61)
85
93
  ruby-progressbar (1.13.0)
94
+ securerandom (0.4.0)
95
+ timeout (0.4.2)
86
96
  tzinfo (2.0.6)
87
97
  concurrent-ruby (~> 1.0)
88
- unicode-display_width (2.4.2)
98
+ unicode-display_width (3.1.2)
99
+ unicode-emoji (~> 4.0, >= 4.0.4)
100
+ unicode-emoji (4.0.4)
101
+ uri (1.0.2)
89
102
 
90
103
  PLATFORMS
91
104
  aarch64-linux-musl
@@ -108,4 +121,4 @@ DEPENDENCIES
108
121
  rubocop-rspec
109
122
 
110
123
  BUNDLED WITH
111
- 2.4.19
124
+ 2.5.23
data/README.md CHANGED
@@ -16,6 +16,8 @@ Add `graphql-pagination` to your Gemfile, you can use `kaminari-activerecord` or
16
16
 
17
17
  ## Usage example
18
18
 
19
+ Use `collection_type` instead of `connection_type` to define your type:
20
+
19
21
  ```ruby
20
22
  field :fruits, Types::FruitType.collection_type, null: true do
21
23
  argument :page, Integer, required: false
@@ -17,6 +17,8 @@ Gem::Specification.new do |spec|
17
17
  spec.metadata['source_code_uri'] = 'https://github.com/RenoFi/graphql-pagination'
18
18
  spec.metadata['rubygems_mfa_required'] = 'true'
19
19
 
20
+ spec.required_ruby_version = Gem::Requirement.new('>= 3.2.0')
21
+
20
22
  spec.files = Dir.chdir(__dir__) do
21
23
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(bin/|spec/|\.rub)}) }
22
24
  end
@@ -24,7 +26,5 @@ Gem::Specification.new do |spec|
24
26
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
25
27
  spec.require_paths = ['lib']
26
28
 
27
- spec.required_ruby_version = '>= 3.0'
28
-
29
- spec.add_dependency 'graphql', '~> 2.0'
29
+ spec.add_dependency 'graphql', '>= 2.4.7'
30
30
  end
@@ -1,5 +1,6 @@
1
1
  module GraphqlPagination
2
2
  class CollectionMetadataType < GraphQL::Schema::Object
3
+ description "Type for CollectionMetadataType"
3
4
  field :current_page, Integer, null: false, description: "Current Page of loaded data"
4
5
  field :limit_value, Integer, null: false, description: "The number of items per page"
5
6
  field :total_count, Integer, null: false, description: "The total number of items to be paginated"
@@ -1,3 +1,3 @@
1
1
  module GraphqlPagination
2
- VERSION = '2.1.3'.freeze
2
+ VERSION = '2.3.0'.freeze
3
3
  end
@@ -1,6 +1,6 @@
1
1
  require 'graphql_pagination/version'
2
2
  require 'graphql'
3
- require 'graphql/schema/object'
3
+ require 'graphql/schema'
4
4
 
5
5
  module GraphqlPagination
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql-pagination
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Krzysztof Knapik
@@ -9,22 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2023-09-17 00:00:00.000000000 Z
12
+ date: 2024-12-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: graphql
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: '2.0'
20
+ version: 2.4.7
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - "~>"
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: '2.0'
27
+ version: 2.4.7
28
28
  description: Page-based kaminari pagination for graphql returning collection and pagination
29
29
  metadata.
30
30
  email:
@@ -40,8 +40,8 @@ files:
40
40
  - ".github/ISSUE_TEMPLATE/config.yml"
41
41
  - ".github/ISSUE_TEMPLATE/story.md"
42
42
  - ".github/PULL_REQUEST_TEMPLATE.md"
43
+ - ".github/dependabot.yml"
43
44
  - ".github/workflows/auto-approve.yml"
44
- - ".github/workflows/auto-merge-dependencies.yml"
45
45
  - ".github/workflows/auto-merge.yml"
46
46
  - ".github/workflows/ci.yml"
47
47
  - ".gitignore"
@@ -73,14 +73,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - ">="
75
75
  - !ruby/object:Gem::Version
76
- version: '3.0'
76
+ version: 3.2.0
77
77
  required_rubygems_version: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - ">="
80
80
  - !ruby/object:Gem::Version
81
81
  version: '0'
82
82
  requirements: []
83
- rubygems_version: 3.4.19
83
+ rubygems_version: 3.5.23
84
84
  signing_key:
85
85
  specification_version: 4
86
86
  summary: Page-based kaminari pagination for graphql.
@@ -1,24 +0,0 @@
1
- name: automerge-dependencies
2
- on:
3
- pull_request_review:
4
- types:
5
- - submitted
6
- check_suite:
7
- types:
8
- - completed
9
- label:
10
- types:
11
- - created
12
- status: {}
13
- jobs:
14
- automerge:
15
- runs-on: ubuntu-latest
16
- steps:
17
- - name: automerge-dependencies
18
- uses: pascalgn/automerge-action@v0.15.6
19
- env:
20
- GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
21
- MERGE_METHOD: squash
22
- MERGE_DELETE_BRANCH: true
23
- MERGE_LABELS: dependencies
24
- MERGE_REMOVE_LABELS: ""