after installing graphql-yoga and it's deps, I get this error.
... /node_modules/graphql-yoga/dist/src/types.d.ts (7,37): Cannot find module 'graphql-subscriptions/dist/subscriptions-manager'.
I am using GraphQLServerLambda.
This error also appears on your examples/lambda-typescript/ install.
I checked the node_modules folder, and indeed there is no such module as graphql-subscriptions/dist/subscriptions-manager to be imported.
It's not breaking error, but annoying nonetheless :)
Thanks for reporting @jfcieslak. Can you check whether you can reproduce this with any of the example apps in this repo?
yes, the examples/lambda-typescript/ has the same error.
Would be great if someone could look into this! 馃檶
If that helps somebody, I had this error, too, but the application still was able to run. When trying something completely different, I ran yarn add graphql-subscriptions graphql and noticed that afterwards i was able to build again. For whatever reason ;)
@schickling I looked into this and figured that the graphql-subscriptions tags states that the last release is 0.5.6. Unfortunately, a npm view graphql-subscriptions indicates that 0.5.7 has been released on February, 12th 馃槩
'0.5.6': '2017-12-18T16:35:17.197Z',
'0.5.7': '2018-02-12T11:01:14.900Z'
The type definition changed in this release. A workaround would be to pin the version of graphql-subscriptions in graphql-yoga to 0.5.6, but this feels also: meh :( What do you think?
Let's wait until Apollo has released a new version which should fix this problem. Thanks for investigating @akoenig!
@schickling According to https://github.com/apollographql/graphql-subscriptions/issues/138#issuecomment-367659256, the inclusion of the subscription manager was a mistake in the 0.5.x line - Therefore, we have to rewrite the part here: https://github.com/graphcool/graphql-yoga/blob/745991ee2ae7e124860dbea74a07f577864fb207/src/types.ts#L12 and adjust the ContextParameters. For me, this seems like a major rewrite. What is your take on that? :)
This should be fixed in 1.3.4. Please let us know if this is still a problem.
Thanks a lot @akoenig for digging into this. 馃檹
I tested it right now and it works 鉂わ笍
@schickling Ahh, seems like I was riding the wrong train. Seems like a minor fix now. 馃槃
Fixed for me as well. Thanks :)
Most helpful comment
I tested it right now and it works 鉂わ笍