-
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
Error in typescript definitions using hapi server #3132
Comments
Changing to |
@markgreenwood Thanks for your input. I actually missed the deprecation of the |
Just as a note to those following along: A partial solution to this update started in #3089 but we reverted it in #3111. This is not just an update to a new package namespace, but also a necessity to update from Hapi 17 to Hapi 18 (AS2 currently uses Hapi 17). Another attempt in #3217 made similar updates, but the semver incompatibility of the update remains the same. 😭 See my comment in #3217 (comment) which hopefully points toward a better future approach here, but right now we can't land this without a major version bump. I certainly don't feel great that this tight version pairing has been and continues to be restrictive. We'll make this better — and we're going to need some time to get Apollo Server 3.x out the door — but for now, this is the (not so Hapi) state of affairs. |
So for projects wanting to use |
Add your own typings though tsconfig, and declare the hapi module.
|
My suspicion is that we fixed this in Apollo Server 3 when we upgraded Hapi a long way. That said, Apollo Server 4 replaces a hard-coded set of web framework integrations with a simple stable API for building integrations. As part of this, the core project no longer directly supports a Hapi integration. It should not be that hard for excited Hapi users to build and maintain a Hapi integration, and our guess is they will do a better job of it than the Apollo Server core team, who did not use Hapi at all other than to maintain the integration. There is not a Hapi integration at this time, but some interest has been expressed over at #6028. Sorry for the delay! |
Error
Reproducible, when using
import { ApolloServer } from 'apollo-server-hapi';
Used versions
hapi v18.1.9
@types/hapi v18.0.2
apollo-server-hapi v2.8.1
NodeJS v12.7.0
tsc v3.5.3
The text was updated successfully, but these errors were encountered: