Avatar
norio_nomura 5/5/2018 5:43 AM
ちなみにクエリはこんな感じ。 query ($owner: String!, $name: String!, $cursor: String = "") { repository(owner: $owner, name: $name) { refs(refPrefix: "refs/tags/", first: 100, after: $cursor, orderBy: {field: TAG_COMMIT_DATE, direction: DESC}) { pageInfo { endCursor hasNextPage startCursor } tags: nodes { name } } } } Query Variables: { "owner": "apple", "name": "swift", "cursor": "" } (edited)
5:45 AM
ページングはcursorに前のendCursorを渡す。
5:47 AM
curl https://api.github.com/repos/apple/swift/tagsでタグ一覧を取得する方法は、そもそもAPIドキュメントに載ってないので、非公式な動作なのかも? https://developer.github.com/v3/git/tags/
5:49 AM
というか、ドキュメントに載ってなかったのでGraphQLを使うようにしました。