-
|
I upgraded:
v3.0.0 CHANGELOG indicates:
However, after upgrading, the Anyone else run into this? I think it's a types issue. Edit: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
|
Ah, I see what's happening here. I think this does work at the JS level but not at the TS level. The base ApolloServer class from apollo-server-core declares that its However, starting with Apollo Server 3, I think we can fix this though! Lemme give it a quick shot. |
Beta Was this translation helpful? Give feedback.

Ah, I see what's happening here. I think this does work at the JS level but not at the TS level.
The base ApolloServer class from apollo-server-core declares that its
contextfunction takes a loosely typed argument (any). The ApolloServer class in apollo-server-express overrides the constructor just to note that itscontextfunction takes a well-typed argument (andapollo-serverwhich is built onapollo-server-expressuses the same typing). The other random integrations keep the loosely typed base declaration.However, starting with Apollo Server 3,
apollo-server-lambda(andapollo-server-cloud-functions) inherit fromapollo-server-express, so they get the Express constructor's typing, wh…