62 lines
1.3 KiB
GraphQL
62 lines
1.3 KiB
GraphQL
extend type Query {
|
|
stream(id: String!): Stream
|
|
}
|
|
|
|
type Stream {
|
|
id: String!
|
|
name: String!
|
|
description: String
|
|
isPublic: Boolean!
|
|
clonedFrom: Stream
|
|
createdAt: String!
|
|
updatedAt: String!
|
|
"""
|
|
All the users with access to this stream.
|
|
"""
|
|
users: [User]!
|
|
role: String
|
|
}
|
|
|
|
extend type User {
|
|
"""
|
|
All the streams that a user has access to.
|
|
"""
|
|
streamCollection(offset: Int! = 0, limit: Int! = 100): StreamCollection
|
|
|
|
"""
|
|
The role this user has on a specific stream (can be populated when accessing a stream's users).
|
|
"""
|
|
role: String
|
|
}
|
|
|
|
type StreamCollection {
|
|
totalCount: Int!
|
|
streams: [Stream]
|
|
}
|
|
|
|
extend type Mutation {
|
|
streamCreate( stream: StreamInput! ): String
|
|
streamUpdate( stream: StreamInput! ): Boolean!
|
|
streamDelete( id: String! ): Boolean!
|
|
"""
|
|
Clones a given stream, duplicating it within the current user's account without preserving access rights.
|
|
NOTE: Not implemented yet
|
|
"""
|
|
streamClone( id: String!): Boolean!
|
|
"""
|
|
Grants permissions to an user on a given stream.
|
|
"""
|
|
streamGrantPermission( streamId: String!, userId: String!, role: String! ): Boolean
|
|
"""
|
|
Revokes the permissions of an user on a given stream.
|
|
"""
|
|
streamRevokePermission( streamId: String!, userId: String! ): Boolean
|
|
|
|
}
|
|
|
|
input StreamInput {
|
|
id: String
|
|
name: String
|
|
description: String
|
|
isPublic: Boolean
|
|
} |