# Apollo Federation 2 Supergraph 组合配置(开发态 - host 模式) # # 用于本地开发:应用服务跑在 host 上,apollo-router 在 Docker 容器内, # 通过 host.docker.internal 访问 host 上的子图 /graphql 端点。 # # 使用:docker run --add-host=host.docker.internal:host-gateway ... # # 与 supergraph.yaml 的差异:routing_url 从容器内服务名改为 host.docker.internal # # 当前可用子图(5 个 TS 服务): # - iam (3002): 用户/RBAC/JWT # - core-edu (3004): 作业/考试/成绩/考勤 # - content (3005): 内容管理 # - msg (3007): 消息 # - config (3011): 插件配置中心(portal-shell 主要数据源) # # 暂不包含的子图: # - classes (3001): 无 GraphQL 模块(仅 REST + gRPC) # - data-ana (3006): Python 服务,无 Federation 子图 # - ai (3008): Python 服务,无 Federation 子图 federation_version: =2.9.0 subgraphs: iam: routing_url: http://host.docker.internal:3002/graphql schema: subgraph_url: http://host.docker.internal:3002/graphql core-edu: routing_url: http://host.docker.internal:3004/graphql schema: subgraph_url: http://host.docker.internal:3004/graphql content: routing_url: http://host.docker.internal:3005/graphql schema: subgraph_url: http://host.docker.internal:3005/graphql msg: routing_url: http://host.docker.internal:3007/graphql schema: subgraph_url: http://host.docker.internal:3007/graphql config: routing_url: http://host.docker.internal:3011/graphql schema: subgraph_url: http://host.docker.internal:3011/graphql