Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (f.name.value === field.name.value) {
const updated = makeModelConnectionField(field.name.value, returnType.name.value, sortKeyInfo)
updated.directives = f.directives
return updated
}
return f;
}
)
const updatedType = {
...type,
fields: newFields
}
ctx.putType(updatedType)
if (!this.typeExist('ModelSortDirection', ctx)) {
const modelSortDirection = makeModelSortDirectionEnumObject()
ctx.addEnum(modelSortDirection)
}
this.generateFilterAndKeyConditionInputs(ctx, returnType, sortKeyInfo)
} else {
throw new InvalidDirectiveError(`Could not find a object or interface type named ${parent.name.value}.`)
}
}
if (f.name.value === field.name.value) {
const updated = makeModelConnectionField(field.name.value, returnType.name.value, sortKeyInfo)
updated.directives = f.directives
return updated
}
return f;
}
)
const updatedType = {
...type,
fields: newFields
}
ctx.putType(updatedType)
if (!this.typeExist('ModelSortDirection', ctx)) {
const modelSortDirection = makeModelSortDirectionEnumObject()
ctx.addEnum(modelSortDirection)
}
this.generateFilterAndKeyConditionInputs(ctx, returnType, sortKeyInfo)
} else {
throw new InvalidDirectiveError(`Could not find a object or interface type named ${parent.name.value}.`)
}
}