Files
speckle-server/packages/server/modules/activitystream/graph/schemas/activity.graphql
T
2022-03-29 17:12:31 +03:00

79 lines
1.7 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
cursor: DateTime
limit: Int! = 25
): ActivityCollection @hasRole(role: "server:user") @hasScope(scope: "users:read")
timeline(
after: DateTime
before: DateTime
cursor: 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
cursor: 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
cursor: DateTime
limit: Int! = 25
): ActivityCollection @hasRole(role: "server:user") @hasScope(scope: "streams:read")
}
extend type Commit {
"""
All the recent activity on this commit in chronological order
"""
activity(
actionType: String
after: DateTime
before: DateTime
cursor: 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!
}