graphql-relay 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -3
- data/lib/graphql/relay/relation_connection.rb +9 -0
- data/lib/graphql/relay/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4cb7e4a30922d4db833bf738f058336298533802
|
4
|
+
data.tar.gz: 286be9492a0ada16bdeb48c37b70cc4f60c1ecd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56f104a6b5bd5505fa5dee4fe4baee4d981c14284bdfe2afb7357fdb72384fe213b02899b68129806aff1a5a1d5044b9f57fd23672cbb9faf26f8caf2aca2ce4
|
7
|
+
data.tar.gz: 1be2fe49797910d14ff5dffa5a665a937c63c12a69136c6a9af3c94ccb42724e5c3d89a46740259a745ffc9302839612ba66a92de24d44123245534f1c205203
|
data/README.md
CHANGED
@@ -318,9 +318,6 @@ https://medium.com/@gauravtiwari/graphql-and-relay-on-rails-first-relay-powered-
|
|
318
318
|
|
319
319
|
## Todo
|
320
320
|
|
321
|
-
- Refactor some RelationConnection issues:
|
322
|
-
- fix [unbounded count in page info](https://github.com/rmosolgo/graphql-relay-ruby/blob/88b3d94f75a6dd4c8b2604743108db31f66f8dcc/lib/graphql/relay/base_connection.rb#L79-L86), [details](https://github.com/rmosolgo/graphql-relay-ruby/issues/1)
|
323
|
-
|
324
321
|
## More Resources
|
325
322
|
|
326
323
|
- [GraphQL Slack](http://graphql-slack.herokuapp.com), come join us in the `#ruby` channel!
|
@@ -13,6 +13,15 @@ module GraphQL
|
|
13
13
|
@order ||= (super || DEFAULT_ORDER)
|
14
14
|
end
|
15
15
|
|
16
|
+
def has_next_page
|
17
|
+
!!(first && sliced_nodes.limit(first + 1).count > first)
|
18
|
+
end
|
19
|
+
|
20
|
+
# Used by `pageInfo`
|
21
|
+
def has_previous_page
|
22
|
+
!!(last && sliced_nodes.limit(last + 1).count > last)
|
23
|
+
end
|
24
|
+
|
16
25
|
private
|
17
26
|
|
18
27
|
# apply first / last limit results
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphql-relay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Mosolgo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: graphql
|