49 lines
1.3 KiB
GraphQL
49 lines
1.3 KiB
GraphQL
# TODO: allow queries
|
|
|
|
extend type User {
|
|
"""
|
|
All the recent activity from this user in chronological order
|
|
"""
|
|
activity(actionType: String, after: DateTime, before: DateTime, limit: Int! = 25): ActivityCollection
|
|
@hasRole(role: "server:user")
|
|
@hasScope(scope: "users:read")
|
|
timeline(after: DateTime, before: DateTime, limit: Int! = 25): ActivityCollection
|
|
@hasRole(role: "server:user")
|
|
@hasScopes(scopes: ["users:read", "streams:read"])
|
|
}
|
|
|
|
extend type Stream {
|
|
"""
|
|
All the recent activity on this stream in chronological order
|
|
"""
|
|
activity(actionType: String, after: DateTime, before: DateTime, limit: Int! = 25): ActivityCollection
|
|
@hasRole(role: "server:user")
|
|
@hasScope(scope: "streams:read")
|
|
}
|
|
|
|
extend type Branch {
|
|
"""
|
|
All the recent activity on this branch in chronological order
|
|
"""
|
|
activity(actionType: String, after: DateTime, before: DateTime, limit: Int! = 25): ActivityCollection
|
|
@hasRole(role: "server:user")
|
|
@hasScope(scope: "streams:read")
|
|
}
|
|
|
|
type ActivityCollection {
|
|
totalCount: Int!
|
|
cursor: String
|
|
items: [Activity]
|
|
}
|
|
|
|
type Activity {
|
|
actionType: String!
|
|
info: JSONObject!
|
|
userId: String!
|
|
streamId: String
|
|
resourceId: String!
|
|
resourceType: String!
|
|
time: DateTime!
|
|
message: String!
|
|
}
|