-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using within typescript project #1
Comments
After doing some more investigation, I found that the problem isn't in using Apollo Server nor in ts-node, but how graphql module is included in the project. In your module package.json, the graphql module is defined as dependency. My project also has graphql module as dependency and creators of graphql stated that there should be only one graphql module per project. After removing graphql module from your package's node_modules, everything works. So I recommend that you change graphql moduledependency to peerDependency. |
Thanks for reporting and investigating the issue. I just released a new version with that change. Could you check if that solved the problem? |
Yes it is solved. Thank you! |
Thank you for this awesome package, which I'm sure it'll become an important part in every graphql server written in Javascript.
I have a graphql server based on Apollo Server and the whole project is written in TypeScript. For running the server I use ts-node.
The problem I have is when I make a query, I always get 'Query Complexity of 0'. Then I made a custom Typescript module to where I copied the
graph-query-complexity
code with small modifications regarding only the type definitions. With this module, the Query Complexity is calculated as it should.I'm not sure if this is a problem of the package or the fact that I'm using Typescript with ts-node.
Any help would be more than welcome.
The text was updated successfully, but these errors were encountered: