From 736882ce612d37f773509686c74e3187a794cfcd Mon Sep 17 00:00:00 2001 From: Michal Kawka Date: Thu, 14 Nov 2024 17:22:04 +0100 Subject: [PATCH] add copy script --- backend/src/utilities/schemaLoader.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/src/utilities/schemaLoader.ts b/backend/src/utilities/schemaLoader.ts index df01751..cfcb234 100644 --- a/backend/src/utilities/schemaLoader.ts +++ b/backend/src/utilities/schemaLoader.ts @@ -1,4 +1,4 @@ -import {readFileSync, readdirSync, existsSync} from 'fs'; +import {existsSync, readdirSync, readFileSync} from 'fs'; import {join} from 'path'; import {logger} from './logger'; @@ -10,7 +10,8 @@ export interface SchemaSource { export class SchemaLoader { private schemaDirectory: string; - constructor(schemaDirectory: string = join(process.cwd(), 'src/graphql/')) { + // TODO it's supposed to be src/graphql for dev env + constructor(schemaDirectory: string = join(process.cwd(), 'dist/graphql/')) { this.schemaDirectory = process.env.SCHEMA_DIRECTORY || schemaDirectory; logger.startup('SchemaLoader initialized', { schemaDirectory: this.schemaDirectory,