13 lines
292 B
TypeScript
13 lines
292 B
TypeScript
import { makeWorkerUtils, WorkerUtils } from "graphile-worker";
|
|
|
|
let workerUtils: WorkerUtils;
|
|
|
|
export const getWorkerUtils = async () => {
|
|
if (!workerUtils) {
|
|
workerUtils = await makeWorkerUtils({
|
|
connectionString: process.env.DATABASE_URL,
|
|
});
|
|
}
|
|
|
|
return workerUtils;
|
|
};
|