设计 portal-shell 数据抽象层与 GraphQL 安全加固方案: - 4 层数据访问分层(Widget -> API -> Operations -> Hook) - 31 个 widget 全量迁移到 lib/api/ 抽象层 - graphql-codegen 集成,消除手写类型 - Apollo Router 持久化查询(APQ + manifest)防查询探测 - 深度/复杂度限制(max_depth=10, max_cost=1000) - 8 个子图字段级 @auth 审计与补齐 关联:portal-shell spec v2.1、004 §16、project_rules §3.8/§4