-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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] isLabelSyncedWithName should be nullable #9028
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
Makes the isLabelSyncedWithName
field nullable in both server-side DTOs and generated GraphQL types to fix inconsistencies in field optionality.
- Modified
@Field
decorator in/packages/twenty-server/src/engine/metadata-modules/field-metadata/dtos/field-metadata.dto.ts
to include{ nullable: true }
- Updated generated types in
/packages/twenty-front/src/generated-metadata/graphql.ts
to reflect nullable boolean field - Change aligns with existing
@IsOptional()
decorator and TypeScript optional modifier
2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile
@@ -147,7 +147,7 @@ export class FieldMetadataDTO< | |||
|
|||
@IsBoolean() | |||
@IsOptional() | |||
@Field() | |||
@Field({ nullable: true }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is nullable in the input but non-null in db, as it is for objectMetadata. I really need to double check but I think we want to allow null values in the input that we backfill in the service
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
const response = await makeMetadataAPIRequest(graphqlOperation); | ||
|
||
// Assert | ||
console.log( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are those logs intended?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oopsie !
isLabelSyncedWithName should be nullable for fieldMetadata, as it is for objectMetadata.