graphql-pagination 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +6 -45
- data/.hound.yml +4 -0
- data/.rubocop.yml +62 -0
- data/.travis.yml +2 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +21 -6
- data/LICENSE +2 -2
- data/README.md +14 -16
- data/Rakefile +2 -2
- data/bin/console +4 -3
- data/graphql-pagination.gemspec +22 -22
- data/lib/graphql-pagination.rb +1 -1
- data/lib/graphql_pagination.rb +6 -6
- data/lib/graphql_pagination/version.rb +1 -1
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5126cd4efa227e900819533d8174c3f5f79796155c89400aefd6fa4a62b097bf
|
4
|
+
data.tar.gz: a9161702e52430cc5486245c647dfe82c4c741372557e5709d06a93783f7e2ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76d3e6b848b1ce9a3072812c692b6e9c395c0b80c0c6d60a853c4721f976a07b83f9d9b0204de9056926b13e8b114b8164a869d9555636b61d971f5f9f1d9403
|
7
|
+
data.tar.gz: 5b789bad2cea40103da4fe25a9cd7ab24caf6d73e3ebd6167e52aba5f78c9f725fa067b2fea089ff0e02084cc01af1d2b20bbb87ce22438e121ee62998e10d73
|
data/.gitignore
CHANGED
@@ -1,50 +1,11 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
/.bundle/
|
2
|
+
/.yardoc
|
3
|
+
/_yardoc/
|
4
4
|
/coverage/
|
5
|
-
/
|
5
|
+
/doc/
|
6
6
|
/pkg/
|
7
7
|
/spec/reports/
|
8
|
-
/spec/examples.txt
|
9
|
-
/test/tmp/
|
10
|
-
/test/version_tmp/
|
11
8
|
/tmp/
|
12
9
|
|
13
|
-
#
|
14
|
-
|
15
|
-
|
16
|
-
## Specific to RubyMotion:
|
17
|
-
.dat*
|
18
|
-
.repl_history
|
19
|
-
build/
|
20
|
-
*.bridgesupport
|
21
|
-
build-iPhoneOS/
|
22
|
-
build-iPhoneSimulator/
|
23
|
-
|
24
|
-
## Specific to RubyMotion (use of CocoaPods):
|
25
|
-
#
|
26
|
-
# We recommend against adding the Pods directory to your .gitignore. However
|
27
|
-
# you should judge for yourself, the pros and cons are mentioned at:
|
28
|
-
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
29
|
-
#
|
30
|
-
# vendor/Pods/
|
31
|
-
|
32
|
-
## Documentation cache and generated files:
|
33
|
-
/.yardoc/
|
34
|
-
/_yardoc/
|
35
|
-
/doc/
|
36
|
-
/rdoc/
|
37
|
-
|
38
|
-
## Environment normalization:
|
39
|
-
/.bundle/
|
40
|
-
/vendor/bundle
|
41
|
-
/lib/bundler/man/
|
42
|
-
|
43
|
-
# for a library or gem, you might want to ignore these files since the code is
|
44
|
-
# intended to run in multiple environments; otherwise, check them in:
|
45
|
-
# Gemfile.lock
|
46
|
-
# .ruby-version
|
47
|
-
# .ruby-gemset
|
48
|
-
|
49
|
-
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
50
|
-
.rvmrc
|
10
|
+
# rspec failure tracking
|
11
|
+
.rspec_status
|
data/.hound.yml
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
Gemspec/RequiredRubyVersion:
|
2
|
+
Include:
|
3
|
+
- 2.4
|
4
|
+
- 2.5
|
5
|
+
- 2.6
|
6
|
+
|
7
|
+
Lint/UnusedBlockArgument:
|
8
|
+
Enabled: false
|
9
|
+
|
10
|
+
Layout/AlignHash:
|
11
|
+
Enabled: false
|
12
|
+
|
13
|
+
Naming/FileName:
|
14
|
+
Enabled: false
|
15
|
+
|
16
|
+
Metrics/BlockLength:
|
17
|
+
Max: 30
|
18
|
+
Exclude:
|
19
|
+
- '**/*_spec.rb'
|
20
|
+
|
21
|
+
Metrics/LineLength:
|
22
|
+
Max: 140
|
23
|
+
|
24
|
+
Metrics/MethodLength:
|
25
|
+
Max: 20
|
26
|
+
|
27
|
+
Security/YAMLLoad:
|
28
|
+
Enabled: false
|
29
|
+
|
30
|
+
Style/BlockDelimiters:
|
31
|
+
EnforcedStyle: braces_for_chaining
|
32
|
+
|
33
|
+
Style/Documentation:
|
34
|
+
Enabled: false
|
35
|
+
|
36
|
+
Style/GuardClause:
|
37
|
+
Enabled: false
|
38
|
+
|
39
|
+
Style/EachWithObject:
|
40
|
+
Enabled: false
|
41
|
+
|
42
|
+
Style/MethodMissingSuper:
|
43
|
+
Enabled: false
|
44
|
+
|
45
|
+
Style/MissingRespondToMissing:
|
46
|
+
Enabled: false
|
47
|
+
|
48
|
+
Style/FrozenStringLiteralComment:
|
49
|
+
Enabled: false
|
50
|
+
|
51
|
+
Style/PercentLiteralDelimiters:
|
52
|
+
Enabled: false
|
53
|
+
|
54
|
+
Style/RescueStandardError:
|
55
|
+
Exclude:
|
56
|
+
- 'spec/*.rb'
|
57
|
+
|
58
|
+
Style/SymbolArray:
|
59
|
+
EnforcedStyle: brackets
|
60
|
+
|
61
|
+
Style/TrivialAccessors:
|
62
|
+
Enabled: false
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
graphql-pagination (0.2.
|
4
|
+
graphql-pagination (0.2.2)
|
5
5
|
graphql (~> 1.9.4)
|
6
6
|
|
7
7
|
GEM
|
@@ -19,21 +19,27 @@ GEM
|
|
19
19
|
minitest (~> 5.1)
|
20
20
|
tzinfo (~> 1.1)
|
21
21
|
arel (9.0.0)
|
22
|
+
ast (2.4.0)
|
22
23
|
coderay (1.1.2)
|
23
24
|
concurrent-ruby (1.1.5)
|
24
25
|
diff-lcs (1.3)
|
25
|
-
graphql (1.9.
|
26
|
+
graphql (1.9.6)
|
26
27
|
i18n (1.6.0)
|
27
28
|
concurrent-ruby (~> 1.0)
|
29
|
+
jaro_winkler (1.5.2)
|
28
30
|
kaminari-activerecord (1.1.1)
|
29
31
|
activerecord
|
30
32
|
kaminari-core (= 1.1.1)
|
31
33
|
kaminari-core (1.1.1)
|
32
34
|
method_source (0.9.2)
|
33
35
|
minitest (5.11.3)
|
36
|
+
parallel (1.17.0)
|
37
|
+
parser (2.6.3.0)
|
38
|
+
ast (~> 2.4.0)
|
34
39
|
pry (0.12.2)
|
35
40
|
coderay (~> 1.1.0)
|
36
41
|
method_source (~> 0.9.0)
|
42
|
+
rainbow (3.0.0)
|
37
43
|
rake (12.3.2)
|
38
44
|
rspec (3.8.0)
|
39
45
|
rspec-core (~> 3.8.0)
|
@@ -41,28 +47,37 @@ GEM
|
|
41
47
|
rspec-mocks (~> 3.8.0)
|
42
48
|
rspec-core (3.8.0)
|
43
49
|
rspec-support (~> 3.8.0)
|
44
|
-
rspec-expectations (3.8.
|
50
|
+
rspec-expectations (3.8.4)
|
45
51
|
diff-lcs (>= 1.2.0, < 2.0)
|
46
52
|
rspec-support (~> 3.8.0)
|
47
|
-
rspec-mocks (3.8.
|
53
|
+
rspec-mocks (3.8.1)
|
48
54
|
diff-lcs (>= 1.2.0, < 2.0)
|
49
55
|
rspec-support (~> 3.8.0)
|
50
|
-
rspec-support (3.8.
|
56
|
+
rspec-support (3.8.2)
|
57
|
+
rubocop (0.71.0)
|
58
|
+
jaro_winkler (~> 1.5.1)
|
59
|
+
parallel (~> 1.10)
|
60
|
+
parser (>= 2.6)
|
61
|
+
rainbow (>= 2.2.2, < 4.0)
|
62
|
+
ruby-progressbar (~> 1.7)
|
63
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
64
|
+
ruby-progressbar (1.10.1)
|
51
65
|
thread_safe (0.3.6)
|
52
66
|
tzinfo (1.2.5)
|
53
67
|
thread_safe (~> 0.1)
|
68
|
+
unicode-display_width (1.6.0)
|
54
69
|
|
55
70
|
PLATFORMS
|
56
71
|
ruby
|
57
72
|
|
58
73
|
DEPENDENCIES
|
59
|
-
bundler
|
60
74
|
graphql-pagination!
|
61
75
|
kaminari-activerecord
|
62
76
|
kaminari-core
|
63
77
|
pry
|
64
78
|
rake
|
65
79
|
rspec
|
80
|
+
rubocop
|
66
81
|
|
67
82
|
BUNDLED WITH
|
68
83
|
2.0.1
|
data/LICENSE
CHANGED
@@ -3,7 +3,7 @@ MIT License
|
|
3
3
|
Copyright (c) 2019 RenoFi
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the
|
6
|
+
of this software and associated documentation files (the 'Software'), to deal
|
7
7
|
in the Software without restriction, including without limitation the rights
|
8
8
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
9
|
copies of the Software, and to permit persons to whom the Software is
|
@@ -12,7 +12,7 @@ furnished to do so, subject to the following conditions:
|
|
12
12
|
The above copyright notice and this permission notice shall be included in all
|
13
13
|
copies or substantial portions of the Software.
|
14
14
|
|
15
|
-
THE SOFTWARE IS PROVIDED
|
15
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
16
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
17
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
data/README.md
CHANGED
@@ -1,7 +1,5 @@
|
|
1
|
-
|
2
|
-
[![
|
3
|
-
|
4
|
-
[gem_version]: https://rubygems.org/gems/a9n
|
1
|
+
[![Gem Version](https://badge.fury.io/rb/graphql-pagination.svg)](https://rubygems.org/gems/graphql-pagination)
|
2
|
+
[![Build Status](https://travis-ci.org/RenoFi/graphql-pagination.svg?branch=master)](https://travis-ci.org/RenoFi/graphql-pagination)
|
5
3
|
|
6
4
|
# graphql-pagination
|
7
5
|
|
@@ -53,23 +51,23 @@ Value returned by query resolver must be a kaminari object or implements its pag
|
|
53
51
|
|
54
52
|
```json
|
55
53
|
{
|
56
|
-
|
57
|
-
|
58
|
-
|
54
|
+
'data': {
|
55
|
+
'checklists': {
|
56
|
+
'collection': [
|
59
57
|
{
|
60
|
-
|
61
|
-
|
58
|
+
'id': '93938bb3-7a6c-4d35-9961-cbb2d4c9e9ac',
|
59
|
+
'name': 'Apple'
|
62
60
|
},
|
63
61
|
{
|
64
|
-
|
65
|
-
|
62
|
+
'id': 'b1ee93b2-579a-4107-8454-119bba5afb63',
|
63
|
+
'name': 'Mango'
|
66
64
|
}
|
67
65
|
],
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
66
|
+
'metadata': {
|
67
|
+
'totalPages': 25,
|
68
|
+
'totalCount': 50,
|
69
|
+
'currentPage': 2,
|
70
|
+
'limitValue': 2
|
73
71
|
}
|
74
72
|
}
|
75
73
|
}
|
data/Rakefile
CHANGED
data/bin/console
CHANGED
data/graphql-pagination.gemspec
CHANGED
@@ -1,34 +1,34 @@
|
|
1
|
-
lib = File.expand_path(
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
2
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
-
require
|
3
|
+
require 'graphql_pagination/version'
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
|
-
spec.name
|
7
|
-
spec.version
|
8
|
-
spec.authors
|
9
|
-
spec.email
|
6
|
+
spec.name = 'graphql-pagination'
|
7
|
+
spec.version = GraphqlPagination::VERSION
|
8
|
+
spec.authors = ['Krzysztof Knapik', 'RenoFi Engineering Team']
|
9
|
+
spec.email = ['knapo@knapo.net', 'engineering@renofi.com']
|
10
10
|
|
11
|
-
spec.summary
|
12
|
-
spec.description
|
13
|
-
spec.homepage
|
14
|
-
spec.license
|
11
|
+
spec.summary = 'Page-based kaminari pagination for graphql.'
|
12
|
+
spec.description = 'Page-based kaminari pagination for graphql returning collection and pagination metadata.'
|
13
|
+
spec.homepage = 'https://github.com/RenoFi/graphql-pagination'
|
14
|
+
spec.license = 'MIT'
|
15
15
|
|
16
|
-
spec.metadata[
|
17
|
-
spec.metadata[
|
16
|
+
spec.metadata['homepage_uri'] = 'https://github.com/RenoFi/graphql-pagination'
|
17
|
+
spec.metadata['source_code_uri'] = 'https://github.com/RenoFi/graphql-pagination'
|
18
18
|
|
19
|
-
spec.files
|
19
|
+
spec.files = Dir.chdir(__dir__) do
|
20
20
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
21
21
|
end
|
22
|
-
spec.bindir =
|
22
|
+
spec.bindir = 'exe'
|
23
23
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
|
-
spec.require_paths = [
|
24
|
+
spec.require_paths = ['lib']
|
25
25
|
|
26
|
-
spec.add_dependency
|
26
|
+
spec.add_dependency 'graphql', '~> 1.9.4'
|
27
27
|
|
28
|
-
spec.add_development_dependency
|
29
|
-
spec.add_development_dependency
|
30
|
-
spec.add_development_dependency
|
31
|
-
spec.add_development_dependency
|
32
|
-
spec.add_development_dependency
|
33
|
-
spec.add_development_dependency
|
28
|
+
spec.add_development_dependency 'kaminari-activerecord'
|
29
|
+
spec.add_development_dependency 'kaminari-core'
|
30
|
+
spec.add_development_dependency 'pry'
|
31
|
+
spec.add_development_dependency 'rake'
|
32
|
+
spec.add_development_dependency 'rspec'
|
33
|
+
spec.add_development_dependency 'rubocop'
|
34
34
|
end
|
data/lib/graphql-pagination.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
require 'graphql_pagination'
|
data/lib/graphql_pagination.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
1
|
+
require 'graphql_pagination/version'
|
2
|
+
require 'graphql'
|
3
|
+
require 'graphql/schema/object'
|
4
4
|
|
5
5
|
module GraphqlPagination
|
6
6
|
end
|
7
7
|
|
8
|
-
require
|
9
|
-
require
|
10
|
-
require
|
8
|
+
require 'graphql_pagination/version'
|
9
|
+
require 'graphql_pagination/collection_type'
|
10
|
+
require 'graphql_pagination/collection_metadata_type'
|
11
11
|
|
12
12
|
GraphQL::Schema::Object.extend GraphqlPagination::CollectionType
|
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: 0.2.
|
4
|
+
version: 0.2.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: 2019-
|
12
|
+
date: 2019-06-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: graphql
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: 1.9.4
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
|
-
name: kaminari-
|
29
|
+
name: kaminari-activerecord
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - ">="
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
|
-
name: kaminari-
|
43
|
+
name: kaminari-core
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
46
|
- - ">="
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '0'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
|
-
name:
|
57
|
+
name: pry
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
60
|
- - ">="
|
@@ -96,7 +96,7 @@ dependencies:
|
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '0'
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
|
-
name:
|
99
|
+
name: rubocop
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
102
|
- - ">="
|
@@ -119,7 +119,9 @@ extensions: []
|
|
119
119
|
extra_rdoc_files: []
|
120
120
|
files:
|
121
121
|
- ".gitignore"
|
122
|
+
- ".hound.yml"
|
122
123
|
- ".rspec"
|
124
|
+
- ".rubocop.yml"
|
123
125
|
- ".ruby-gemset"
|
124
126
|
- ".ruby-version"
|
125
127
|
- ".travis.yml"
|