From c7c25eb826238666b5345646ce5c8cbe8bd2fbb9 Mon Sep 17 00:00:00 2001 From: ThornWu Date: Thu, 4 Nov 2021 20:20:54 +0800 Subject: [PATCH] fix:call SchemaController.getAllClasses with wrong type parameter --- src/GraphQL/loaders/schemaQueries.js | 2 +- src/Routers/SchemasRouter.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GraphQL/loaders/schemaQueries.js b/src/GraphQL/loaders/schemaQueries.js index 25bc071919e..6c3ac005396 100644 --- a/src/GraphQL/loaders/schemaQueries.js +++ b/src/GraphQL/loaders/schemaQueries.js @@ -60,7 +60,7 @@ const load = parseGraphQLSchema => { enforceMasterKeyAccess(auth); const schema = await config.database.loadSchema({ clearCache: true }); - return (await schema.getAllClasses(true)).map(parseClass => ({ + return (await schema.getAllClasses({ clearCache: true })).map(parseClass => ({ name: parseClass.className, schemaFields: transformToGraphQL(parseClass.fields), })); diff --git a/src/Routers/SchemasRouter.js b/src/Routers/SchemasRouter.js index 54f73ceacc5..1b72b93a687 100644 --- a/src/Routers/SchemasRouter.js +++ b/src/Routers/SchemasRouter.js @@ -16,7 +16,7 @@ function classNameMismatchResponse(bodyClass, pathClass) { function getAllSchemas(req) { return req.config.database .loadSchema({ clearCache: true }) - .then(schemaController => schemaController.getAllClasses(true)) + .then(schemaController => schemaController.getAllClasses({ clearCache: true })) .then(schemas => ({ response: { results: schemas } })); }