14 lines
292 B
TypeScript
14 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;
|
||
|
|
};
|