Skip to content
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

Upgrading Apollo @apollo/server to > 4.7.2 or higher results in error in startServerAndCreateHandler method #47

Open
AndreBarnard opened this issue Jul 5, 2023 · 0 comments

Comments

@AndreBarnard
Copy link

When upgrading latest @apollo/server : 4.7.5 result in error below:

No overload matches this call.
Overload 1 of 2, '(server: ApolloServer, options?: AzureFunctionsMiddlewareOptions): AzureFunction', gave the following error.
Argument of type 'import("../node_modules/@apollo/server/dist/esm/ApolloServer", { assert: { "resolution-mode": "import" } }).ApolloServer<import("../node_modules/@apollo/server/dist/esm/externalTypes/context", { assert: { "resolution-mode": "impo...' is not assignable to parameter of type 'import("../node_modules/@apollo/server/dist/cjs/ApolloServer").ApolloServer<import("../node_modules/@apollo/server/dist/cjs/externalTypes/context").BaseContext>'.
Types have separate declarations of a private property 'internals'.
Overload 2 of 2, '(server: ApolloServer, options: WithRequired<AzureFunctionsMiddlewareOptions, "context">): AzureFunction', gave the following error.
Argument of type 'import("../node_modules/@apollo/server/dist/esm/ApolloServer", { assert: { "resolution-mode": "import" } }).ApolloServer<import("../node_modules/@apollo/server/dist/esm/externalTypes/context", { assert: { "resolution-mode": "impo...' is not assignable to parameter of type 'import("../node_modules/@apollo/server/dist/cjs/ApolloServer").ApolloServer<import("../node_modules/@apollo/server/dist/esm/externalTypes/context", { assert: { "resolution-mode": "import" } }).BaseContext>'.
Types have separate declarations of a private property 'internals'.

`const server = new ApolloServer({
schema,
introspection: !IS_PROD,
plugins: [ApolloServerPluginLandingPageDisabled()],
})

const apolloHandler = startServerAndCreateHandler(server, {
context: async ({ context }) => {
const resolvedContext = await resolveContext(context.req)
return {
...resolvedContext,
}
},
})`

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant