feat(admin-portal): 完整实现 admin-portal 管理端微前端
包含 src 全部实现、Dockerfile、配置文件等
This commit is contained in:
16
apps/admin-portal/src/providers/graphql-provider.tsx
Normal file
16
apps/admin-portal/src/providers/graphql-provider.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
"use client";
|
||||
|
||||
import { useMemo, type ReactNode } from "react";
|
||||
import { Provider } from "urql";
|
||||
import { createGraphQLClient } from "@/lib/graphql-client";
|
||||
|
||||
/**
|
||||
* GraphQL Provider(standalone 模式自建 urql client)
|
||||
*
|
||||
* 仲裁 ARB-002 / ISSUE-047 §5.4:MF 模式复用 Shell 暴露的 GraphQL client 单例
|
||||
* 开发期 standalone 模式:自建 urql client 指向 /api/admin/graphql(MSW 拦截)
|
||||
*/
|
||||
export function GraphQLProvider({ children }: { children: ReactNode }) {
|
||||
const client = useMemo(() => createGraphQLClient(), []);
|
||||
return <Provider value={client}>{children}</Provider>;
|
||||
}
|
||||
Reference in New Issue
Block a user