ev/gql/eventstore.graphqls

34 lines
825 B
GraphQL
Raw Permalink Normal View History

2023-07-12 17:35:02 -06:00
type Meta @goModel(model: "go.sour.is/ev/pkg/event.Meta") {
eventID: String! @goField(name: "getEventID")
streamID: String! @goField(name: "ActualStreamID")
position: Int! @goField(name: "ActualPosition")
created: Time!
2022-08-23 21:24:13 -06:00
}
extend type Query {
events(streamID: String! paging: PageInput): Connection!
}
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
}
type Event implements Edge @goModel(model: "go.sour.is/ev/pkg/gql.Event") {
2022-08-23 21:24:13 -06:00
id: ID!
eventID: String!
streamID: String!
position: Int!
2022-08-23 21:24:13 -06:00
values: Map!
2022-09-04 08:34:22 -06:00
bytes: String!
type: String!
created: Time!
2022-09-04 08:34:22 -06:00
meta: Meta!
linked: Event
}