Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (entityClass) {
const entity = new entityClass();
type = new GraphQLList(
schema.getType(entity.classId) ||
convertModelToType(
entity.classId,
{ type: "entity" },
entity.getAttributes(),
schema
)
);
}
}
if (attr instanceof attrs.DateAttribute) {
type = GraphQLString;
resolve = (entity: Entity) => {
const attribute = entity.getAttribute(attr.getName());
if (attribute) {
const value = attribute.getValue();
return value instanceof Date ? value.toISOString() : null;
}
};
}
if (attr instanceof PasswordAttribute) {
type = GraphQLString;
}
if (attr instanceof IdentityAttribute) {
type = schema.getType("IdentityType");