0
I have a Node.js express application that is serving an Apollo GraphQL API serving as a BFF for a React Application.
The project uses the latest graphql
npm package of 16.8.0
and it utilizes the graphql-contstraint-directive
package.
Now when I build my project — build script is "build": "tsc"
— it throws this error:
node_modules/graphql-constraint-directive/index.d.ts:3:32 - error TS2307: Cannot find module 'apollo-server-core' or its corresponding type declarations.
3 import {PluginDefinition} from "apollo-server-core";
~~~~~~~~~~~~~~~~~~~~
Found 1 error in node_modules/graphql-constraint-directive/index.d.ts:3
Looking at the latest package in Github here, it looks to be using the PluginDefinition
from apollo-server-core
which is deprecated. In addition, the package.json
file does not seem to add the apollo-server-core
as a dependency, which is strange. (refer here).
Has anybody run into this issue before ? If so, how did you solve it ? I guess I could try installing the deprecated apollo-server-package
but that does not seem right.
Any help is appreciacted.