fetchAllModels.ts 277 Bytes
import { Context } from "../";
import Model from "entity/Model";

export default async (root: {}, { id }, context: Context) => {
  const { connection } = context;
  const modelRepo = connection.getRepository(Model);
  const models = await modelRepo.find();
  return models;
};