Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private addOwner(ctx: TransformerContext, parent: string) {
const modelType: any = ctx.getType(parent);
const fields = getFieldArguments(modelType);
if (!("owner" in fields)) {
modelType.fields.push(
makeField(
DEFAULT_OWNER_FIELD,
[],
makeNamedType('String'),
)
)
}
ctx.putType(modelType);
}