From 45b04351d8d02e53b3401b0ee23f7cbe750b63cd Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Mon, 3 May 2021 11:45:15 +0200 Subject: bug: have a type for combined ids, fix https://github.com/MichaelMure/git-bug/issues/653 --- api/graphql/schema/bug.graphql | 4 +++- api/graphql/schema/identity.graphql | 2 +- api/graphql/schema/mutations.graphql | 6 ++---- api/graphql/schema/operations.graphql | 14 +++++++------- api/graphql/schema/timeline.graphql | 12 ++++++------ api/graphql/schema/types.graphql | 1 + 6 files changed, 20 insertions(+), 19 deletions(-) (limited to 'api/graphql/schema') diff --git a/api/graphql/schema/bug.graphql b/api/graphql/schema/bug.graphql index 03aa95b8..17d3a897 100644 --- a/api/graphql/schema/bug.graphql +++ b/api/graphql/schema/bug.graphql @@ -1,5 +1,7 @@ """Represents a comment on a bug.""" type Comment implements Authored { + id: CombinedId! + """The author of this comment.""" author: Identity! @@ -29,7 +31,7 @@ enum Status { type Bug implements Authored { """The identifier for this bug""" - id: String! + id: ID! """The human version (truncated) identifier for this bug""" humanId: String! status: Status! diff --git a/api/graphql/schema/identity.graphql b/api/graphql/schema/identity.graphql index 93154a90..c910ea55 100644 --- a/api/graphql/schema/identity.graphql +++ b/api/graphql/schema/identity.graphql @@ -1,7 +1,7 @@ """Represents an identity""" type Identity { """The identifier for this identity""" - id: String! + id: ID! """The human version (truncated) identifier for this identity""" humanId: String! """The name of the person, if known.""" diff --git a/api/graphql/schema/mutations.graphql b/api/graphql/schema/mutations.graphql index 078dc214..be6a0115 100644 --- a/api/graphql/schema/mutations.graphql +++ b/api/graphql/schema/mutations.graphql @@ -95,10 +95,8 @@ input EditCommentInput { clientMutationId: String """The name of the repository. If not set, the default repository is used.""" repoRef: String - """The bug ID's prefix.""" - prefix: String! - """The ID of the comment to be changed.""" - target: String! + """A prefix of the CombinedId of the comment to be changed.""" + targetPrefix: String! """The new message to be set.""" message: String! """The collection of file's hash required for the first message.""" diff --git a/api/graphql/schema/operations.graphql b/api/graphql/schema/operations.graphql index 18e0929c..8e198753 100644 --- a/api/graphql/schema/operations.graphql +++ b/api/graphql/schema/operations.graphql @@ -1,7 +1,7 @@ """An operation applied to a bug.""" interface Operation { """The identifier of the operation""" - id: String! + id: ID! """The operations author.""" author: Identity! """The datetime when this operation was issued.""" @@ -28,7 +28,7 @@ type OperationEdge { type CreateOperation implements Operation & Authored { """The identifier of the operation""" - id: String! + id: ID! """The author of this object.""" author: Identity! """The datetime when this operation was issued.""" @@ -41,7 +41,7 @@ type CreateOperation implements Operation & Authored { type SetTitleOperation implements Operation & Authored { """The identifier of the operation""" - id: String! + id: ID! """The author of this object.""" author: Identity! """The datetime when this operation was issued.""" @@ -53,7 +53,7 @@ type SetTitleOperation implements Operation & Authored { type AddCommentOperation implements Operation & Authored { """The identifier of the operation""" - id: String! + id: ID! """The author of this object.""" author: Identity! """The datetime when this operation was issued.""" @@ -65,7 +65,7 @@ type AddCommentOperation implements Operation & Authored { type EditCommentOperation implements Operation & Authored { """The identifier of the operation""" - id: String! + id: ID! """The author of this object.""" author: Identity! """The datetime when this operation was issued.""" @@ -78,7 +78,7 @@ type EditCommentOperation implements Operation & Authored { type SetStatusOperation implements Operation & Authored { """The identifier of the operation""" - id: String! + id: ID! """The author of this object.""" author: Identity! """The datetime when this operation was issued.""" @@ -89,7 +89,7 @@ type SetStatusOperation implements Operation & Authored { type LabelChangeOperation implements Operation & Authored { """The identifier of the operation""" - id: String! + id: ID! """The author of this object.""" author: Identity! """The datetime when this operation was issued.""" diff --git a/api/graphql/schema/timeline.graphql b/api/graphql/schema/timeline.graphql index 12462aa3..b7ab5ca8 100644 --- a/api/graphql/schema/timeline.graphql +++ b/api/graphql/schema/timeline.graphql @@ -1,7 +1,7 @@ """An item in the timeline of events""" interface TimelineItem { """The identifier of the source operation""" - id: String! + id: CombinedId! } """CommentHistoryStep hold one version of a message in the history""" @@ -31,7 +31,7 @@ type TimelineItemEdge { """CreateTimelineItem is a TimelineItem that represent the creation of a bug and its message edition history""" type CreateTimelineItem implements TimelineItem & Authored { """The identifier of the source operation""" - id: String! + id: CombinedId! author: Identity! message: String! messageIsEmpty: Boolean! @@ -45,7 +45,7 @@ type CreateTimelineItem implements TimelineItem & Authored { """AddCommentTimelineItem is a TimelineItem that represent a Comment and its edition history""" type AddCommentTimelineItem implements TimelineItem & Authored { """The identifier of the source operation""" - id: String! + id: CombinedId! author: Identity! message: String! messageIsEmpty: Boolean! @@ -59,7 +59,7 @@ type AddCommentTimelineItem implements TimelineItem & Authored { """LabelChangeTimelineItem is a TimelineItem that represent a change in the labels of a bug""" type LabelChangeTimelineItem implements TimelineItem & Authored { """The identifier of the source operation""" - id: String! + id: CombinedId! author: Identity! date: Time! added: [Label!]! @@ -69,7 +69,7 @@ type LabelChangeTimelineItem implements TimelineItem & Authored { """SetStatusTimelineItem is a TimelineItem that represent a change in the status of a bug""" type SetStatusTimelineItem implements TimelineItem & Authored { """The identifier of the source operation""" - id: String! + id: CombinedId! author: Identity! date: Time! status: Status! @@ -78,7 +78,7 @@ type SetStatusTimelineItem implements TimelineItem & Authored { """LabelChangeTimelineItem is a TimelineItem that represent a change in the title of a bug""" type SetTitleTimelineItem implements TimelineItem & Authored { """The identifier of the source operation""" - id: String! + id: CombinedId! author: Identity! date: Time! title: String! diff --git a/api/graphql/schema/types.graphql b/api/graphql/schema/types.graphql index 0182885e..f4284b2d 100644 --- a/api/graphql/schema/types.graphql +++ b/api/graphql/schema/types.graphql @@ -1,3 +1,4 @@ +scalar CombinedId scalar Time scalar Hash -- cgit