diff --git a/client/coral-admin/src/graphql/queries/index.js b/client/coral-admin/src/graphql/queries/index.js index c251e5759..64bf096ba 100644 --- a/client/coral-admin/src/graphql/queries/index.js +++ b/client/coral-admin/src/graphql/queries/index.js @@ -63,15 +63,13 @@ export const loadMore = (fetchMore) => ({limit, cursor, sort, tab, asset_id}) => asset_id }, updateQuery: (oldData, {fetchMoreResult:{comments}}) => { - const updatedData = { + return { ...oldData, [tab]: [ ...oldData[tab], ...comments ] }; - - return updatedData; } }); };