2022-08-19 12:26:42 -06:00
|
|
|
|
2023-02-26 22:33:01 -07:00
|
|
|
type Meta @goModel(model: "go.sour.is/ev/pkg/es/event.Meta") {
|
2022-08-19 12:26:42 -06:00
|
|
|
eventID: String! @goField(name: "getEventID")
|
2022-11-20 10:15:51 -07:00
|
|
|
streamID: String! @goField(name: "ActualStreamID")
|
|
|
|
position: Int! @goField(name: "ActualPosition")
|
2022-08-19 12:26:42 -06:00
|
|
|
created: Time!
|
2022-08-23 21:24:13 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
extend type Query {
|
|
|
|
events(streamID: String! paging: PageInput): Connection!
|
|
|
|
}
|
2022-11-20 10:15:51 -07:00
|
|
|
extend type Mutation {
|
|
|
|
truncateStream(streamID: String! index:Int!): Boolean!
|
|
|
|
}
|
2022-08-23 21:24:13 -06:00
|
|
|
extend type Subscription {
|
|
|
|
"""after == 0 start from begining, after == -1 start from end"""
|
|
|
|
eventAdded(streamID: String! after: Int! = -1): Event
|
|
|
|
}
|
|
|
|
|
2023-02-26 22:33:01 -07:00
|
|
|
type Event implements Edge @goModel(model: "go.sour.is/ev/pkg/es.GQLEvent") {
|
2022-08-23 21:24:13 -06:00
|
|
|
id: ID!
|
|
|
|
|
|
|
|
eventID: String!
|
2022-11-20 10:15:51 -07:00
|
|
|
streamID: String!
|
|
|
|
position: Int!
|
|
|
|
|
2022-08-23 21:24:13 -06:00
|
|
|
values: Map!
|
2022-09-04 08:34:22 -06:00
|
|
|
bytes: String!
|
2022-10-25 20:15:57 -06:00
|
|
|
type: String!
|
|
|
|
created: Time!
|
2022-09-04 08:34:22 -06:00
|
|
|
meta: Meta!
|
2022-10-25 20:15:57 -06:00
|
|
|
|
|
|
|
linked: Event
|
2022-08-19 12:26:42 -06:00
|
|
|
}
|