fix: unable to use objectId size higher than 19 on GraphQL API (#7627)

This commit is contained in:
Antoine Cormouls
2021-11-27 12:27:08 +01:00
committed by GitHub
parent c789f6c979
commit ed86c80772
4 changed files with 35 additions and 10 deletions

View File

@@ -1807,7 +1807,13 @@ export class PostgresStorageAdapter implements StorageAdapter {
if (key === 'ACL') {
memo.push('_rperm');
memo.push('_wperm');
} else if (key.length > 0) {
} else if (
key.length > 0 &&
// Remove selected field not referenced in the schema
// Relation is not a column in postgres
// $score is a Parse special field and is also not a column
((schema.fields[key] && schema.fields[key].type !== 'Relation') || key === '$score')
) {
memo.push(key);
}
return memo;