Main App imports
imports: [
GraphQLModule.forRoot<ApolloGatewayDriverConfig>({
driver: ApolloGatewayDriver,
gateway: {
supergraphSdl: new IntrospectAndCompose({
subgraphs: [
{ name: 'users', url: 'http://localhost:3331/graphql' },
{ name: 'homes', url: 'http://localhost:3332/graphql' },
],
}),
},
}),
],`
2 sub app config
imports: [
GraphQLModule.forRoot<ApolloFederationDriverConfig>({
driver: ApolloFederationDriver,
autoSchemaFile: {
federation: 2,
},
}),
]
It gives this error
couldn't load service definitions for "homes" at http://localhost:3332/graphql: 400: Bad Request at somelse\estate\node_modules@apollo\gateway\src\supergraphManagers\IntrospectAndCompose\loadServicesFromRemoteEndpoint.ts:77:15
at processTicksAndRejections (node:internal/process/task_queues:95:5) at async Promise.all (index 1)
I need help to solve this or any better way to do it.