feat: image upload / display

This commit is contained in:
Nick
2019-05-21 16:45:27 -04:00
parent 10a3727604
commit 35bc745826
14 changed files with 297 additions and 47 deletions

View File

@@ -16,9 +16,13 @@ extend type Mutation {
type AssetQuery {
list(
root: String
kind: AssetKind
folderId: Int!
kind: AssetKind!
): [AssetItem] @auth(requires: ["manage:system", "read:assets"])
folders(
parentFolderId: Int!
): [AssetFolder] @auth(requires: ["manage:system", "read:assets"])
}
# -----------------------------------------------
@@ -26,9 +30,11 @@ type AssetQuery {
# -----------------------------------------------
type AssetMutation {
upload(
data: Upload!
): DefaultResponse
createFolder(
parentFolderId: Int!
slug: String!
name: String
): DefaultResponse @auth(requires: ["manage:system", "write:assets"])
}
# -----------------------------------------------
@@ -51,6 +57,8 @@ type AssetItem {
type AssetFolder {
id: Int!
slug: String!
name: String
}
enum AssetKind {