From b6506de90beb5c41ca7358ee1a0eb81a963c2ca3 Mon Sep 17 00:00:00 2001 From: Antoine Cormouls Date: Mon, 23 Mar 2020 09:58:23 +0100 Subject: [PATCH] Fix (#6507) --- src/GraphQL/transformers/mutation.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GraphQL/transformers/mutation.js b/src/GraphQL/transformers/mutation.js index 3bb05e24..7ce48ffa 100644 --- a/src/GraphQL/transformers/mutation.js +++ b/src/GraphQL/transformers/mutation.js @@ -75,9 +75,9 @@ const transformers = { file: async ({ file, upload }, { config }) => { if (upload) { const { fileInfo } = await handleUpload(upload, config); - return { name: fileInfo.name, __type: 'File' }; + return { ...fileInfo, __type: 'File' }; } else if (file && file.name) { - return { name: file.name, __type: 'File' }; + return { name: file.name, __type: 'File', url: file.url }; } throw new Parse.Error(Parse.Error.FILE_SAVE_ERROR, 'Invalid file upload.'); },