From fd2ba4be7e208972442e94fe7854cb29770bc012 Mon Sep 17 00:00:00 2001 From: Tieg Zaharia Date: Wed, 12 Apr 2017 14:28:50 -0400 Subject: [PATCH 1/2] Add some details to hasNextPage/hasPreviousPage descriptions. --- lib/graphql/relay/page_info.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/graphql/relay/page_info.rb b/lib/graphql/relay/page_info.rb index a2a273cdf7..13079a5b1b 100644 --- a/lib/graphql/relay/page_info.rb +++ b/lib/graphql/relay/page_info.rb @@ -5,8 +5,8 @@ module Relay PageInfo = GraphQL::ObjectType.define do name("PageInfo") description("Information about pagination in a connection.") - field :hasNextPage, !types.Boolean, "Indicates if there are more pages to fetch", property: :has_next_page - field :hasPreviousPage, !types.Boolean, "Indicates if there are any pages prior to the current page", property: :has_previous_page + field :hasNextPage, !types.Boolean, "Indicates if there are more pages to fetch (only meaningful if `first` argument is present)", property: :has_next_page + field :hasPreviousPage, !types.Boolean, "Indicates if there are any pages prior to the current page (only meaningful if `last` argument is present)", property: :has_previous_page field :startCursor, types.String, "When paginating backwards, the cursor to continue", property: :start_cursor field :endCursor, types.String, "When paginating forwards, the cursor to continue", property: :end_cursor default_relay true From 77aa26dc5eb81e8d81cf7aaa68a34ba1ad16df59 Mon Sep 17 00:00:00 2001 From: Tieg Zaharia Date: Tue, 18 Apr 2017 09:45:12 -0400 Subject: [PATCH 2/2] Match PageInfo descriptions to graphql-relay-js library. --- lib/graphql/relay/page_info.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/graphql/relay/page_info.rb b/lib/graphql/relay/page_info.rb index 13079a5b1b..67060253be 100644 --- a/lib/graphql/relay/page_info.rb +++ b/lib/graphql/relay/page_info.rb @@ -5,10 +5,10 @@ module Relay PageInfo = GraphQL::ObjectType.define do name("PageInfo") description("Information about pagination in a connection.") - field :hasNextPage, !types.Boolean, "Indicates if there are more pages to fetch (only meaningful if `first` argument is present)", property: :has_next_page - field :hasPreviousPage, !types.Boolean, "Indicates if there are any pages prior to the current page (only meaningful if `last` argument is present)", property: :has_previous_page - field :startCursor, types.String, "When paginating backwards, the cursor to continue", property: :start_cursor - field :endCursor, types.String, "When paginating forwards, the cursor to continue", property: :end_cursor + field :hasNextPage, !types.Boolean, "When paginating forwards, are there more items?", property: :has_next_page + field :hasPreviousPage, !types.Boolean, "When paginating backwards, are there more items?", property: :has_previous_page + field :startCursor, types.String, "When paginating backwards, the cursor to continue.", property: :start_cursor + field :endCursor, types.String, "When paginating forwards, the cursor to continue.", property: :end_cursor default_relay true end end