Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Get many resources with Graphql
```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
}
```
```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
}
```
```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
You can’t perform that action at this time.