Add mutation/resolver for multi file upload
This commit is contained in:
parent
e2420c2a63
commit
54b686fda3
@ -8,6 +8,10 @@ export default {
|
|||||||
singleUpload (root, {file}) {
|
singleUpload (root, {file}) {
|
||||||
console.log('Uploaded file:', file)
|
console.log('Uploaded file:', file)
|
||||||
return file
|
return file
|
||||||
|
},
|
||||||
|
multiUpload (root, {files}) {
|
||||||
|
console.log('Uploaded files:', files)
|
||||||
|
return files
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,4 +19,5 @@ type Query {
|
|||||||
|
|
||||||
type Mutation {
|
type Mutation {
|
||||||
singleUpload (file: Upload!): File!
|
singleUpload (file: Upload!): File!
|
||||||
|
multiUpload (files: [Upload!]): [File!]
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user