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
Koa: Cannot read property 'body' of undefined #84
Comments
Which version are you using? Currently we only support v2. |
@HriBB Thank you, I just upgraded to koa 2 and it all works. It would be useful if this was mentioned in the documentation. |
@voodooattack great to hear that! But you were lucky to be able to switch to v2 easily, other users might not have that option, if their entire app is already built around v1. It would be cool if we supported both versions and threw an error if user used the wrong version. The syntax from v1 to v2 changed only slightly, and I suspect that it should be possible to detect version and adjust @helfer what do you think about this? How should we approach this if we decide to support koa v1? |
@HriBB If you can make it work for both versions, that would be great! Even if the export is different, that's fine as long as the code is mostly shared. I'd say go for it! |
Tested this locally for those on Koa 1.x - koa-convert has a convert.back() method that makes this work just fine with koa 1.x |
When I use apolloKoa with koa-router like this:
I get the following error:
package.json:
The text was updated successfully, but these errors were encountered: