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
6 changes: 6 additions & 0 deletions .changeset/upgrade-geo-sdk-types.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@graphprotocol/hypergraph": patch
"@graphprotocol/hypergraph-react": patch
---

Update geo-sdk type names: float64 to float, bool to boolean. Replace removed Graph.createSpace calls with no-op alerts.
Comment on lines +2 to +6
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changeset marks both packages as patch, but this PR removes/neutralizes public space creation behavior (and changes observable outputs like createPublicSpace becoming a no-op). If consumers rely on this functionality, this is a breaking behavioral change and likely warrants at least a minor (or major) bump and clearer release notes about the removed capability.

Suggested change
"@graphprotocol/hypergraph": patch
"@graphprotocol/hypergraph-react": patch
---
Update geo-sdk type names: float64 to float, bool to boolean. Replace removed Graph.createSpace calls with no-op alerts.
"@graphprotocol/hypergraph": minor
"@graphprotocol/hypergraph-react": minor
---
BREAKING: Update geo-sdk type names (float64 to float, bool to boolean) and remove public space creation behavior by turning Graph.createSpace calls into no-op alerts.

Copilot uses AI. Check for mistakes.
2 changes: 1 addition & 1 deletion apps/connect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"dependencies": {
"@base-ui-components/react": "1.0.0-beta.2",
"@geoprotocol/geo-sdk": "^0.3.0",
"@geoprotocol/geo-sdk": "^0.8.0",
"@graphprotocol/hypergraph": "workspace:*",
"@graphprotocol/hypergraph-react": "workspace:*",
"@heroicons/react": "^2.2.0",
Expand Down
23 changes: 2 additions & 21 deletions apps/connect/src/components/CreateSpaceCard.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Graph } from '@geoprotocol/geo-sdk';
import { Key, type Messages, SpaceEvents, SpaceInfo, StoreConnect, Utils } from '@graphprotocol/hypergraph';
import { useIdentityToken } from '@privy-io/react-auth';
import { useQueryClient } from '@tanstack/react-query';
Expand All @@ -20,26 +19,8 @@ export function CreateSpaceCard({ className, ...props }: CreateSpaceCardProps) {
const queryClient = useQueryClient();

const createPublicSpace = async () => {
if (!accountAddress) {
alert('Missing account address');
return;
}

setIsLoading(true);

try {
await Graph.createSpace({
editorAddress: accountAddress,
name: spaceName,
network: 'TESTNET',
});
} catch (error) {
alert('Failed to create space');
console.error(error);
} finally {
setIsLoading(false);
queryClient.invalidateQueries({ queryKey: ['public-spaces'] });
}
alert('Graph.createSpace has been removed. Public space creation needs to be re-implemented.');
return;
};
Comment on lines 21 to 24
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

createPublicSpace now no-ops with an alert(...) but the UI still offers a "public" option. Consider disabling/removing the public-space path until it’s re-implemented (or wire it to a real implementation) to avoid confusing users and to prevent repeated submissions since isLoading is never set for this branch.

Copilot uses AI. Check for mistakes.

const createPrivateSpace = async () => {
Expand Down
2 changes: 1 addition & 1 deletion apps/events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"test:script": "tsx test-script.ts"
},
"dependencies": {
"@geoprotocol/geo-sdk": "^0.3.0",
"@geoprotocol/geo-sdk": "^0.8.0",
"@graphprotocol/hypergraph": "workspace:*",
"@graphprotocol/hypergraph-react": "workspace:*",
"@noble/hashes": "^1.8.0",
Expand Down
4 changes: 2 additions & 2 deletions apps/events/src/components/create-events.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const createEvents = async ({
values: [
{
property: mapping.JobOffer.properties?.salary as string,
type: 'float64',
type: 'float',
value: 80000,
},
],
Expand All @@ -33,7 +33,7 @@ const createEvents = async ({
values: [
{
property: mapping.JobOffer.properties?.salary as string,
type: 'float64',
type: 'float',
value: 90000,
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const createPropertiesAndTypesEvent = async ({
}) => {
const ops: Array<Op> = [];
const { id: salaryPropertyId, ops: createSalaryPropertyOps } = Graph.createProperty({
dataType: 'FLOAT64',
dataType: 'FLOAT',
name: 'Salary',
});
ops.push(...createSalaryPropertyOps);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const createPropertiesAndTypesTodos = async ({
ops.push(...createPointPropertyOps);

const { id: amountPropertyId, ops: createAmountPropertyOps } = Graph.createProperty({
dataType: 'FLOAT64',
dataType: 'FLOAT',
name: 'Amount',
});
ops.push(...createAmountPropertyOps);
Expand Down
2 changes: 1 addition & 1 deletion apps/next-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"type": "module",
"dependencies": {
"@geoprotocol/geo-sdk": "^0.3.0",
"@geoprotocol/geo-sdk": "^0.8.0",
"@graphprotocol/hypergraph": "workspace:*",
"@graphprotocol/hypergraph-react": "workspace:*",
"next": "15.5.9",
Expand Down
2 changes: 1 addition & 1 deletion apps/privy-login-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"typesync": "hypergraph typesync"
},
"dependencies": {
"@geoprotocol/geo-sdk": "^0.3.0",
"@geoprotocol/geo-sdk": "^0.8.0",
"@graphprotocol/hypergraph": "workspace:*",
"@graphprotocol/hypergraph-react": "workspace:*",
"@noble/hashes": "^1.8.0",
Expand Down
4 changes: 2 additions & 2 deletions apps/privy-login-example/src/components/create-events.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const createEvents = async ({
values: [
{
property: mapping.JobOffer.properties?.salary as string,
type: 'float64',
type: 'float',
value: 80000,
},
],
Expand All @@ -33,7 +33,7 @@ const createEvents = async ({
values: [
{
property: mapping.JobOffer.properties?.salary as string,
type: 'float64',
type: 'float',
value: 90000,
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const createPropertiesAndTypesEvent = async ({
}) => {
const ops: Array<Op> = [];
const { id: salaryPropertyId, ops: createSalaryPropertyOps } = Graph.createProperty({
dataType: 'FLOAT64',
dataType: 'FLOAT',
name: 'Salary',
});
ops.push(...createSalaryPropertyOps);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const createPropertiesAndTypesTodos = async ({
ops.push(...createPointPropertyOps);

const { id: amountPropertyId, ops: createAmountPropertyOps } = Graph.createProperty({
dataType: 'FLOAT64',
dataType: 'FLOAT',
name: 'Amount',
});
ops.push(...createAmountPropertyOps);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@changesets/cli": "^2.29.8",
"@effect/language-service": "^0.40.0",
"@effect/vitest": "^0.25.1",
"@geoprotocol/geo-sdk": "^0.3.0",
"@geoprotocol/geo-sdk": "^0.8.0",
"babel-plugin-annotate-pure-calls": "^0.5.0",
"glob": "^11.0.3",
"pkg-pr-new": "^0.0.56",
Expand Down
2 changes: 1 addition & 1 deletion packages/hypergraph-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@automerge/automerge": "^3.1.1",
"@automerge/automerge-repo": "^2.2.0",
"@automerge/automerge-repo-react-hooks": "^2.2.0",
"@geoprotocol/geo-sdk": "^0.3.0",
"@geoprotocol/geo-sdk": "^0.8.0",
"@noble/hashes": "^1.8.0",
"@tanstack/react-query": "^5.85.5",
"effect": "^3.17.13",
Expand Down
18 changes: 4 additions & 14 deletions packages/hypergraph-react/src/HypergraphAppContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import * as automerge from '@automerge/automerge/slim';
import type { DocHandle } from '@automerge/automerge-repo';
import { Repo } from '@automerge/automerge-repo/slim';
import { RepoContext } from '@automerge/automerge-repo-react-hooks';
import { Graph } from '@geoprotocol/geo-sdk';
import {
Config,
Connect,
Expand Down Expand Up @@ -961,20 +960,11 @@ export function HypergraphAppProvider({
throw new Error('Missing keys');
}

let spaceId = Utils.generateId();
const spaceId = Utils.generateId();

try {
if (smartSessionClient?.account) {
const result = await Graph.createSpace({
editorAddress: smartSessionClient.account.address,
name,
network: smartSessionClient.chain.id === Connect.GEO_TESTNET.id ? 'TESTNET' : 'TESTNET', // TODO: switch to mainnet
});
spaceId = result.id;
console.log('Created public space', spaceId);
}
} catch (error) {
console.error('Error creating public space', error);
if (smartSessionClient?.account) {
// TODO: Graph.createSpace has been removed. Public space creation needs to be re-implemented.
console.warn('Graph.createSpace has been removed. Public space creation needs to be re-implemented.');
}
Comment on lines +963 to 968
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

createSpaceForContext previously attempted to create a public space via the geo-sdk when smartSessionClient.account was present; it now always proceeds without creating the corresponding public space and only logs a warning. If the rest of the app assumes the space exists publicly after this call, this will cause runtime behavior regressions—consider surfacing an explicit error/feature flag instead of silently continuing, or adjust upstream callers/UX to reflect that public spaces can’t be created right now.

Copilot uses AI. Check for mistakes.

const spaceEvent = await Effect.runPromise(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,36 +1,15 @@
import { Graph } from '@geoprotocol/geo-sdk';
import { useQueryClient } from '@tanstack/react-query';
import { useState } from 'react';
import { useHypergraphAuth } from '../HypergraphAppContext.js';

type CreatePublicSpaceParams = {
name: string;
};

export const usePrivyAuthCreatePublicSpace = () => {
const [isLoading, setIsLoading] = useState(false);
const queryClient = useQueryClient();
const { privyIdentity } = useHypergraphAuth();
const [isLoading] = useState(false);

const createPublicSpace = async ({ name }: CreatePublicSpaceParams) => {
const accountAddress = privyIdentity?.accountAddress;
if (!accountAddress) {
throw new Error('No account address found');
}
try {
setIsLoading(true);
const { id } = await Graph.createSpace({
editorAddress: accountAddress,
name,
network: 'TESTNET',
});
queryClient.invalidateQueries({ queryKey: ['hypergraph-public-spaces'] });
setIsLoading(false);
return id;
} catch (error) {
setIsLoading(false);
throw error;
}
const createPublicSpace = async ({ name: _name }: CreatePublicSpaceParams) => {
alert('Graph.createSpace has been removed. Public space creation needs to be re-implemented.');
return undefined;
Comment on lines +11 to +12
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

usePrivyAuthCreatePublicSpace currently calls alert(...). This is problematic for a library hook because it introduces a hard browser dependency (will throw in SSR/Node where alert is undefined) and forces a UI side-effect on consumers. Prefer returning a typed error/Result or throwing an Error so callers can render their own UX (and consider deprecating/removing the hook if the feature is no longer supported).

Suggested change
alert('Graph.createSpace has been removed. Public space creation needs to be re-implemented.');
return undefined;
throw new Error('Graph.createSpace has been removed. Public space creation needs to be re-implemented.');

Copilot uses AI. Check for mistakes.
Comment on lines +8 to +12
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isLoading is created via useState(false) but the setter is removed, so it will always be false and cannot reflect the async operation state. Either remove React state entirely (use a constant) or restore setIsLoading and set it appropriately (even if the function now throws/returns an error).

Copilot uses AI. Check for mistakes.
};
return { createPublicSpace, isLoading };
};
8 changes: 4 additions & 4 deletions packages/hypergraph-react/src/prepare-publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ export const preparePublish = async <S extends Schema.Schema.AnyNoContext>({
}
let typedValue: PropertyValueParam;
if (propertyType.value === 'boolean') {
typedValue = { property: propertyId.value, type: 'bool', value: entity[prop.name] as boolean };
typedValue = { property: propertyId.value, type: 'boolean', value: entity[prop.name] as boolean };
} else if (propertyType.value === 'date') {
const dateValue = entity[prop.name] as Date;
typedValue = { property: propertyId.value, type: 'date', value: dateValue.toISOString().split('T')[0] };
} else if (propertyType.value === 'point') {
const [lon, lat] = entity[prop.name] as [number, number];
typedValue = { property: propertyId.value, type: 'point', lon, lat };
} else if (propertyType.value === 'number') {
typedValue = { property: propertyId.value, type: 'float64', value: entity[prop.name] as number };
typedValue = { property: propertyId.value, type: 'float', value: entity[prop.name] as number };
} else {
// string (text)
typedValue = { property: propertyId.value, type: 'text', value: entity[prop.name] as string };
Expand Down Expand Up @@ -153,7 +153,7 @@ export const preparePublish = async <S extends Schema.Schema.AnyNoContext>({
if (propertyType.value === 'boolean') {
const newValue = entity[prop.name] as boolean;
hasChanged = existingValueEntry?.boolean !== newValue;
typedValue = { property: propertyId.value, type: 'bool', value: newValue };
typedValue = { property: propertyId.value, type: 'boolean', value: newValue };
} else if (propertyType.value === 'date') {
const dateValue = entity[prop.name] as Date;
const newValue = dateValue.toISOString().split('T')[0];
Expand All @@ -167,7 +167,7 @@ export const preparePublish = async <S extends Schema.Schema.AnyNoContext>({
} else if (propertyType.value === 'number') {
const newValue = entity[prop.name] as number;
hasChanged = existingValueEntry?.float !== newValue;
typedValue = { property: propertyId.value, type: 'float64', value: newValue };
typedValue = { property: propertyId.value, type: 'float', value: newValue };
} else {
// string (text)
const newValue = entity[prop.name] as string;
Expand Down
2 changes: 1 addition & 1 deletion packages/hypergraph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"@effect/platform-node": "^0.96.1",
"@effect/printer": "^0.45.0",
"@effect/printer-ansi": "^0.45.0",
"@geoprotocol/geo-sdk": "^0.3.0",
"@geoprotocol/geo-sdk": "^0.8.0",
"@noble/ciphers": "^1.3.0",
"@noble/curves": "^1.9.7",
"@noble/hashes": "^1.8.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/hypergraph/src/mapping/Mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ export function mapSchemaDataTypeToGRC20PropDataType(dataType: SchemaDataType):
return 'TIME';
}
case dataType === 'Number': {
return 'FLOAT64';
return 'FLOAT';
}
case dataType === 'Point': {
return 'POINT';
Expand Down
2 changes: 1 addition & 1 deletion packages/hypergraph/test/mapping/Mapping.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('Mapping', () => {
describe('mapSchemaDataTypeToGRC20PropDataType', () => {
it('should be able to map the schema dataType to the correct GRC-20 dataType', () => {
expect(mapSchemaDataTypeToGRC20PropDataType('Boolean')).toEqual('BOOLEAN');
expect(mapSchemaDataTypeToGRC20PropDataType('Number')).toEqual('FLOAT64');
expect(mapSchemaDataTypeToGRC20PropDataType('Number')).toEqual('FLOAT');
expect(mapSchemaDataTypeToGRC20PropDataType('Date')).toEqual('TIME');
expect(mapSchemaDataTypeToGRC20PropDataType('Point')).toEqual('POINT');
expect(mapSchemaDataTypeToGRC20PropDataType('String')).toEqual('TEXT');
Expand Down
2 changes: 1 addition & 1 deletion packages/typesync-studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"dependencies": {
"@base-ui-components/react": "1.0.0-beta.2",
"@geoprotocol/geo-sdk": "^0.3.0",
"@geoprotocol/geo-sdk": "^0.8.0",
"@graphprotocol/hypergraph": "workspace:*",
"@graphprotocol/hypergraph-react": "workspace:*",
"@graphql-typed-document-node/core": "^3.2.0",
Expand Down
Loading
Loading