Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions graphql/GetRepos.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
query GetRepos($owner: String!) {
user(login: $owner) {
repositories(last: 100, orderBy: {field: UPDATED_AT, direction: DESC}) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[help]
ページングは after で cursor を文字列で指定するんだけど、hasNext(Prev) が true の場合、
ページングさせたいんだけど、どうやったら良いのかが分からない。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pageInfo {
  hasNextPage,
  hasPreviousPage,
  endCursor,
  startCursor
}

とかにしておいて、引数でend(start)Cursor 位置を受け付けるとかかな?

totalCount
pageInfo {
hasNextPage,
hasPreviousPage
}
edges {
cursor,
node {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

他に欲しいものあるかしら?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updatedAt とか使うかも?
最近の更新順で表示したいときとか。

name,
url,
createdAt
}
}
}
}
}