Skip to content

Instantly share code, notes, and snippets.

@RyanCavanaugh
Created August 8, 2019 20:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RyanCavanaugh/34700ccc304ae8f65f441a46e3e4fcf3 to your computer and use it in GitHub Desktop.
Save RyanCavanaugh/34700ccc304ae8f65f441a46e3e4fcf3 to your computer and use it in GitHub Desktop.
Failing GraphQL query
{
issue_1: repository(owner: "microsoft", name: "TypeScript") {
issueOrPullRequest(number: 1) {
...IssueOrPRBody
}
}
issue_2: repository(owner: "microsoft", name: "TypeScript") {
issueOrPullRequest(number: 2) {
...IssueOrPRBody
}
}
}
fragment IssueOrPRBody on IssueOrPullRequest {
... on Issue {
id
body
timelineItems(last: 1) {
...issueTimelineItems
}
}
... on PullRequest {
id
number
url
title
state
body
updatedAt
assignees(first: 1) {
...users
}
timelineItems(last: 1) {
...pullRequestTimelineItems
}
}
}
fragment users on UserConnection {
edges {
node {
avatarUrl
login
}
}
}
fragment issueTimelineItems on IssueTimelineItemsConnection {
edges {
node {
__typename
... on IssueComment {
id
author {
login
avatarUrl
}
body
createdAt
}
... on AssignedEvent {
id
createdAt
actor {
login
avatarUrl
}
assignee {
... on User {
login
avatarUrl
}
}
}
... on LabeledEvent {
id
createdAt
actor {
login
avatarUrl
}
label {
name
color
}
}
... on UnlabeledEvent {
id
createdAt
actor {
login
avatarUrl
}
label {
name
color
}
}
... on ClosedEvent {
id
createdAt
actor {
login
avatarUrl
}
}
... on ReopenedEvent {
id
createdAt
actor {
login
avatarUrl
}
}
... on MilestonedEvent {
id
createdAt
actor {
login
avatarUrl
}
milestoneTitle
}
... on DemilestonedEvent {
id
createdAt
actor {
login
avatarUrl
}
milestoneTitle
}
... on LockedEvent {
id
createdAt
actor {
login
avatarUrl
}
lockReason
}
}
}
}
fragment pullRequestTimelineItems on PullRequestTimelineItemsConnection {
edges {
node {
__typename
... on IssueComment {
id
author {
login
avatarUrl
}
body
createdAt
}
... on AssignedEvent {
id
createdAt
actor {
login
avatarUrl
}
assignee {
... on User {
login
avatarUrl
}
}
}
... on LabeledEvent {
id
createdAt
actor {
login
avatarUrl
}
label {
name
color
}
}
... on UnlabeledEvent {
id
createdAt
actor {
login
avatarUrl
}
label {
name
color
}
}
... on ClosedEvent {
id
createdAt
actor {
login
avatarUrl
}
}
... on ReopenedEvent {
id
createdAt
actor {
login
avatarUrl
}
}
... on MilestonedEvent {
id
createdAt
actor {
login
avatarUrl
}
milestoneTitle
}
... on DemilestonedEvent {
id
createdAt
actor {
login
avatarUrl
}
milestoneTitle
}
... on LockedEvent {
id
createdAt
actor {
login
avatarUrl
}
lockReason
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment