diff --git a/includes/data/connection/class-event-connection-resolver.php b/includes/data/connection/class-event-connection-resolver.php index a0158e01..9fa0083f 100644 --- a/includes/data/connection/class-event-connection-resolver.php +++ b/includes/data/connection/class-event-connection-resolver.php @@ -106,7 +106,7 @@ public function get_query_args() { /** * Set posts_per_page the highest value of $first and $last, with a (filterable) max of 100 */ - $query_args['posts_per_page'] = $this->one_to_one ? 1 : min( max( absint( $first ), absint( $last ), 10 ), $this->query_amount ) + 1; + $query_args['posts_per_page'] = $this->one_to_one ? 1 : min( max( absint( $first ), absint( $last ), 10 ), $this->query_amount ) + 2; // set the graphql cursor args. $query_args['graphql_cursor_compare'] = ( ! empty( $last ) ) ? '>' : '<'; @@ -135,6 +135,7 @@ public function get_query_args() { 'key' => Occurrences::table_name() . '.start_date_utc', 'value' => $cursor_node->start_date_utc, 'type' => 'DATETIME', + 'order' => 'ASC' ], ];