Skip to content

Commit

Permalink
fix: exclude GQL scalar types from the name validation of object and …
Browse files Browse the repository at this point in the history
…field metadata (#4467)
  • Loading branch information
abusarah-tech authored Mar 14, 2024
1 parent a02e11f commit e0dac82
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ export function IsValidName(validationOptions?: ValidationOptions) {
options: validationOptions,
validator: {
validate(value: any) {
return /^(?!(?:not|or|and)$)[^'\"\\;.=*/]+$/.test(value);
return /^(?!(?:not|or|and|Int|Float|Boolean|String|ID)$)[^'\"\\;.=*/]+$/.test(
value,
);
},
defaultMessage(args: ValidationArguments) {
return `${args.property} has failed the name validation check`;
Expand Down

0 comments on commit e0dac82

Please sign in to comment.