Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: many fields in an object #10061

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

fix: many fields in an object #10061

wants to merge 1 commit into from

Conversation

magrinj
Copy link
Member

@magrinj magrinj commented Feb 6, 2025

No description provided.

@@ -135,7 +135,7 @@
},
"graphql:generate": {
"executor": "nx:run-commands",
"defaultConfiguration": "data",
"defaultConfiguration": "metadata",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we change this we probably want to update the doc?

@@ -884,7 +887,7 @@ export class FieldMetadataService extends TypeOrmQueryService<FieldMetadataEntit
("fieldMetadataId", "position", "isVisible", "size", "viewId")
VALUES ('${createdFieldMetadata.id}', '${
lastPosition + 1
}', true, 180, '${view[0].id}')`,
}', ${isVisible}, 180, '${view[0].id}')`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

User can still manually add more than 30 fields in view right? I don't see any error message to prevent that. Maybe I'm missing the root cause of this issue and this is not needed!

@@ -862,6 +863,8 @@ export class FieldMetadataService extends TypeOrmQueryService<FieldMetadataEntit
`SELECT * FROM ${dataSourceMetadata.schema}."viewField"
WHERE "viewId" = '${view[0].id}'`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised we just take the first view randomly here, seems a bit random? I would have assumed the index view was updated if it was just one? (or the first by position?). Again maybe I'm missing context

import { isDeeplyEqual } from '~/utils/isDeeplyEqual';

export const MAXIMUM_FIELDS_PER_OBJECT = 2000;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't enforce those limits on the backend instead?

Copy link
Member

@FelixMalfait FelixMalfait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Sorry a few questions which might not all be relevant but I stumbled upon this and got curious!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants