Skip to content

Commit

Permalink
fix:call SchemaController.getAllClasses with wrong type parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
ThornWu committed Nov 4, 2021
1 parent 31960b5 commit c7c25eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/GraphQL/loaders/schemaQueries.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}));
Expand Down
2 changes: 1 addition & 1 deletion src/Routers/SchemasRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 } }));
}

Expand Down

0 comments on commit c7c25eb

Please sign in to comment.