Open
Description
New Issue Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest version of Parse Server.
Issue Description
When I was reading the source code, I found two mistakes when calling SchemaController.getAllClasses
.
getAllClasses
accepts a object with a key named clearCache
.
getAllClasses(options: LoadSchemaOptions = { clearCache: false })
But there are two places calling this function with a boolean value.
No.1
In src/Routers/SchemasRouter.js#L19
function getAllSchemas(req) {
return req.config.database
.loadSchema({ clearCache: true })
.then(schemaController => schemaController.getAllClasses(true)) // => #L19
.then(schemas => ({ response: { results: schemas } }));
}
No.2
In /src/GraphQL/loaders/schemaQueries.js#L63
const schema = await config.database.loadSchema({ clearCache: true });
return (await schema.getAllClasses(true)).map(parseClass => ({ // => #L63
name: parseClass.className,
schemaFields: transformToGraphQL(parseClass.fields),
}));
Environment
Server
- Parse Server version: 5.0.0-beta.1
Logs
n/a