Skip to content

Commit eeb4a38

Browse files
authored
upgrade geo-sdk (#599)
1 parent 7d41c95 commit eeb4a38

File tree

14 files changed

+132
-205
lines changed

14 files changed

+132
-205
lines changed

.changeset/giant-cases-cut.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"@graphprotocol/hypergraph-react": patch
3+
"@graphprotocol/hypergraph": patch
4+
"connect": patch
5+
---
6+
7+
bump geo-sdk version to 0.14.0 and remove useDeleteEntityPublic
8+

apps/connect/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"dependencies": {
1717
"@base-ui-components/react": "1.0.0-beta.2",
18-
"@geoprotocol/geo-sdk": "^0.9.0",
18+
"@geoprotocol/geo-sdk": "^0.14.0",
1919
"@graphprotocol/hypergraph": "workspace:*",
2020
"@graphprotocol/hypergraph-react": "workspace:*",
2121
"@heroicons/react": "^2.2.0",

apps/events/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"test:script": "tsx test-script.ts"
1111
},
1212
"dependencies": {
13-
"@geoprotocol/geo-sdk": "^0.9.0",
13+
"@geoprotocol/geo-sdk": "^0.14.0",
1414
"@graphprotocol/hypergraph": "workspace:*",
1515
"@graphprotocol/hypergraph-react": "workspace:*",
1616
"@noble/hashes": "^1.8.0",

apps/events/src/components/playground.tsx

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
import { _useDeleteEntityPublic, useEntities, useHypergraphApp, useSpace } from '@graphprotocol/hypergraph-react';
2-
import { useState } from 'react';
1+
import { useEntities, useSpace } from '@graphprotocol/hypergraph-react';
32
import { Event } from '../schema';
4-
import { Button } from './ui/button';
53

64
export const Playground = ({ spaceId }: { spaceId: string }) => {
75
const { data, isLoading, isError, invalidEntities } = useEntities(Event, {
@@ -18,13 +16,9 @@ export const Playground = ({ spaceId }: { spaceId: string }) => {
1816
first: 100,
1917
space: spaceId,
2018
});
21-
const [isDeleting, setIsDeleting] = useState(false);
22-
const { getSmartSessionClient } = useHypergraphApp();
2319

2420
const { name } = useSpace({ mode: 'public', space: spaceId });
2521

26-
const deleteEntity = _useDeleteEntityPublic(Event, { space: spaceId });
27-
2822
console.log({ isLoading, isError, data, invalidEntities });
2923

3024
return (
@@ -35,24 +29,6 @@ export const Playground = ({ spaceId }: { spaceId: string }) => {
3529
{data?.map((event) => (
3630
<div key={event.id}>
3731
<h2>{event.name}</h2>
38-
<Button
39-
onClick={async () => {
40-
setIsDeleting(true);
41-
const walletClient = await getSmartSessionClient();
42-
if (!walletClient) {
43-
alert('Wallet client not found');
44-
return;
45-
}
46-
await deleteEntity({
47-
id: event.id,
48-
walletClient,
49-
});
50-
setIsDeleting(false);
51-
}}
52-
disabled={isDeleting}
53-
>
54-
{isDeleting ? 'Deleting...' : 'Delete'}
55-
</Button>
5632
<pre className="text-xs">{JSON.stringify(event, null, 2)}</pre>
5733
</div>
5834
))}

apps/next-example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"type": "module",
1313
"dependencies": {
14-
"@geoprotocol/geo-sdk": "^0.9.0",
14+
"@geoprotocol/geo-sdk": "^0.14.0",
1515
"@graphprotocol/hypergraph": "workspace:*",
1616
"@graphprotocol/hypergraph-react": "workspace:*",
1717
"next": "15.5.9",

apps/privy-login-example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"typesync": "hypergraph typesync"
1010
},
1111
"dependencies": {
12-
"@geoprotocol/geo-sdk": "^0.9.0",
12+
"@geoprotocol/geo-sdk": "^0.14.0",
1313
"@graphprotocol/hypergraph": "workspace:*",
1414
"@graphprotocol/hypergraph-react": "workspace:*",
1515
"@noble/hashes": "^1.8.0",

apps/privy-login-example/src/components/playground.tsx

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
import { _useDeleteEntityPublic, useEntities, useHypergraphApp, useSpace } from '@graphprotocol/hypergraph-react';
2-
import { useState } from 'react';
1+
import { useEntities, useSpace } from '@graphprotocol/hypergraph-react';
32
import { Event } from '../schema';
4-
import { Button } from './ui/button';
53

64
export const Playground = ({ spaceId }: { spaceId: string }) => {
75
const { data, isLoading, isError } = useEntities(Event, {
@@ -17,13 +15,9 @@ export const Playground = ({ spaceId }: { spaceId: string }) => {
1715
first: 100,
1816
space: spaceId,
1917
});
20-
const [isDeleting, setIsDeleting] = useState(false);
21-
const { getSmartSessionClient } = useHypergraphApp();
2218

2319
const { name } = useSpace({ mode: 'public', space: spaceId });
2420

25-
const deleteEntity = _useDeleteEntityPublic(Event, { space: spaceId });
26-
2721
console.log({ isLoading, isError, data });
2822

2923
return (
@@ -34,24 +28,6 @@ export const Playground = ({ spaceId }: { spaceId: string }) => {
3428
{data?.map((event) => (
3529
<div key={event.id}>
3630
<h2>{event.name}</h2>
37-
<Button
38-
onClick={async () => {
39-
setIsDeleting(true);
40-
const walletClient = await getSmartSessionClient();
41-
if (!walletClient) {
42-
alert('Wallet client not found');
43-
return;
44-
}
45-
await deleteEntity({
46-
id: event.id,
47-
walletClient,
48-
});
49-
setIsDeleting(false);
50-
}}
51-
disabled={isDeleting}
52-
>
53-
{isDeleting ? 'Deleting...' : 'Delete'}
54-
</Button>
5531
<pre className="text-xs">{JSON.stringify(event, null, 2)}</pre>
5632
</div>
5733
))}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"@changesets/cli": "^2.29.8",
2222
"@effect/language-service": "^0.40.0",
2323
"@effect/vitest": "^0.25.1",
24-
"@geoprotocol/geo-sdk": "^0.9.0",
24+
"@geoprotocol/geo-sdk": "^0.14.0",
2525
"babel-plugin-annotate-pure-calls": "^0.5.0",
2626
"glob": "^11.0.3",
2727
"pkg-pr-new": "^0.0.56",

packages/hypergraph-react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"@automerge/automerge": "^3.1.1",
4848
"@automerge/automerge-repo": "^2.2.0",
4949
"@automerge/automerge-repo-react-hooks": "^2.2.0",
50-
"@geoprotocol/geo-sdk": "^0.9.0",
50+
"@geoprotocol/geo-sdk": "^0.14.0",
5151
"@noble/hashes": "^1.8.0",
5252
"@tanstack/react-query": "^5.85.5",
5353
"effect": "^3.17.13",

packages/hypergraph-react/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export { usePublicAccountInboxes } from './hooks/usePublicAccountInboxes.js';
2525
export { usePublicSpaces } from './hooks/usePublicSpaces.js';
2626
export { usePublishToPublicSpace } from './hooks/usePublishToSpace.js';
2727
export { generateDeleteOps as _generateDeleteOps } from './internal/generate-delete-ops.js';
28-
export { useDeleteEntityPublic as _useDeleteEntityPublic } from './internal/use-delete-entity-public.js';
2928
export { useEntitiesPrivate as _useEntitiesPrivate } from './internal/use-entities-private.js';
3029
export { useEntitiesPublic as _useEntitiesPublic } from './internal/use-entities-public.js';
3130
export { useEntityPublic as _useEntityPublic } from './internal/use-entity-public.js';

0 commit comments

Comments
 (0)