graphql-relay 0.7.0 → 0.7.1

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
  SHA1:
3
- metadata.gz: a058f8b464d8faae1b7937bee2f0da2d2f821d3b
4
- data.tar.gz: 224cf4b1ea77755508505d43ae5ed15fbd9a3b0b
3
+ metadata.gz: 4cb7e4a30922d4db833bf738f058336298533802
4
+ data.tar.gz: 286be9492a0ada16bdeb48c37b70cc4f60c1ecd8
5
5
  SHA512:
6
- metadata.gz: 959da8064bacec3964fe0e449bcf142547ac792604ceed31636281476d817f216538fc86275b72883ae0a028bb47bfcb96219d305edd266da29317073bbb0632
7
- data.tar.gz: 35373b6b9c72e102c54f23a9abc2d9dc6271c2e0d4ef3cc43e8b899cc39ce7843a71ca242653eaad77d98752d0e8f2b9aacc7e804db8dff10cb1796423bccbff
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
@@ -1,5 +1,5 @@
1
1
  module GraphQL
2
2
  module Relay
3
- VERSION = '0.7.0'
3
+ VERSION = '0.7.1'
4
4
  end
5
5
  end
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.0
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-20 00:00:00.000000000 Z
11
+ date: 2016-02-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphql