---
# System prepended metadata

title: WISE-DataConnect Apollo/client & GraphQL 學習筆記
tags: [WISE-DataConnect]

---

# WISE-DataConnect Apollo/client & GraphQL 學習筆記
---
###### tags: `WISE-DataConnect`

# ifp-console 測試 local data-connect-portal iframe

## ifp-console 測試 local data-connect-portal iframe
- clone ifp-console -> 
- npm ci -> 
- 修改 package json，如果要+ start-https 請手動加 `HTTPS=true npm start` (Mac) `set - HTTPS=true&&npm start`(windows cmd.exe)-> 
- 修改 env.developmennt.local (像我們的一樣) -> 
- IAppIframePage 改一些 code
![](https://i.imgur.com/IGqCeHY.png)
```
    return replaceHostname(
      iAppLinkKey === RegisterInfoMetadataKey.ObjectLink
        ? 'https://localhost.isghpc.wise-paas.com:8080/#/object'
        : iAppLinkKey === RegisterInfoMetadataKey.CmdcLink
        ? 'https://localhost.isghpc.wise-paas.com:8080/#/cmdc'
        : iAppLinkKey === RegisterInfoMetadataKey.UserLink
        ? 'https://localhost.isghpc.wise-paas.com:8080/#/user/userList'
        : iAppLink.url,
    );
  }, [iAppLink?.url, iAppLinkKey]);

```
- npm start 或 npm run start-https
- 詢問時 Y 啟用另一個 port
 ![](https://i.imgur.com/mVQAUNe.png)
