ardatan / graphql-import-node

Import 'graphql' files in NodeJS
80 stars 14 forks source link

Module could not be found from *.gql #2

Closed Kisepro closed 5 years ago

Kisepro commented 5 years ago

Hello,

Did someone made it work on IOS using javascript ( not ts as in the example)? I get the classical error message :

 Unable to resolve module `./myQuery.gql` from `/Users/naruto/Documents/TestProject/src/components/MyCompA.js`: The module `./myQuery.gql` could not be found from `/Users/naruto/Documents/TestProject/src/components/MyCompA.js`. Indeed, none of these files exist:
   * `/Users/naruto/Documents/TestProject/src/components/myQuery.gql(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)`

"dependencies": { "graphql-import-node": "0.0.1", "react": "16.6.1", "react-native": "0.57.5" }, "devDependencies": { "babel-jest": "23.6.0", "jest": "23.6.0", "metro-react-native-babel-preset": "0.49.2", "react-test-renderer": "16.6.1" },

ardatan commented 5 years ago

This pluginis to load GraphQL files on NodeJS application. So, it is not about being iOS, and this plugin cannot be used to manipulate bundler's module system. You should try babel plugins for that.