You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to run CLI coverage on TS codebase reports "Cannot use import statement outside a module" although TS is supported according to docs.
To Reproduce
$ graphql-inspector coverage src/gql/**/*.ts src/gql/schema.graphql
Error: Unable to load from file "/Users/wzoom/.../src/gql/dao/convertAppFromApi.test.ts": Cannot use import statement outside a module
at tryToLoadFromExport (/Users/wzoom/.config/yarn/global/node_modules/@graphql-tools/code-file-loader/index.cjs.js:143:15)
at async CodeFileLoader.load (/Users/wzoom/.config/yarn/global/node_modules/@graphql-tools/code-file-loader/index.cjs.js:230:32)
at async loadFile (/Users/wzoom/.config/yarn/global/node_modules/@graphql-tools/load/index.cjs.js:48:24)
at async /Users/wzoom/.config/yarn/global/node_modules/@graphql-tools/load/index.cjs.js:425:24
All the TS files use standard ES2015 import syntax:
e.g. import convertAppFromApi from './convertAppFromApi';
Expected behavior
The coverage should be shown, the script should not fail.
Describe the bug
Trying to run CLI coverage on TS codebase reports "Cannot use import statement outside a module" although TS is supported according to docs.
To Reproduce
All the TS files use standard ES2015 import syntax:
e.g.
import convertAppFromApi from './convertAppFromApi';
Expected behavior
The coverage should be shown, the script should not fail.
Environment:
@graphql-inspector/...
: 2.1.0graphql
: 15.3.0Additional context
Related Issue:
ardatan/graphql-tools#913
The text was updated successfully, but these errors were encountered: