From 63c9c5d311d7efd7c91f1694950c882671e40160 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=8Dcaro=20Azevedo?= Date: Thu, 28 Dec 2023 16:46:01 -0300 Subject: [PATCH] fix: use __dirname to apropriately load graphql files --- packages/api/src/typeDefs/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/api/src/typeDefs/index.ts b/packages/api/src/typeDefs/index.ts index df688d4b09..e39deecb03 100644 --- a/packages/api/src/typeDefs/index.ts +++ b/packages/api/src/typeDefs/index.ts @@ -2,7 +2,6 @@ import { print } from 'graphql' import { loadFilesSync } from '@graphql-tools/load-files' -// Empty string ('') is interpreted as the current dir. Referencing it as './' won't work. -export const typeDefs = loadFilesSync('', { extensions: ['.graphql'] }) +export const typeDefs = loadFilesSync(__dirname, { extensions: ['.graphql'] }) .map(print) .join('\n')