graphql-tools: Typescript errors after importing graphql-tools

Ever since using the graphql-tools package, my typescript compiler complains about graphql-tools specific things:

/myproject/node_modules/graphql-tools/dist/Interfaces.d.ts(1,25): error TS2305: Module ''graphql'' has no exported member 'GraphQLField'.
/myproject/node_modules/graphql-tools/dist/Interfaces.d.ts(1,69): error TS2305: Module ''graphql'' has no exported member 'GraphQLFieldResolver'.
/myproject/node_modules/graphql-tools/dist/Interfaces.d.ts(1,110): error TS2305: Module ''graphql'' has no exported member 'GraphQLTypeResolver'.
/myproject/node_modules/graphql-tools/dist/Interfaces.d.ts(10,18): error TS2315: Type 'GraphQLIsTypeOfFn' is not generic.
/myproject/node_modules/graphql-tools/dist/autopublish.d.ts(2,24): error TS2307: Cannot find module 'graphql-subscriptions'.
/myproject/node_modules/graphql-tools/dist/mock.d.ts(1,58): error TS2305: Module ''graphql'' has no exported member 'GraphQLFieldResolver'.
/myproject/node_modules/graphql-tools/dist/mock.d.ts(11,59): error TS2315: Type 'GraphQLList' is not generic.
/myproject/node_modules/graphql-tools/dist/schemaGenerator.d.ts(1,45): error TS2305: Module ''graphql'' has no exported member 'GraphQLFieldResolver'.

Here are the typings I currently use:

    "@types/bluebird": "^3.0.37",
    "@types/body-parser": "^0.0.33",
    "@types/express": "^4.0.34",
    "@types/express-jwt": "^0.0.33",
    "@types/graphql": "^0.8.6",
    "@types/jsonwebtoken": "^7.2.0",
    "@types/lodash": "^4.14.45",
    "@types/sequelize": "^4.0.39"

Im using Typescript 2.1.5 and graphql-tools 0.10.0

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 17 (14 by maintainers)

Most upvoted comments

Did you install @types/graphql? On Wed, 8 Feb 2017 at 2:01 stringbeans notifications@github.com wrote:

Ever since using the graphql-tools package, my typescript compiler complains about graphql-tools specific things:

/myproject/node_modules/graphql-tools/dist/Interfaces.d.ts(1,25): error TS2305: Module ‘‘graphql’’ has no exported member ‘GraphQLField’. /myproject/node_modules/graphql-tools/dist/Interfaces.d.ts(1,69): error TS2305: Module ‘‘graphql’’ has no exported member ‘GraphQLFieldResolver’. /myproject/node_modules/graphql-tools/dist/Interfaces.d.ts(1,110): error TS2305: Module ‘‘graphql’’ has no exported member ‘GraphQLTypeResolver’. /myproject/node_modules/graphql-tools/dist/Interfaces.d.ts(10,18): error TS2315: Type ‘GraphQLIsTypeOfFn’ is not generic. /myproject/node_modules/graphql-tools/dist/autopublish.d.ts(2,24): error TS2307: Cannot find module ‘graphql-subscriptions’. /myproject/node_modules/graphql-tools/dist/mock.d.ts(1,58): error TS2305: Module ‘‘graphql’’ has no exported member ‘GraphQLFieldResolver’. /myproject/node_modules/graphql-tools/dist/mock.d.ts(11,59): error TS2315: Type ‘GraphQLList’ is not generic. /myproject/node_modules/graphql-tools/dist/schemaGenerator.d.ts(1,45): error TS2305: Module ‘‘graphql’’ has no exported member ‘GraphQLFieldResolver’.

Here are the typings I currently use:

"@types/bluebird": "^3.0.37",
"@types/body-parser": "^0.0.33",
"@types/express": "^4.0.34",
"@types/express-jwt": "^0.0.33",
"@types/graphql": "^0.8.6",
"@types/jsonwebtoken": "^7.2.0",
"@types/lodash": "^4.14.45",
"@types/sequelize": "^4.0.39"

Im using Typescript 2.1.5 and graphql-tools 0.10.0

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/apollographql/graphql-tools/issues/272, or mute the thread https://github.com/notifications/unsubscribe-auth/ABB8W_DQs1lxvP7Kn9ILKgxKmZP27FKzks5raQXagaJpZM4L6NJ5 .