I have a non monorepo nestJs graphql microservices app, and opted for Apollo federation gateway. I have an authentication server which works fine and sets cookies to header, only problem is when calls are made through apollo gateway set-cookie headers are not being set, and request headers cookies are not passed to microservices.
this is my gatewayModule
@Module({
imports: [
GraphQLModule.forRoot<ApolloGatewayDriverConfig>({
driver: ApolloGatewayDriver,
gateway: {
supergraphSdl: new IntrospectAndCompose({
subgraphs: [
{
name: 'users',
url: 'http://localhost:9999/graphql',
},
{
name: 'posts',
url: 'http://localhost:9119/graphql',
},
{
name: 'comments',
url: 'http://localhost:9229/graphql',
},
],
}),
},
}),
],
})