graphql-pagination 2.1.0 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.bundler-version +1 -1
- data/.dependabot/config.yml +3 -0
- data/.github/workflows/auto-approve.yml +8 -9
- data/.github/workflows/auto-merge-dependencies.yml +24 -0
- data/.github/workflows/auto-merge.yml +4 -1
- data/.github/workflows/ci.yml +1 -1
- data/Gemfile +9 -0
- data/Gemfile.lock +51 -39
- data/graphql-pagination.gemspec +0 -9
- data/lib/graphql_pagination/collection_metadata_type.rb +4 -4
- data/lib/graphql_pagination/collection_type.rb +2 -2
- data/lib/graphql_pagination/version.rb +1 -1
- metadata +4 -115
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69754180eecb5a5b78b250ab32cc5a0bf4ff681729297db84c642b5eb23ffe8d
|
4
|
+
data.tar.gz: 591b7e9652413a5a7dd713bc9d81425090af1bb7c6cf99ab09d71d141872efd6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a98675b3f85b04ece08eb07f1109f8b145190efd5cd378f5d3903c2df2f878c4d0c729cac392aa7f25e7645b9673561c138cc219190f69eb4b24c8f59cdd688c
|
7
|
+
data.tar.gz: c6d2e9587b5a718587c3b6cbb07009f3e4f5b81b485a0be66ffb39b5111d80a87cc9bf93aeab8ed82f9e01c62f49d0cd1280903e3791f25a55bb67e3a4701bd7
|
data/.bundler-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.4.19
|
data/.dependabot/config.yml
CHANGED
@@ -1,14 +1,13 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
on: pull_request_target
|
1
|
+
name: Auto approve dependency upgrades and hot-fix PRs
|
2
|
+
on:
|
3
|
+
pull_request_target:
|
4
|
+
types: [labeled, unlabeled, edited, ready_for_review, review_requested, auto_merge_enabled]
|
6
5
|
|
7
6
|
jobs:
|
8
7
|
auto-approve:
|
9
8
|
runs-on: ubuntu-latest
|
10
9
|
steps:
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
10
|
+
- 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
|
+
with:
|
13
|
+
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
@@ -0,0 +1,24 @@
|
|
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: ""
|
@@ -6,13 +6,16 @@ on:
|
|
6
6
|
check_suite:
|
7
7
|
types:
|
8
8
|
- completed
|
9
|
+
label:
|
10
|
+
types:
|
11
|
+
- created
|
9
12
|
status: {}
|
10
13
|
jobs:
|
11
14
|
automerge:
|
12
15
|
runs-on: ubuntu-latest
|
13
16
|
steps:
|
14
17
|
- name: automerge
|
15
|
-
uses:
|
18
|
+
uses: pascalgn/automerge-action@v0.15.6
|
16
19
|
env:
|
17
20
|
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
18
21
|
MERGE_METHOD: squash
|
data/.github/workflows/ci.yml
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,79 +1,91 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
graphql-pagination (2.1.
|
4
|
+
graphql-pagination (2.1.2)
|
5
5
|
graphql (~> 2.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
activemodel (7.0.
|
11
|
-
activesupport (= 7.0.
|
12
|
-
activerecord (7.0.
|
13
|
-
activemodel (= 7.0.
|
14
|
-
activesupport (= 7.0.
|
15
|
-
activesupport (7.0.
|
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
16
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
17
17
|
i18n (>= 1.6, < 2)
|
18
18
|
minitest (>= 5.1)
|
19
19
|
tzinfo (~> 2.0)
|
20
20
|
ast (2.4.2)
|
21
|
+
base64 (0.1.1)
|
21
22
|
coderay (1.1.3)
|
22
|
-
concurrent-ruby (1.
|
23
|
+
concurrent-ruby (1.2.2)
|
23
24
|
diff-lcs (1.5.0)
|
24
|
-
graphql (2.0
|
25
|
-
i18n (1.
|
25
|
+
graphql (2.1.0)
|
26
|
+
i18n (1.14.1)
|
26
27
|
concurrent-ruby (~> 1.0)
|
27
|
-
json (2.6.
|
28
|
+
json (2.6.3)
|
28
29
|
kaminari-activerecord (1.2.2)
|
29
30
|
activerecord
|
30
31
|
kaminari-core (= 1.2.2)
|
31
32
|
kaminari-core (1.2.2)
|
33
|
+
language_server-protocol (3.17.0.3)
|
32
34
|
method_source (1.0.0)
|
33
|
-
minitest (5.
|
34
|
-
parallel (1.
|
35
|
-
parser (3.
|
35
|
+
minitest (5.20.0)
|
36
|
+
parallel (1.23.0)
|
37
|
+
parser (3.2.2.3)
|
36
38
|
ast (~> 2.4.1)
|
37
|
-
|
39
|
+
racc
|
40
|
+
pry (0.14.2)
|
38
41
|
coderay (~> 1.1)
|
39
42
|
method_source (~> 1.0)
|
43
|
+
racc (1.7.1)
|
40
44
|
rainbow (3.1.1)
|
41
45
|
rake (13.0.6)
|
42
|
-
regexp_parser (2.
|
43
|
-
rexml (3.2.
|
44
|
-
rspec (3.
|
45
|
-
rspec-core (~> 3.
|
46
|
-
rspec-expectations (~> 3.
|
47
|
-
rspec-mocks (~> 3.
|
48
|
-
rspec-core (3.
|
49
|
-
rspec-support (~> 3.
|
50
|
-
rspec-expectations (3.
|
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)
|
51
55
|
diff-lcs (>= 1.2.0, < 2.0)
|
52
|
-
rspec-support (~> 3.
|
53
|
-
rspec-mocks (3.
|
56
|
+
rspec-support (~> 3.12.0)
|
57
|
+
rspec-mocks (3.12.6)
|
54
58
|
diff-lcs (>= 1.2.0, < 2.0)
|
55
|
-
rspec-support (~> 3.
|
56
|
-
rspec-support (3.
|
57
|
-
rubocop (1.
|
59
|
+
rspec-support (~> 3.12.0)
|
60
|
+
rspec-support (3.12.1)
|
61
|
+
rubocop (1.56.3)
|
62
|
+
base64 (~> 0.1.1)
|
58
63
|
json (~> 2.3)
|
64
|
+
language_server-protocol (>= 3.17.0)
|
59
65
|
parallel (~> 1.10)
|
60
|
-
parser (>= 3.
|
66
|
+
parser (>= 3.2.2.3)
|
61
67
|
rainbow (>= 2.2.2, < 4.0)
|
62
68
|
regexp_parser (>= 1.8, < 3.0)
|
63
69
|
rexml (>= 3.2.5, < 4.0)
|
64
|
-
rubocop-ast (>= 1.
|
70
|
+
rubocop-ast (>= 1.28.1, < 2.0)
|
65
71
|
ruby-progressbar (~> 1.7)
|
66
|
-
unicode-display_width (>=
|
67
|
-
rubocop-ast (1.
|
68
|
-
parser (>= 3.
|
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)
|
69
79
|
rubocop-rake (0.6.0)
|
70
80
|
rubocop (~> 1.0)
|
71
|
-
rubocop-rspec (2.
|
81
|
+
rubocop-rspec (2.24.0)
|
72
82
|
rubocop (~> 1.33)
|
73
|
-
|
74
|
-
|
83
|
+
rubocop-capybara (~> 2.17)
|
84
|
+
rubocop-factory_bot (~> 2.22)
|
85
|
+
ruby-progressbar (1.13.0)
|
86
|
+
tzinfo (2.0.6)
|
75
87
|
concurrent-ruby (~> 1.0)
|
76
|
-
unicode-display_width (2.
|
88
|
+
unicode-display_width (2.4.2)
|
77
89
|
|
78
90
|
PLATFORMS
|
79
91
|
aarch64-linux-musl
|
@@ -96,4 +108,4 @@ DEPENDENCIES
|
|
96
108
|
rubocop-rspec
|
97
109
|
|
98
110
|
BUNDLED WITH
|
99
|
-
2.
|
111
|
+
2.4.19
|
data/graphql-pagination.gemspec
CHANGED
@@ -27,13 +27,4 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.required_ruby_version = '>= 3.0'
|
28
28
|
|
29
29
|
spec.add_dependency 'graphql', '~> 2.0'
|
30
|
-
|
31
|
-
spec.add_development_dependency 'kaminari-activerecord'
|
32
|
-
spec.add_development_dependency 'kaminari-core'
|
33
|
-
spec.add_development_dependency 'pry'
|
34
|
-
spec.add_development_dependency 'rake'
|
35
|
-
spec.add_development_dependency 'rspec'
|
36
|
-
spec.add_development_dependency 'rubocop'
|
37
|
-
spec.add_development_dependency 'rubocop-rake'
|
38
|
-
spec.add_development_dependency 'rubocop-rspec'
|
39
30
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module GraphqlPagination
|
2
2
|
class CollectionMetadataType < GraphQL::Schema::Object
|
3
|
-
field :current_page, Integer, null: false
|
4
|
-
field :limit_value, Integer, null: false
|
5
|
-
field :total_count, Integer, null: false
|
6
|
-
field :total_pages, Integer, null: false
|
3
|
+
field :current_page, Integer, null: false, description: "Current Page of loaded data"
|
4
|
+
field :limit_value, Integer, null: false, description: "The number of items per page"
|
5
|
+
field :total_count, Integer, null: false, description: "The total number of items to be paginated"
|
6
|
+
field :total_pages, Integer, null: false, description: "The total number of pages in the pagination"
|
7
7
|
end
|
8
8
|
end
|
@@ -14,8 +14,8 @@ module GraphqlPagination
|
|
14
14
|
|
15
15
|
Class.new(collection_base) do
|
16
16
|
graphql_name type_name
|
17
|
-
field :collection, [source_type], null: false
|
18
|
-
field :metadata, metadata_type, null: false
|
17
|
+
field :collection, [source_type], null: false, description: "A collection of paginated #{graphql_name}"
|
18
|
+
field :metadata, metadata_type, null: false, description: "Pagination Metadata for navigating the Pagination"
|
19
19
|
|
20
20
|
def collection
|
21
21
|
object
|
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.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Krzysztof Knapik
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-09-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: graphql
|
@@ -25,118 +25,6 @@ dependencies:
|
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '2.0'
|
28
|
-
- !ruby/object:Gem::Dependency
|
29
|
-
name: kaminari-activerecord
|
30
|
-
requirement: !ruby/object:Gem::Requirement
|
31
|
-
requirements:
|
32
|
-
- - ">="
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version: '0'
|
35
|
-
type: :development
|
36
|
-
prerelease: false
|
37
|
-
version_requirements: !ruby/object:Gem::Requirement
|
38
|
-
requirements:
|
39
|
-
- - ">="
|
40
|
-
- !ruby/object:Gem::Version
|
41
|
-
version: '0'
|
42
|
-
- !ruby/object:Gem::Dependency
|
43
|
-
name: kaminari-core
|
44
|
-
requirement: !ruby/object:Gem::Requirement
|
45
|
-
requirements:
|
46
|
-
- - ">="
|
47
|
-
- !ruby/object:Gem::Version
|
48
|
-
version: '0'
|
49
|
-
type: :development
|
50
|
-
prerelease: false
|
51
|
-
version_requirements: !ruby/object:Gem::Requirement
|
52
|
-
requirements:
|
53
|
-
- - ">="
|
54
|
-
- !ruby/object:Gem::Version
|
55
|
-
version: '0'
|
56
|
-
- !ruby/object:Gem::Dependency
|
57
|
-
name: pry
|
58
|
-
requirement: !ruby/object:Gem::Requirement
|
59
|
-
requirements:
|
60
|
-
- - ">="
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version: '0'
|
63
|
-
type: :development
|
64
|
-
prerelease: false
|
65
|
-
version_requirements: !ruby/object:Gem::Requirement
|
66
|
-
requirements:
|
67
|
-
- - ">="
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '0'
|
70
|
-
- !ruby/object:Gem::Dependency
|
71
|
-
name: rake
|
72
|
-
requirement: !ruby/object:Gem::Requirement
|
73
|
-
requirements:
|
74
|
-
- - ">="
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
version: '0'
|
77
|
-
type: :development
|
78
|
-
prerelease: false
|
79
|
-
version_requirements: !ruby/object:Gem::Requirement
|
80
|
-
requirements:
|
81
|
-
- - ">="
|
82
|
-
- !ruby/object:Gem::Version
|
83
|
-
version: '0'
|
84
|
-
- !ruby/object:Gem::Dependency
|
85
|
-
name: rspec
|
86
|
-
requirement: !ruby/object:Gem::Requirement
|
87
|
-
requirements:
|
88
|
-
- - ">="
|
89
|
-
- !ruby/object:Gem::Version
|
90
|
-
version: '0'
|
91
|
-
type: :development
|
92
|
-
prerelease: false
|
93
|
-
version_requirements: !ruby/object:Gem::Requirement
|
94
|
-
requirements:
|
95
|
-
- - ">="
|
96
|
-
- !ruby/object:Gem::Version
|
97
|
-
version: '0'
|
98
|
-
- !ruby/object:Gem::Dependency
|
99
|
-
name: rubocop
|
100
|
-
requirement: !ruby/object:Gem::Requirement
|
101
|
-
requirements:
|
102
|
-
- - ">="
|
103
|
-
- !ruby/object:Gem::Version
|
104
|
-
version: '0'
|
105
|
-
type: :development
|
106
|
-
prerelease: false
|
107
|
-
version_requirements: !ruby/object:Gem::Requirement
|
108
|
-
requirements:
|
109
|
-
- - ">="
|
110
|
-
- !ruby/object:Gem::Version
|
111
|
-
version: '0'
|
112
|
-
- !ruby/object:Gem::Dependency
|
113
|
-
name: rubocop-rake
|
114
|
-
requirement: !ruby/object:Gem::Requirement
|
115
|
-
requirements:
|
116
|
-
- - ">="
|
117
|
-
- !ruby/object:Gem::Version
|
118
|
-
version: '0'
|
119
|
-
type: :development
|
120
|
-
prerelease: false
|
121
|
-
version_requirements: !ruby/object:Gem::Requirement
|
122
|
-
requirements:
|
123
|
-
- - ">="
|
124
|
-
- !ruby/object:Gem::Version
|
125
|
-
version: '0'
|
126
|
-
- !ruby/object:Gem::Dependency
|
127
|
-
name: rubocop-rspec
|
128
|
-
requirement: !ruby/object:Gem::Requirement
|
129
|
-
requirements:
|
130
|
-
- - ">="
|
131
|
-
- !ruby/object:Gem::Version
|
132
|
-
version: '0'
|
133
|
-
type: :development
|
134
|
-
prerelease: false
|
135
|
-
version_requirements: !ruby/object:Gem::Requirement
|
136
|
-
requirements:
|
137
|
-
- - ">="
|
138
|
-
- !ruby/object:Gem::Version
|
139
|
-
version: '0'
|
140
28
|
description: Page-based kaminari pagination for graphql returning collection and pagination
|
141
29
|
metadata.
|
142
30
|
email:
|
@@ -153,6 +41,7 @@ files:
|
|
153
41
|
- ".github/ISSUE_TEMPLATE/story.md"
|
154
42
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
155
43
|
- ".github/workflows/auto-approve.yml"
|
44
|
+
- ".github/workflows/auto-merge-dependencies.yml"
|
156
45
|
- ".github/workflows/auto-merge.yml"
|
157
46
|
- ".github/workflows/ci.yml"
|
158
47
|
- ".gitignore"
|
@@ -191,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
191
80
|
- !ruby/object:Gem::Version
|
192
81
|
version: '0'
|
193
82
|
requirements: []
|
194
|
-
rubygems_version: 3.
|
83
|
+
rubygems_version: 3.4.19
|
195
84
|
signing_key:
|
196
85
|
specification_version: 4
|
197
86
|
summary: Page-based kaminari pagination for graphql.
|