ev/pkg/es/es.graphqls

24 lines
598 B
GraphQL
Raw Permalink Normal View History

type Meta @goModel(model: "github.com/sour-is/ev/pkg/es/event.Meta") {
eventID: String! @goField(name: "getEventID")
streamID: String!
created: Time!
position: Int!
2022-08-23 21:24:13 -06:00
}
extend type Query {
events(streamID: String! paging: PageInput): Connection!
}
extend type Subscription {
"""after == 0 start from begining, after == -1 start from end"""
eventAdded(streamID: String! after: Int! = -1): Event
}
2022-09-04 08:34:22 -06:00
type Event implements Edge @goModel(model: "github.com/sour-is/ev/pkg/es.GQLEvent") {
2022-08-23 21:24:13 -06:00
id: ID!
eventID: String!
values: Map!
2022-09-04 08:34:22 -06:00
bytes: String!
meta: Meta!
}