123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- # ===============================================
- # ASSETS
- # ===============================================
- extend type Query {
- assets: AssetQuery
- }
- extend type Mutation {
- assets: AssetMutation
- }
- # -----------------------------------------------
- # QUERIES
- # -----------------------------------------------
- type AssetQuery {
- list(
- root: String
- kind: AssetKind
- ): [AssetItem] @auth(requires: ["manage:system", "read:assets"])
- }
- # -----------------------------------------------
- # MUTATIONS
- # -----------------------------------------------
- type AssetMutation {
- upload(
- data: Upload!
- ): DefaultResponse
- }
- # -----------------------------------------------
- # TYPES
- # -----------------------------------------------
- type AssetItem {
- id: Int!
- filename: String!
- ext: String!
- kind: AssetKind!
- mime: String!
- fileSize: Int!
- metadata: String
- createdAt: Date!
- updatedAt: Date!
- folder: AssetFolder
- author: User
- }
- type AssetFolder {
- id: Int!
- }
- enum AssetKind {
- IMAGE
- BINARY
- ALL
- }
|