Closed dkvilo closed 4 years ago
Any updates?
I was able to get around this by using an absolute path with path.join(__dirname, 'schema.graphql'). My directory doesn't look exactly like yours but hopefully switching to absolute path fixes problem for now
I was able to get around this by using an absolute path with path.join(__dirname, 'schema.graphql'). My directory doesn't look exactly like yours but hopefully switching to absolute path fixes problem for now
Hello, Yes, I tried this approach before submitting the issue but wasn't working with my dir structure. finally, I end up with coping the .graphql files to the dist folder.
"build": "babel src -d vendor && ncp src/graphql/schema.graphql vendor/graphql/schema.graphql"
@ChrisFieldsII's solution worked well here. Thks!
When you run graphql-import
from your dist/
directory, it throws that error because you don't have those graphql files in your dist/
directory.
What you need to do is to move graphql files as suggested above.
if you are using babel-node or babel CLI to build the source and you have the following folder structure error occurs
Works fine for following