Created
November 17, 2018 05:07
-
-
Save h-michael/96ad9a34d017ebd3b7d605b0e7e3b51d to your computer and use it in GitHub Desktop.
Get many resources with Graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```graphql | |
query PullRequestTimelineItems($id: ID!, $first: Int = 10) { | |
node(id: $id) { | |
__typename | |
... on PullRequest { | |
id | |
author { | |
__typename | |
...custom_actor | |
} | |
editor { | |
__typename | |
...custom_actor | |
} | |
title | |
body | |
bodyText | |
timeline(first: $first) { | |
edges { | |
node { | |
__typename | |
... on Commit { | |
...custom_commit | |
} | |
... on CommitCommentThread { | |
id | |
commit_of_comment: commit { | |
...custom_commit | |
} | |
} | |
... on PullRequestReview { | |
id | |
author { | |
...custom_actor | |
} | |
commit_of_pr_review: commit { | |
...custom_commit | |
} | |
state | |
createdAt | |
updatedAt | |
lastEditedAt | |
} | |
... on PullRequestReviewThread { | |
id | |
comments(first: $first) { | |
edges { | |
node { | |
id | |
bodyText | |
createdAt | |
updatedAt | |
lastEditedAt | |
} | |
} | |
} | |
} | |
... on PullRequestReviewComment { | |
id | |
bodyText | |
createdAt | |
updatedAt | |
lastEditedAt | |
} | |
... on IssueComment { | |
id | |
bodyText | |
createdAt | |
updatedAt | |
lastEditedAt | |
} | |
... on ClosedEvent { | |
id | |
actor { | |
...custom_actor | |
} | |
createdAt | |
} | |
... on ReopenedEvent { | |
id | |
actor { | |
...custom_actor | |
} | |
createdAt | |
} | |
... on AssignedEvent { | |
id | |
actor { | |
...custom_actor | |
} | |
user { | |
name | |
login | |
} | |
createdAt | |
} | |
... on UnassignedEvent { | |
id | |
actor { | |
...custom_actor | |
} | |
user { | |
name | |
login | |
} | |
createdAt | |
} | |
... on LabeledEvent { | |
id | |
actor { | |
...custom_actor | |
} | |
label { | |
name | |
description | |
color | |
} | |
createdAt | |
} | |
... on ReviewRequestedEvent { | |
id | |
actor { | |
...custom_actor | |
} | |
createdAt | |
} | |
... on ReviewRequestRemovedEvent { | |
id | |
createdAt | |
} | |
} | |
} | |
pageInfo { | |
hasNextPage | |
endCursor | |
} | |
} | |
} | |
} | |
...RateLimitInfo | |
} | |
fragment RateLimitInfo on Query { | |
rateLimit { | |
cost | |
limit | |
remaining | |
resetAt | |
} | |
} | |
fragment custom_actor on Actor { | |
__typename | |
... on User { | |
id | |
name | |
login | |
} | |
... on Organization { | |
id | |
name | |
login | |
} | |
... on Bot { | |
id | |
login | |
} | |
} | |
fragment custom_commit on Commit { | |
id | |
oid | |
messageBody | |
messageHeadline | |
commitUrl | |
committedDate | |
pushedDate | |
} | |
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```graphql | |
query PullRequestTimelineItems($id: ID!, $first: Int = 10) { | |
node(id: $id) { | |
__typename | |
... on PullRequest { | |
id | |
author { | |
__typename | |
...custom_actor | |
} | |
editor { | |
__typename | |
...custom_actor | |
} | |
title | |
body | |
bodyText | |
timeline(first: $first) { | |
edges { | |
node { | |
__typename | |
... on Commit { | |
...custom_commit | |
} | |
... on CommitCommentThread { | |
id | |
} | |
... on PullRequestReview { | |
id | |
author { | |
...custom_actor | |
} | |
commit_of_pr_review: commit { | |
...custom_commit | |
} | |
state | |
createdAt | |
updatedAt | |
lastEditedAt | |
} | |
... on PullRequestReviewThread { | |
id | |
comments(first: $first) { | |
edges { | |
node { | |
id | |
bodyText | |
createdAt | |
updatedAt | |
lastEditedAt | |
} | |
} | |
} | |
} | |
... on PullRequestReviewComment { | |
id | |
bodyText | |
createdAt | |
updatedAt | |
lastEditedAt | |
} | |
... on IssueComment { | |
id | |
bodyText | |
createdAt | |
updatedAt | |
lastEditedAt | |
} | |
... on ClosedEvent { | |
id | |
actor { | |
...custom_actor | |
} | |
createdAt | |
} | |
... on ReopenedEvent { | |
id | |
actor { | |
...custom_actor | |
} | |
createdAt | |
} | |
... on AssignedEvent { | |
id | |
actor { | |
...custom_actor | |
} | |
user { | |
name | |
login | |
} | |
createdAt | |
} | |
... on UnassignedEvent { | |
id | |
actor { | |
...custom_actor | |
} | |
user { | |
name | |
login | |
} | |
createdAt | |
} | |
... on LabeledEvent { | |
id | |
actor { | |
...custom_actor | |
} | |
label { | |
name | |
description | |
color | |
} | |
createdAt | |
} | |
... on ReviewRequestedEvent { | |
id | |
actor { | |
...custom_actor | |
} | |
createdAt | |
} | |
... on ReviewRequestRemovedEvent { | |
id | |
actor { | |
...custom_actor | |
} | |
createdAt | |
} | |
} | |
} | |
pageInfo { | |
hasNextPage | |
endCursor | |
} | |
} | |
} | |
} | |
...RateLimitInfo | |
} | |
fragment RateLimitInfo on Query { | |
rateLimit { | |
cost | |
limit | |
remaining | |
resetAt | |
} | |
} | |
fragment custom_actor on Actor { | |
__typename | |
... on User { | |
id | |
name | |
login | |
} | |
... on Organization { | |
id | |
name | |
login | |
} | |
... on Bot { | |
id | |
login | |
} | |
} | |
fragment custom_commit on Commit { | |
id | |
oid | |
messageBody | |
messageHeadline | |
commitUrl | |
committedDate | |
pushedDate | |
} | |
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```graphql | |
query PullRequestTimelineItems($id: ID!, $first: Int = 10) { | |
node(id: $id) { | |
__typename | |
... on PullRequest { | |
id | |
author { | |
__typename | |
...custom_actor | |
} | |
editor { | |
__typename | |
...custom_actor | |
} | |
title | |
body | |
bodyText | |
timeline(first: $first) { | |
edges { | |
node { | |
__typename | |
... on Commit { | |
...custom_commit | |
} | |
... on CommitCommentThread { | |
id | |
commit_of_comment: commit { | |
...custom_commit | |
} | |
} | |
... on PullRequestReview { | |
id | |
author { | |
...custom_actor | |
} | |
commit_of_pr_review: commit { | |
...custom_commit | |
} | |
state | |
createdAt | |
updatedAt | |
lastEditedAt | |
} | |
... on PullRequestReviewThread { | |
id | |
comments(first: $first) { | |
edges { | |
node { | |
id | |
bodyText | |
createdAt | |
updatedAt | |
lastEditedAt | |
} | |
} | |
} | |
} | |
... on PullRequestReviewComment { | |
id | |
bodyText | |
createdAt | |
updatedAt | |
lastEditedAt | |
} | |
... on IssueComment { | |
id | |
bodyText | |
createdAt | |
updatedAt | |
lastEditedAt | |
} | |
... on ClosedEvent { | |
id | |
actor { | |
...custom_actor | |
} | |
createdAt | |
} | |
... on ReopenedEvent { | |
id | |
actor { | |
...custom_actor | |
} | |
createdAt | |
} | |
... on AssignedEvent { | |
id | |
actor { | |
...custom_actor | |
} | |
user { | |
name | |
login | |
} | |
createdAt | |
} | |
... on UnassignedEvent { | |
id | |
actor { | |
...custom_actor | |
} | |
user { | |
name | |
login | |
} | |
createdAt | |
} | |
... on LabeledEvent { | |
id | |
actor { | |
...custom_actor | |
} | |
label { | |
name | |
description | |
color | |
} | |
createdAt | |
} | |
... on ReviewRequestedEvent { | |
id | |
actor { | |
...custom_actor | |
} | |
createdAt | |
} | |
... on ReviewRequestRemovedEvent { | |
id | |
actor { | |
...custom_actor | |
} | |
createdAt | |
} | |
} | |
} | |
pageInfo { | |
hasNextPage | |
endCursor | |
} | |
} | |
} | |
} | |
...RateLimitInfo | |
} | |
fragment RateLimitInfo on Query { | |
rateLimit { | |
cost | |
limit | |
remaining | |
resetAt | |
} | |
} | |
fragment custom_actor on Actor { | |
__typename | |
... on User { | |
id | |
name | |
login | |
} | |
... on Organization { | |
id | |
name | |
login | |
} | |
... on Bot { | |
id | |
login | |
} | |
} | |
fragment custom_commit on Commit { | |
id | |
oid | |
messageBody | |
messageHeadline | |
commitUrl | |
committedDate | |
pushedDate | |
} | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment