Skip to content

Commit 5f7970f

Browse files
committed
forge--github-repository-query: Shift pagination point
Github might chose to paginate at `discussions', `discussions.comments' or `discussions.comments.replies'. We know that it does so at the first of these, but not whether it also does at the latter two. If it does, that is a problem, which we would not be able to work around, because (unlike `discussion') the singular variants `discussions.comment' and `discussion.comments.reply' do not exist. So stop limiting the number of replies to 20, and just hope that for these edges, Github always returns all nodes, unless told otherwise. To reduce the likelihood of making individual requests deemed to expensive by Github, limit `discussions' to 30. This results in more requests and ultimately is more expensive, but that's GraphQL for you. Closes #843.
1 parent d644f9e commit 5f7970f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lisp/forge-github.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
emoji
9696
isAnswerable
9797
description)
98-
( discussions [(:edges t)
98+
( discussions [(:edges 20)
9999
(:singular discussion number)
100100
(orderBy ((field UPDATED_AT) (direction DESC)))]
101101
number
@@ -120,7 +120,7 @@
120120
createdAt
121121
updatedAt
122122
body
123-
( replies [(:edges 20)]
123+
( replies [(:edges t)]
124124
id
125125
databaseId
126126
(author login)

0 commit comments

Comments
 (0)