Skip to content

Commit bd40ec3

Browse files
authored
Upgrade geo sdk 2 (#591)
1 parent 0ae0616 commit bd40ec3

22 files changed

Lines changed: 135 additions & 179 deletions
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@graphprotocol/hypergraph": patch
3+
"@graphprotocol/hypergraph-react": patch
4+
---
5+
6+
Update geo-sdk type names: float64 to float, bool to boolean. Replace removed Graph.createSpace calls with no-op alerts.

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.3.0",
18+
"@geoprotocol/geo-sdk": "^0.8.0",
1919
"@graphprotocol/hypergraph": "workspace:*",
2020
"@graphprotocol/hypergraph-react": "workspace:*",
2121
"@heroicons/react": "^2.2.0",

apps/connect/src/components/CreateSpaceCard.tsx

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { Graph } from '@geoprotocol/geo-sdk';
21
import { Key, type Messages, SpaceEvents, SpaceInfo, StoreConnect, Utils } from '@graphprotocol/hypergraph';
32
import { useIdentityToken } from '@privy-io/react-auth';
43
import { useQueryClient } from '@tanstack/react-query';
@@ -20,26 +19,8 @@ export function CreateSpaceCard({ className, ...props }: CreateSpaceCardProps) {
2019
const queryClient = useQueryClient();
2120

2221
const createPublicSpace = async () => {
23-
if (!accountAddress) {
24-
alert('Missing account address');
25-
return;
26-
}
27-
28-
setIsLoading(true);
29-
30-
try {
31-
await Graph.createSpace({
32-
editorAddress: accountAddress,
33-
name: spaceName,
34-
network: 'TESTNET',
35-
});
36-
} catch (error) {
37-
alert('Failed to create space');
38-
console.error(error);
39-
} finally {
40-
setIsLoading(false);
41-
queryClient.invalidateQueries({ queryKey: ['public-spaces'] });
42-
}
22+
alert('Graph.createSpace has been removed. Public space creation needs to be re-implemented.');
23+
return;
4324
};
4425

4526
const createPrivateSpace = async () => {

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.3.0",
13+
"@geoprotocol/geo-sdk": "^0.8.0",
1414
"@graphprotocol/hypergraph": "workspace:*",
1515
"@graphprotocol/hypergraph-react": "workspace:*",
1616
"@noble/hashes": "^1.8.0",

apps/events/src/components/create-events.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const createEvents = async ({
2020
values: [
2121
{
2222
property: mapping.JobOffer.properties?.salary as string,
23-
type: 'float64',
23+
type: 'float',
2424
value: 80000,
2525
},
2626
],
@@ -33,7 +33,7 @@ const createEvents = async ({
3333
values: [
3434
{
3535
property: mapping.JobOffer.properties?.salary as string,
36-
type: 'float64',
36+
type: 'float',
3737
value: 90000,
3838
},
3939
],

apps/events/src/components/create-properties-and-types-event.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const createPropertiesAndTypesEvent = async ({
1414
}) => {
1515
const ops: Array<Op> = [];
1616
const { id: salaryPropertyId, ops: createSalaryPropertyOps } = Graph.createProperty({
17-
dataType: 'FLOAT64',
17+
dataType: 'FLOAT',
1818
name: 'Salary',
1919
});
2020
ops.push(...createSalaryPropertyOps);

apps/events/src/components/create-properties-and-types-todos.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const createPropertiesAndTypesTodos = async ({
4444
ops.push(...createPointPropertyOps);
4545

4646
const { id: amountPropertyId, ops: createAmountPropertyOps } = Graph.createProperty({
47-
dataType: 'FLOAT64',
47+
dataType: 'FLOAT',
4848
name: 'Amount',
4949
});
5050
ops.push(...createAmountPropertyOps);

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.3.0",
14+
"@geoprotocol/geo-sdk": "^0.8.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.3.0",
12+
"@geoprotocol/geo-sdk": "^0.8.0",
1313
"@graphprotocol/hypergraph": "workspace:*",
1414
"@graphprotocol/hypergraph-react": "workspace:*",
1515
"@noble/hashes": "^1.8.0",

apps/privy-login-example/src/components/create-events.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const createEvents = async ({
2020
values: [
2121
{
2222
property: mapping.JobOffer.properties?.salary as string,
23-
type: 'float64',
23+
type: 'float',
2424
value: 80000,
2525
},
2626
],
@@ -33,7 +33,7 @@ const createEvents = async ({
3333
values: [
3434
{
3535
property: mapping.JobOffer.properties?.salary as string,
36-
type: 'float64',
36+
type: 'float',
3737
value: 90000,
3838
},
3939
],

0 commit comments

Comments
 (0)