slicknode/graphql-query-complexity

Invalid module name in augmentation...Module 'graphql/type/definition' resolves to an untyped module

vjpr opened this issue · 2 comments

vjpr commented
node_modules/.registry.npmjs.org/graphql-query-complexity/0.2.2/graphql@14.0.2/node_modules/graphql-query-complexity/dist/QueryComplexity.d.ts:6:16 - error TS2665: Invalid module name in augmentation. Module 'graphql/type/definition' resolves to an untyped module at '/xxx/node_modules/.registry.npmjs.org/graphql/14.0.2/node_modules/graphql/type/definition.js', which cannot be augmented.

6 declare module 'graphql/type/definition' {
                 ~~~~~~~~~~~~~~~~~~~~~~~~~

Maybe this helps: https://stackoverflow.com/a/42522751/130910

Hello!

The fix for the problem is to install @type/graphql.

However, I realized that the latest versions of @ types / graphql completely removed the type definitions, which became part of the graphql package.
If you download the most current version you will see that it is empty and contains no definition.
Then install the version:

npm install@types/graphql@14.2.3

Hope this helps.

ivome commented

With the removal of the fieldConfigEstimator this type augmentation is obsolete and is now removed...