Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public static createChangeNullabilityPlugin(
typeName: string,
fieldName: string,
isNullable: boolean,
) {
if (!typeName || !fieldName) {
throw new Error('typeName and fieldName are required for ChangeNullability');
}
typeName = typeName.trim();
fieldName = fieldName.trim();
return makeChangeNullabilityPlugin({
[typeName]: {
[fieldName]: isNullable,
},
});
}