bug.graphql

  1"""Represents an person"""
  2type Person {
  3  """The name of the person, if known."""
  4  name: String
  5  """The email of the person, if known."""
  6  email: String
  7  """The login of the person, if known."""
  8  login: String
  9  """A string containing the either the name of the person, its login or both"""
 10  displayName: String!
 11  """An url to an avatar"""
 12  avatarUrl: String
 13}
 14
 15"""Represents a comment on a bug."""
 16type Comment implements Authored {
 17  """The author of this comment."""
 18  author: Person!
 19
 20  """The message of this comment."""
 21  message: String!
 22
 23  """All media's hash referenced in this comment"""
 24  files: [Hash!]!
 25}
 26
 27type CommentConnection {
 28  edges: [CommentEdge!]!
 29  nodes: [Comment!]!
 30  pageInfo: PageInfo!
 31  totalCount: Int!
 32}
 33
 34type CommentEdge {
 35  cursor: String!
 36  node: Comment!
 37}
 38
 39enum Status {
 40  OPEN
 41  CLOSED
 42}
 43
 44type Bug {
 45  id: String!
 46  humanId: String!
 47  status: Status!
 48  title: String!
 49  labels: [Label!]!
 50  author: Person!
 51  createdAt: Time!
 52  lastEdit: Time!
 53
 54  comments(
 55    """Returns the elements in the list that come after the specified cursor."""
 56    after: String
 57    """Returns the elements in the list that come before the specified cursor."""
 58    before: String
 59    """Returns the first _n_ elements from the list."""
 60    first: Int
 61    """Returns the last _n_ elements from the list."""
 62    last: Int
 63  ): CommentConnection!
 64
 65  timeline(
 66    """Returns the elements in the list that come after the specified cursor."""
 67    after: String
 68    """Returns the elements in the list that come before the specified cursor."""
 69    before: String
 70    """Returns the first _n_ elements from the list."""
 71    first: Int
 72    """Returns the last _n_ elements from the list."""
 73    last: Int
 74  ): TimelineItemConnection!
 75
 76  operations(
 77    """Returns the elements in the list that come after the specified cursor."""
 78    after: String
 79    """Returns the elements in the list that come before the specified cursor."""
 80    before: String
 81    """Returns the first _n_ elements from the list."""
 82    first: Int
 83    """Returns the last _n_ elements from the list."""
 84    last: Int
 85  ): OperationConnection!
 86}
 87
 88"""The connection type for Bug."""
 89type BugConnection {
 90  """A list of edges."""
 91  edges: [BugEdge!]!
 92  nodes: [Bug!]!
 93  """Information to aid in pagination."""
 94  pageInfo: PageInfo!
 95  """Identifies the total count of items in the connection."""
 96  totalCount: Int!
 97}
 98
 99"""An edge in a connection."""
100type BugEdge {
101  """A cursor for use in pagination."""
102  cursor: String!
103  """The item at the end of the edge."""
104  node: Bug!
105}
106
107type Repository {
108  allBugs(
109    """Returns the elements in the list that come after the specified cursor."""
110    after: String
111    """Returns the elements in the list that come before the specified cursor."""
112    before: String
113    """Returns the first _n_ elements from the list."""
114    first: Int
115    """Returns the last _n_ elements from the list."""
116    last: Int
117    """A query to select and order bugs"""
118    query: String
119  ): BugConnection!
120  bug(prefix: String!): Bug
121}
122