Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions apps/connect/src/lib/get-app-info-by-ids.ts
Original file line number Diff line number Diff line change
@@ -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<string, { name: string }> = {};
for (const appId of appIds) {
appInfo[appId] = { name: appId };
}
return appInfo;
};
2 changes: 1 addition & 1 deletion apps/server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/hypergraph-react/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
7 changes: 5 additions & 2 deletions packages/hypergraph-react/src/HypergraphAppContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion packages/hypergraph/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
Loading