Skip to content

GraphQL API should have a isDraft field for Pull Requests #24816

Discussion options

You must be logged in to vote

This is now available under Preview by passing the application/vnd.github.shadow-cat-preview+json  Accept header: https://developer.github.com/v4/previews/#draft-pull-requests-preview

Example query:

{
  pr: resource(url: "https://github.com/react-spring/react-spring/pull/808") {
    ... on PullRequest {
      title
      isDraft
    }
  }
}

Response:

{
  "data": {
    "pr": {
      "title": "feat: add SpringValue class",
      "isDraft": true
    }
  }
}

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants