Is it possible to define an array of operations to...
# prisma-whats-new
l
Is it possible to define an array of operations to use on an
operationBefore
function? E.g:
Copy code
handleUpload:
    type: operationBefore
    operation: Account.update # also on Account.create?
    handler:
      code:
        src: './src/handleUpload.js'
h
you can define it for every operation
with same handler
l
Copy code
handleUpload:
    type: operationBefore
    operation: Account.update
    operation: Account.create
    handler:
      code:
        src: './src/handleUpload.js'
like that?
h
Copy code
handleUploadCreate:
    type: operationBefore
    operation: Account.create
    handler:
      code:
        src: './src/handleUpload.js
 handleUploadUpdate:
type: operationBefore
operation: Account.update
handler:
code:
src: './src/handleUpload.js
l
thanks for the solution! was hoping that there’d be some way to prevent code duplication but this will do. cheers 🙂
h
In 1.0 functions are gone
m
Hey thanks for the help. Can you point us to any helpful information about the 1.0 release?
h
m
Will we be able to deploy our project to the Graphcool platform?
h
you can already deploy to beta