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
import { AzureFunction, Context, HttpRequest } from "@azure/functions";
import { ApolloServer } from "apollo-server-azure-functions";
import { ApolloGateway } from "@apollo/gateway";
import { ApolloServerPluginLandingPageGraphQLPlayground } from 'apollo-server-core';
const startApollo = () => {
let handler: AzureFunction | undefined;
const init = async () => {
const gateway = new ApolloGateway({
serviceList: [
{ name: 'subgraph-api', url: 'https://localhost:7071/api/graphql' }
]
});
const { schema, executor } = await gateway.load();
const server = new ApolloServer({ schema, executor: executor as any, plugins: [ApolloServerPluginLandingPageGraphQLPlayground]});
handler = server.createHandler()
console.log("Apollo server started.");
};
init();
return (context: Context, req: HttpRequest) => {
if (handler) handler(context, req);
};
};
exports.graphqlHandler = startApollo();
ApolloServer class in @apollo/server v4 does not support above constructor param executor. Also createHandler() not present. Please help.
The text was updated successfully, but these errors were encountered:
mdv27
changed the title
Unable to switch existing apollo federation gateway with apollo-server-integration-azure-functions
Unable to switch existing apollo federation gateway supporting azure function with apollo-server-integration-azure-functions
Mar 9, 2023
Existing function
ApolloServer
class in @apollo/server v4 does not support above constructor paramexecutor
. AlsocreateHandler()
not present. Please help.The text was updated successfully, but these errors were encountered: