Skip to content

Commit

Permalink
fix: use __dirname to apropriately load graphql files
Browse files Browse the repository at this point in the history
  • Loading branch information
icazevedo committed Dec 28, 2023
1 parent e973e75 commit 63c9c5d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/api/src/typeDefs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')

0 comments on commit 63c9c5d

Please sign in to comment.