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

This commit is contained in:
Manuel
2021-11-27 13:36:49 +01:00
committed by GitHub
parent 2923833b25
commit 8ee0445c0a
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;