-
Notifications
You must be signed in to change notification settings - Fork 2k
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
cacheControl type issues #3339
Comments
was an issue from having two different versions of |
What worked for me was to remove |
I switched to Yarn for this issue, as Yarn flattens dependencies by default, and NPM doesn't. I had some mismatch between 0.8.8 from apollo-express, and 1.1.x or something from apollo-server-testing. |
I faced the same issue while I was working on NestJS and GraphQL. But I fixed it. You can fix it by following these steps.
Note: |
@mjraadi @umarnaeem432 having the same issue. Didn't help doing that. :( But having only one dependency of it. |
@umarnaeem432 that fixed my issue as well, ty |
I tried to simply upgrade I had to That fixed the issue for me :) |
So TypeScript supports module augmentation and interface merging. It claims that:
But for some reason it thinks the additions to GraphQLResolveInfo in apollo-cache-control are not "the same type". I'm not sure if this is a TS bug or there's some good reason for this. When using prereleases of npm modules, it's a lot easier to end up with two versions of a module in your I don't feel great about this suggestion, but one thing that does work (if you're pretty sure that the prerelease of
to your app's tsconfig.json. ie, to tell it only to read the top-level ACC module no matter what. Not a compelling answer but it is working for my own app testing! |
As a note, as of Apollo Server 3 this code now lives in (edit: we may be moving it to |
My solution was make update to |
Yep, you want to use the same versions of |
So, use these commands and everything is OK:
|
I faced the same error. Enviroment
Solutioninstall apollo-server-plugin-response-cache package. I honestly don't know why the error is resolved, but I'll share the solution anyway. |
In Apollo Server 4 (which is in Release Candidate now and should have the final release in a week or two) we've completely stopped using the |
Using
"apollo-server-testing": "^2.9.4",
as a dependency in our project for graphql testing. When i try to build our Typescript project get the following errorboth the types seem same to me so not sure what's the issue that TS is having? :/
The text was updated successfully, but these errors were encountered: