Giter Club home page Giter Club logo

Comments (5)

HriBB avatar HriBB commented on April 19, 2024

Which version are you using? Currently we only support v2.

from apollo-server.

voodooattack avatar voodooattack commented on April 19, 2024

@HriBB Thank you, I just upgraded to koa 2 and it all works. It would be useful if this was mentioned in the documentation.

from apollo-server.

HriBB avatar HriBB commented on April 19, 2024

@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 apolloKoa() or simply provide apolloKoa() and apolloKoa2().

@helfer what do you think about this? How should we approach this if we decide to support koa v1?

from apollo-server.

helfer avatar helfer commented on April 19, 2024

@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!

from apollo-server.

cvburgess avatar cvburgess commented on April 19, 2024

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

from apollo-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.