babel-plugin-import-graphql icon indicating copy to clipboard operation
babel-plugin-import-graphql copied to clipboard

Fails when importing graphql files from node_modules

Open GiancarlosIO opened this issue 2 years ago • 0 comments

When I try to import a graphql from a library, it gives the following error:

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined

The import that gives the error is something like:

import MY_QUERY from '@my-lib/web/graphql/myQuery.graphql';

Is this a bug or a limitation? If it's the latter it would be good to have it documented in the readme.

Thanks!

GiancarlosIO avatar Mar 24 '22 16:03 GiancarlosIO