fetchAllOrgs.ts 263 Bytes
import { Context } from "../";
import Org from "entity/Org";

export default async (root: {}, { id }, context: Context) => {
  const { connection } = context;
  const orgRepo = connection.getRepository(Org);
  const orgs = await orgRepo.find();
  return orgs;
};