You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Type 'Promise<{ my_apolloServer: ApolloServer; my_httpServer: Server<typeof IncomingMessage, typeof ServerResponse>; }>' is not assignable to type 'Promise<{ apolloServer: ApolloServer; httpServer: Server<typeof IncomingMessage, typeof ServerResponse>; }>'.
Type '{ my_apolloServer: ApolloServer; my_httpServer: http.Server<typeof http.IncomingMessage, typeof http.ServerResponse>; }' is not assignable to type '{ my_apolloServer: ApolloServer; my_httpServer: Server<typeof IncomingMessage, typeof ServerResponse>; }'.
Types of property 'my_apolloServer' are incompatible.
Type 'ApolloServer' is not assignable to type 'ApolloServer'.
Type 'BaseContext' is missing the following properties from type 'ExpressContext': req, rests(2322)
const my_server_instance: Promise<{
my_apolloServer: ApolloServer;
my_httpServer: http.Server;
}>
I wanted to upgrade Apolloserver from ver3 to ver 4. Following documentation:
Two types in apollo-server-express now have more explicit names exported from @apollo/server/express4. GetMiddlewareOptions is now ExpressMiddlewareOptions and ExpressContext is now ExpressContextFunctionArgument. Ref: https://www.apollographql.com/docs/apollo-server/migration/
It looks like your types are incompatible based on the error:
Type 'Promise<{ my_apolloServer: ApolloServer; my_httpServer: Server<typeof IncomingMessage, typeof ServerResponse>; }>' is not assignable to type 'Promise<{ apolloServer: ApolloServer; httpServer: Server<typeof IncomingMessage, typeof ServerResponse>; }>'.
The my_ prefix you're using is incompatible. Can you provide a reproduction or a code snippet at the very least?
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
For general questions, we recommend using StackOverflow or our discord server.
Issue Description
Type 'Promise<{ my_apolloServer: ApolloServer; my_httpServer: Server<typeof IncomingMessage, typeof ServerResponse>; }>' is not assignable to type 'Promise<{ apolloServer: ApolloServer; httpServer: Server<typeof IncomingMessage, typeof ServerResponse>; }>'.
Type '{ my_apolloServer: ApolloServer; my_httpServer: http.Server<typeof http.IncomingMessage, typeof http.ServerResponse>; }' is not assignable to type '{ my_apolloServer: ApolloServer; my_httpServer: Server<typeof IncomingMessage, typeof ServerResponse>; }'.
Types of property 'my_apolloServer' are incompatible.
Type 'ApolloServer' is not assignable to type 'ApolloServer'.
Type 'BaseContext' is missing the following properties from type 'ExpressContext': req, rests(2322)
const my_server_instance: Promise<{
my_apolloServer: ApolloServer;
my_httpServer: http.Server;
}>
I wanted to upgrade Apolloserver from ver3 to ver 4. Following documentation:
Two types in apollo-server-express now have more explicit names exported from @apollo/server/express4. GetMiddlewareOptions is now ExpressMiddlewareOptions and ExpressContext is now ExpressContextFunctionArgument. Ref: https://www.apollographql.com/docs/apollo-server/migration/
Link to Reproduction
https://www.apollographql.com/docs/apollo-server/migration/
Reproduction Steps
No response
The text was updated successfully, but these errors were encountered: