Files
speckle-server/packages/server/modules/activitystream/graph/schemas/activity.graphql
T
2021-06-24 16:07:16 +01:00

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!
}