diff --git a/apps/connect/src/lib/get-app-info-by-ids.ts b/apps/connect/src/lib/get-app-info-by-ids.ts index f2f8d75a..c046af61 100644 --- a/apps/connect/src/lib/get-app-info-by-ids.ts +++ b/apps/connect/src/lib/get-app-info-by-ids.ts @@ -1,11 +1,16 @@ -const apps = { - '93bb8907-085a-4a0e-83dd-62b0dc98e793': { - name: 'Todos', - }, -}; +// const apps = { +// '93bb8907-085a-4a0e-83dd-62b0dc98e793': { +// name: 'Todos', +// }, +// }; export const getAppInfoByIds = async (appIds: string[]) => { // sleep for 1 second - await new Promise((resolve) => setTimeout(resolve, 1000)); - return apps; + // await new Promise((resolve) => setTimeout(resolve, 1000)); + // return apps; + const appInfo: Record = {}; + for (const appId of appIds) { + appInfo[appId] = { name: appId }; + } + return appInfo; }; diff --git a/apps/server/src/index.ts b/apps/server/src/index.ts index 5744bcf4..424fe9ef 100755 --- a/apps/server/src/index.ts +++ b/apps/server/src/index.ts @@ -69,7 +69,7 @@ app.use(express.json({ limit: '2mb' })); app.use(cors()); app.get('/', (_req, res) => { - res.send('Server is running (v0.0.8)'); + res.send('Server is running (v0.0.9)'); }); app.get('/connect/spaces', async (req, res) => { diff --git a/packages/hypergraph-react/package.json b/packages/hypergraph-react/package.json index 10d4ef3d..ea4f5ee4 100644 --- a/packages/hypergraph-react/package.json +++ b/packages/hypergraph-react/package.json @@ -1,6 +1,6 @@ { "name": "@graphprotocol/hypergraph-react", - "version": "0.0.8", + "version": "0.0.9", "description": "React implementation and additional functionality, components, and hooks for the hypergraph SDK framework", "keywords": ["Web3", "Local-First", "Knowledge Graph", "Graph Protocol", "react"], "publishConfig": { diff --git a/packages/hypergraph-react/src/HypergraphAppContext.tsx b/packages/hypergraph-react/src/HypergraphAppContext.tsx index d4b7604f..ae62f7c7 100644 --- a/packages/hypergraph-react/src/HypergraphAppContext.tsx +++ b/packages/hypergraph-react/src/HypergraphAppContext.tsx @@ -299,9 +299,12 @@ export function HypergraphAppProvider({ const syncServerUrl = new URL(syncServerUri); const syncServerWsUrl = new URL(`/?token=${identity.sessionToken}`, syncServerUrl.toString()); - syncServerWsUrl.protocol = 'ws:'; - const syncServerWsUrlString = syncServerWsUrl.toString(); + // Use 'wss:' by default, only use 'ws:' for local development + const isLocalDev = syncServerUrl.hostname === 'localhost' || syncServerUrl.hostname === '127.0.0.1'; + syncServerWsUrl.protocol = isLocalDev ? 'ws:' : 'wss:'; + + const syncServerWsUrlString = syncServerWsUrl.toString(); const websocketConnection = new WebSocket(syncServerWsUrlString); setWebsocketConnection(websocketConnection); diff --git a/packages/hypergraph/package.json b/packages/hypergraph/package.json index bcefd39d..927d544c 100644 --- a/packages/hypergraph/package.json +++ b/packages/hypergraph/package.json @@ -1,6 +1,6 @@ { "name": "@graphprotocol/hypergraph", - "version": "0.0.8", + "version": "0.0.9", "description": "SDK for building performant, type-safe, local-first dapps on top of The Graph ecosystem knowledge graphs.", "publishConfig": { "access": "public",