From 5aba8e4a65e28a7b4ced0af39d9103f513fbcc89 Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Tue, 8 Nov 2022 14:31:36 +0000 Subject: [PATCH 1/2] Added readable prop to aggregate function --- packages/server/src/integrations/mongodb.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/server/src/integrations/mongodb.ts b/packages/server/src/integrations/mongodb.ts index d7709a08c7..9ccefbda58 100644 --- a/packages/server/src/integrations/mongodb.ts +++ b/packages/server/src/integrations/mongodb.ts @@ -58,6 +58,7 @@ const SCHEMA: Integration = { }, aggregate: { type: QueryType.JSON, + readable: true, steps: [ { key: "$addFields", From be32ef1cb6819aae1606aabd504a8019dd7e26e6 Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Thu, 10 Nov 2022 14:23:22 +0000 Subject: [PATCH 2/2] Add readable flag to datasource validation --- packages/backend-core/src/plugin/utils.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/backend-core/src/plugin/utils.js b/packages/backend-core/src/plugin/utils.js index 60a40f3a76..b943747483 100644 --- a/packages/backend-core/src/plugin/utils.js +++ b/packages/backend-core/src/plugin/utils.js @@ -51,6 +51,7 @@ function validateDatasource(schema) { const queryValidator = joi .object({ type: joi.string().allow(...Object.values(QueryType)), + readable: joi.boolean(), fields: joi.object().pattern(joi.string(), fieldValidator), }) .required()