graphql-python / graphql-python/graphql-relay-py

has_previous_page and has_next_page always False while navigating

オープン
#12 コメント 4 件 リアクション 3 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
144
フォーク
41
PR マージ指標
30日以内にマージされた PR はありません

説明

While using the pageInfo `hasPreviousPage` and `hasNextPage` cursor based navigation (before and after), it seems these results are always set to False.

The corresponding code (https://github.com/graphql-python/graphql-relay-py/blob/master/graphql_relay/connection/arrayconnection.py#L104-L105):
```python
return connection_type(
edges=edges,
page_info=pageinfo_type(
start_cursor=first_edge_cursor,
end_cursor=last_edge_cursor,
has_previous_page=isinstance(last, int) and start_offset > lower_bound,
has_next_page=isinstance(first, int) and end_offset < upper_bound
)
)
```

Querying with `first: 5, after: "xxx"` in this case always results in `hasPreviousPage: false`.
The same for `last: 5, before: "xxx"`, which results always in `hasNextPage: false`.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。