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
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",
"@graphprotocol/grc-20": "^0.33.0",
"@geoprotocol/geo-sdk": "^0.1.1",
"@graphprotocol/hypergraph": "workspace:*",
"@graphprotocol/hypergraph-react": "workspace:*",
"@heroicons/react": "^2.2.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/connect/src/components/CreateSpaceCard.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Graph } from '@graphprotocol/grc-20';
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 Down
6 changes: 3 additions & 3 deletions apps/connect/src/routes/authenticate.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Graph } from '@graphprotocol/grc-20';
import { Graph } from '@geoprotocol/geo-sdk';
import { Connect, Identity, Key, type Messages, StoreConnect, Utils } from '@graphprotocol/hypergraph';
import { ExclamationTriangleIcon } from '@heroicons/react/24/solid';
import { useIdentityToken, usePrivy, useWallets } from '@privy-io/react-auth';
Expand All @@ -18,8 +18,8 @@ import { usePublicSpaces } from '@/hooks/use-public-spaces';
const CHAIN = import.meta.env.VITE_HYPERGRAPH_CHAIN === 'geogenesis' ? Connect.GEOGENESIS : Connect.GEO_TESTNET;
const API_URL =
import.meta.env.VITE_HYPERGRAPH_CHAIN === 'geogenesis'
? `${Graph.MAINNET_API_ORIGIN}/v2/graphql`
: `${Graph.TESTNET_API_ORIGIN}/v2/graphql`;
? `${Graph.TESTNET_API_ORIGIN}/graphql` // TODO: switch to mainnet
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

API_URL now always uses Graph.TESTNET_API_ORIGIN, even when VITE_HYPERGRAPH_CHAIN === 'geogenesis', which means the app will talk to the testnet GraphQL API while CHAIN is set to the geogenesis (mainnet) chain. This desynchronizes chain and API target compared to the previous behavior that used Graph.MAINNET_API_ORIGIN for geogenesis, and will cause geogenesis deployments to hit the wrong backend; please restore a mainnet-specific origin for the geogenesis branch or otherwise align API_URL with CHAIN.

Suggested change
? `${Graph.TESTNET_API_ORIGIN}/graphql` // TODO: switch to mainnet
? `${Graph.MAINNET_API_ORIGIN}/graphql`

Copilot uses AI. Check for mistakes.
: `${Graph.TESTNET_API_ORIGIN}/graphql`;

type AuthenticateSearch = {
data: unknown;
Expand Down
4 changes: 2 additions & 2 deletions apps/connect/src/routes/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Graph } from '@graphprotocol/grc-20';
import { Graph } from '@geoprotocol/geo-sdk';
import { useIdentityToken } from '@privy-io/react-auth';
import { createFileRoute } from '@tanstack/react-router';
import { CreateSpaceCard } from '@/components/CreateSpaceCard';
Comment on lines +1 to 4
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

Now that this route imports Graph from the new SDK, note that further down in this file usePublicSpaces is still called with a hard-coded ${Graph.TESTNET_API_ORIGIN}/v2/graphql URL. To avoid subtle inconsistencies with authenticate.tsx (which uses the /graphql endpoint via API_URL) and to prevent duplicated endpoint configuration, consider aligning that call with the same /graphql path or shared constant.

Copilot uses AI. Check for mistakes.
Expand Down Expand Up @@ -33,7 +33,7 @@ function Authorized() {
isPending: publicSpacesPending,
error: publicSpacesError,
data: publicSpacesData,
} = usePublicSpaces(`${Graph.TESTNET_API_ORIGIN}/v2/graphql`);
} = usePublicSpaces(`${Graph.TESTNET_API_ORIGIN}/graphql`);

return (
<div className="flex grow flex-col items-center justify-center">
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": {
"@graphprotocol/grc-20": "^0.33.0",
"@geoprotocol/geo-sdk": "^0.1.1",
"@graphprotocol/hypergraph": "workspace:*",
"@graphprotocol/hypergraph-react": "workspace:*",
"@noble/hashes": "^1.8.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/events/src/Boot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function Boot() {
<HypergraphAppProvider
syncServerUri="http://localhost:3030"
appId="93bb8907085a4a0e83dd62b0dc98e793"
apiOrigin="https://testnet-api-staging.geobrowser.io"
apiOrigin="https://testnet-api.geobrowser.io"
>
<RouterProvider router={router} />
</HypergraphAppProvider>
Expand Down
2 changes: 1 addition & 1 deletion apps/events/src/components/create-events.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Graph, type Op } from '@graphprotocol/grc-20';
import { Graph, type Op } from '@geoprotocol/geo-sdk';
import type { Connect } from '@graphprotocol/hypergraph';
import { publishOps, useHypergraphApp } from '@graphprotocol/hypergraph-react';
import { mapping } from '../mapping';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Graph, type Op } from '@graphprotocol/grc-20';
import { Graph, type Op } from '@geoprotocol/geo-sdk';
import type { Connect } from '@graphprotocol/hypergraph';
import { publishOps, useHypergraphApp } from '@graphprotocol/hypergraph-react';
import { useState } from 'react';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Graph, type Op } from '@graphprotocol/grc-20';
import { Graph, type Op } from '@geoprotocol/geo-sdk';
import type { Connect } from '@graphprotocol/hypergraph';
import { publishOps, useHypergraphApp } from '@graphprotocol/hypergraph-react';
import { useState } from 'react';
Expand Down
2 changes: 1 addition & 1 deletion apps/events/src/schema.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ContentIds, SystemIds } from '@graphprotocol/grc-20';
import { ContentIds, SystemIds } from '@geoprotocol/geo-sdk';
import { Entity, Id, Type } from '@graphprotocol/hypergraph';

export const User = Entity.Schema(
Expand Down
4 changes: 2 additions & 2 deletions apps/events/test-script.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { SystemIds } from '@graphprotocol/grc-20';
import { SystemIds } from '@geoprotocol/geo-sdk';
import { Config, Entity, Id, Type } from '@graphprotocol/hypergraph';

Config.setApiOrigin('https://testnet-api-staging.geobrowser.io');
Config.setApiOrigin('https://testnet-api.geobrowser.io');

const BOUNTY_TYPE_ID = Id('327976dea5ad45769b83b7e7ec6337cf');
const REWARD_PROPERTY_ID = Id('e8e7301136354e84b46b767e7cd530a8');
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": {
"@graphprotocol/grc-20": "^0.33.0",
"@geoprotocol/geo-sdk": "^0.1.1",
"@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": {
"@graphprotocol/grc-20": "^0.33.0",
"@geoprotocol/geo-sdk": "^0.1.1",
"@graphprotocol/hypergraph": "workspace:*",
"@graphprotocol/hypergraph-react": "workspace:*",
"@noble/hashes": "^1.8.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/privy-login-example/src/components/create-events.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Graph, type Op } from '@graphprotocol/grc-20';
import { Graph, type Op } from '@geoprotocol/geo-sdk';
import type { Connect } from '@graphprotocol/hypergraph';
import { publishOps, useHypergraphApp } from '@graphprotocol/hypergraph-react';
import { mapping } from '../mapping';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Graph, type Op } from '@graphprotocol/grc-20';
import { Graph, type Op } from '@geoprotocol/geo-sdk';
import type { Connect } from '@graphprotocol/hypergraph';
import { publishOps, useHypergraphApp } from '@graphprotocol/hypergraph-react';
import { useState } from 'react';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Graph, type Op } from '@graphprotocol/grc-20';
import { Graph, type Op } from '@geoprotocol/geo-sdk';
import type { Connect } from '@graphprotocol/hypergraph';
import { publishOps, useHypergraphApp } from '@graphprotocol/hypergraph-react';
import { useState } from 'react';
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/key-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Every update is encrypted **on the client** using XChaCha20-Poly1305. Only membe

## Knowledge Graph SDK

Build, link, and publish knowledge as entities and relations using the [`@graphprotocol/grc-20`](https://www.npmjs.com/package/@graphprotocol/grc-20) Knowledge Graph SDK. It makes it easy to organize data into spaces, anchor edits onchain, and work with The Graph's knowledge graph standard.
Build, link, and publish knowledge as entities and relations using the [`@geoprotocol/geo-sdk`](https://www.npmjs.com/package/@geoprotocol/geo-sdk) Knowledge Graph SDK. It makes it easy to organize data into spaces, anchor edits onchain, and work with The Graph's knowledge graph standard.

## Graph-based data model

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/spaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Public spaces can be found at [Geo Browser](https://www.geobrowser.io/root), whe

Indexer API that indexes all the public spaces and the content in it!

[Railway Graphql API](https://api-testnet.geobrowser.io/v2/graphql)
[Railway Graphql API](https://api-testnet.geobrowser.io/graphql)

## Private Spaces

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",
"@graphprotocol/grc-20": "^0.33.0",
"@geoprotocol/geo-sdk": "^0.1.1",
"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",
"@graphprotocol/grc-20": "^0.33.0",
"@geoprotocol/geo-sdk": "^0.1.1",
"@noble/hashes": "^1.8.0",
"@tanstack/react-query": "^5.85.5",
"effect": "^3.17.13",
Expand Down
4 changes: 2 additions & 2 deletions packages/hypergraph-react/src/HypergraphAppContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ 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 '@graphprotocol/grc-20';
import { Graph } from '@geoprotocol/geo-sdk';
import {
Config,
Connect,
Expand Down Expand Up @@ -968,7 +968,7 @@ export function HypergraphAppProvider({
const result = await Graph.createSpace({
editorAddress: smartSessionClient.account.address,
name,
network: smartSessionClient.chain.id === Connect.GEO_TESTNET.id ? 'TESTNET' : 'MAINNET',
network: smartSessionClient.chain.id === Connect.GEO_TESTNET.id ? 'TESTNET' : 'TESTNET', // TODO: switch to mainnet
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

Graph.createSpace is now always called with network: 'TESTNET' regardless of smartSessionClient.chain.id, so even non-testnet chains are treated as testnet. This breaks multi-network support compared to the previous TESTNET vs MAINNET split and will cause spaces created on mainnet to be mis-labeled; the network argument should conditionally select a mainnet value when the chain is not Connect.GEO_TESTNET.

Suggested change
network: smartSessionClient.chain.id === Connect.GEO_TESTNET.id ? 'TESTNET' : 'TESTNET', // TODO: switch to mainnet
network: smartSessionClient.chain.id === Connect.GEO_TESTNET.id ? 'TESTNET' : 'MAINNET',

Copilot uses AI. Check for mistakes.
});
spaceId = result.id;
console.log('Created public space', spaceId);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Graph } from '@graphprotocol/grc-20';
import { Graph } from '@geoprotocol/geo-sdk';
import { useQueryClient } from '@tanstack/react-query';
import { useState } from 'react';
import { useHypergraphAuth } from '../HypergraphAppContext.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/hypergraph-react/src/hooks/use-spaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const useSpaces = (params: { mode: 'public' | 'private' }) => {
queryKey: ['hypergraph-public-spaces', params.mode],
queryFn: async () => {
const result = await request<PublicSpacesQueryResult>(
`${Config.getApiOrigin()}/v2/graphql`,
`${Config.getApiOrigin()}/graphql`,
publicSpacesQueryDocument,
{
accountAddress,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Op } from '@graphprotocol/grc-20';
import type { Op } from '@geoprotocol/geo-sdk';
import { Config } from '@graphprotocol/hypergraph';
import { gql, request } from 'graphql-request';

Expand Down Expand Up @@ -45,7 +45,7 @@ type DeleteEntityResult = {
};

export const generateDeleteOps = async ({ id }: { id: string; space: string }) => {
const result = await request<DeleteEntityResult>(`${Config.getApiOrigin()}/v2/graphql`, deleteEntityQueryDocument, {
const result = await request<DeleteEntityResult>(`${Config.getApiOrigin()}/graphql`, deleteEntityQueryDocument, {
entityId: id,
});
if (result.entity === null) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Graph } from '@graphprotocol/grc-20';
import { Graph } from '@geoprotocol/geo-sdk';
import type { Connect } from '@graphprotocol/hypergraph';
import { Constants } from '@graphprotocol/hypergraph';
import { useQueryClient } from '@tanstack/react-query';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const usePublicSpace = ({ spaceId, enabled }: { spaceId: string; enabled:
const result = useQuery({
queryKey: ['hypergraph-public-space', spaceId],
queryFn: async () => {
const result = await request<SpaceQueryResult>(`${Config.getApiOrigin()}/v2/graphql`, spaceQueryDocument, {
const result = await request<SpaceQueryResult>(`${Config.getApiOrigin()}/graphql`, spaceQueryDocument, {
spaceId,
});
return result?.space?.page
Expand Down
4 changes: 2 additions & 2 deletions packages/hypergraph-react/src/prepare-publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
type PropertiesParam,
type PropertyValueParam,
type RelationsParam,
} from '@graphprotocol/grc-20';
} from '@geoprotocol/geo-sdk';
import { Config, Constants, type Entity, Utils } from '@graphprotocol/hypergraph';
import * as Option from 'effect/Option';
import type * as Schema from 'effect/Schema';
Expand Down Expand Up @@ -58,7 +58,7 @@ export const preparePublish = async <S extends Schema.Schema.AnyNoContext>({
publicSpace,
}: PreparePublishParams<S>) => {
const data = await request<EntityToPublishQueryResult>(
`${Config.getApiOrigin()}/v2/graphql`,
`${Config.getApiOrigin()}/graphql`,
entityToPublishQueryDocument,
{
entityId: entity.id,
Expand Down
6 changes: 3 additions & 3 deletions packages/hypergraph-react/src/publish-ops.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Op } from '@graphprotocol/grc-20';
import { Ipfs } from '@graphprotocol/grc-20';
import type { Op } from '@geoprotocol/geo-sdk';
import { Ipfs } from '@geoprotocol/geo-sdk';
import { Config, Connect } from '@graphprotocol/hypergraph';
import type { Hash } from 'viem';

Expand All @@ -23,7 +23,7 @@ export const publishOps = async ({ name, ops, walletClient, space }: PublishPara
throw new Error('No address found');
}

const network = walletClient.chain.id === Connect.GEO_TESTNET.id ? 'TESTNET' : 'MAINNET';
const network = walletClient.chain.id === Connect.GEO_TESTNET.id ? 'TESTNET' : 'TESTNET'; // TODO: switch to mainnet
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

The network variable now resolves to 'TESTNET' for both GEO testnet and non-testnet chains, so Ipfs.publishEdit will always be invoked with the testnet network label. This is a regression from the previous behavior (which used 'MAINNET' for non-testnet chains) and will cause publishes on mainnet to be tagged for the wrong network; the conditional should preserve a distinct mainnet value for non-testnet chains.

Suggested change
const network = walletClient.chain.id === Connect.GEO_TESTNET.id ? 'TESTNET' : 'TESTNET'; // TODO: switch to mainnet
const network = walletClient.chain.id === Connect.GEO_TESTNET.id ? 'TESTNET' : 'MAINNET';

Copilot uses AI. Check for mistakes.
const publishResult = await Ipfs.publishEdit({
name,
ops: ops,
Expand Down
4 changes: 2 additions & 2 deletions packages/hypergraph-react/test/prepare-publish.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Repo } from '@automerge/automerge-repo';
import { Id } from '@graphprotocol/grc-20';
import { Id } from '@geoprotocol/geo-sdk';
import { Config, Entity, store, Type } from '@graphprotocol/hypergraph';
import '@testing-library/jest-dom/vitest';
import request from 'graphql-request';
Expand Down Expand Up @@ -133,7 +133,7 @@ describe('preparePublish', () => {

const result = await preparePublish(params);

expect(mockRequest).toHaveBeenCalledWith(`${Config.getApiOrigin()}/v2/graphql`, expect.any(String), {
expect(mockRequest).toHaveBeenCalledWith(`${Config.getApiOrigin()}/graphql`, expect.any(String), {
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

This test now expects preparePublish to call request with ${Config.getApiOrigin()}/graphql, but the implementation in src/prepare-publish.ts still calls ${Config.getApiOrigin()}/v2/graphql. As written, the test and implementation disagree and the test will fail; either the implementation should be updated to use the /graphql endpoint or this assertion should be reverted to match the current implementation URL.

Suggested change
expect(mockRequest).toHaveBeenCalledWith(`${Config.getApiOrigin()}/graphql`, expect.any(String), {
expect(mockRequest).toHaveBeenCalledWith(`${Config.getApiOrigin()}/v2/graphql`, expect.any(String), {

Copilot uses AI. Check for mistakes.
entityId: entity.id,
spaceId: publicSpaceId,
});
Expand Down
2 changes: 1 addition & 1 deletion packages/hypergraph-react/test/space-ids-types.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Id } from '@graphprotocol/grc-20';
import { Id } from '@geoprotocol/geo-sdk';
import { Entity, Type } from '@graphprotocol/hypergraph';
import { describe, expectTypeOf, it } from 'vitest';
import type { useEntities } from '../src/hooks/use-entities.js';
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",
"@graphprotocol/grc-20": "^0.33.0",
"@geoprotocol/geo-sdk": "^0.1.1",
"@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/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Graph } from '@graphprotocol/grc-20';
import { Graph } from '@geoprotocol/geo-sdk';

let apiOrigin: string | null = null;

Expand Down
4 changes: 2 additions & 2 deletions packages/hypergraph/src/connect/smart-account.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MAINNET, TESTNET } from '@graphprotocol/grc-20/contracts';
import { TESTNET } from '@geoprotocol/geo-sdk/contracts';
import { randomBytes } from '@noble/hashes/utils';
import {
encodeSmartSessionSignature,
Expand Down Expand Up @@ -78,7 +78,7 @@ const SAFE_4337_MODULE_ADDRESS = '0x75cf11467937ce3F2f357CE24ffc3DBF8fD5c226';
const ERC7579_LAUNCHPAD_ADDRESS = '0x7579011aB74c46090561ea277Ba79D510c6C00ff';

const SPACE_FACTORY_ADDRESS: Record<string, Hex> = {
'80451': MAINNET.DAO_FACTORY_ADDRESS,
'80451': TESTNET.DAO_FACTORY_ADDRESS, // TODO: switch to mainnet
'19411': TESTNET.DAO_FACTORY_ADDRESS,
};
Comment on lines 80 to 83
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

SPACE_FACTORY_ADDRESS now maps chain ID '80451' to TESTNET.DAO_FACTORY_ADDRESS, whereas this previously used the mainnet DAO factory address. For calls executed on the 80451 (mainnet) chain this will route space-creation transactions to the testnet factory, which is almost certainly incorrect and will break mainnet behavior; this entry should continue to use the mainnet factory address (or an equivalent mainnet constant) rather than the testnet one.

Copilot uses AI. Check for mistakes.

Expand Down
2 changes: 1 addition & 1 deletion packages/hypergraph/src/entity/find-many-public.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ export const findManyPublic = async <
queryVariables.sortDirection = sortDirection;
}

const result = await request<EntityQueryResult>(`${Config.getApiOrigin()}/v2/graphql`, queryDocument, queryVariables);
const result = await request<EntityQueryResult>(`${Config.getApiOrigin()}/graphql`, queryDocument, queryVariables);

const { data, invalidEntities, invalidRelationEntities } = parseResult<S, IncludeSpaceIds>(
result,
Expand Down
2 changes: 1 addition & 1 deletion packages/hypergraph/src/entity/find-one-public.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export const findOnePublic = async <

const queryDocument = buildEntityQuery(relationTypeIds, includeSpaceIds);

const result = await request<EntityQueryResult>(`${Config.getApiOrigin()}/v2/graphql`, queryDocument, {
const result = await request<EntityQueryResult>(`${Config.getApiOrigin()}/graphql`, queryDocument, {
id,
spaceId: space,
});
Expand Down
2 changes: 1 addition & 1 deletion packages/hypergraph/src/entity/search-many-public.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const searchManyPublic = async <

const filterParams = filter ? Utils.translateFilterToGraphql(filter, type) : {};

const result = await request<EntityQueryResult>(`${Config.getApiOrigin()}/v2/graphql`, queryDocument, {
const result = await request<EntityQueryResult>(`${Config.getApiOrigin()}/graphql`, queryDocument, {
spaceId: space,
typeIds,
query,
Expand Down
2 changes: 1 addition & 1 deletion packages/hypergraph/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export { Id } from '@graphprotocol/grc-20';
export { Id } from '@geoprotocol/geo-sdk';
export * as Typesync from './cli/services/Model.js';
export * as Config from './config.js';
export * as Connect from './connect/index.js';
Expand Down
4 changes: 2 additions & 2 deletions packages/hypergraph/src/mapping/Mapping.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type CreatePropertyParams, Graph, Id as Grc20Id, type Op } from '@graphprotocol/grc-20';
import { type CreatePropertyParams, Graph, Id as Grc20Id, type Op } from '@geoprotocol/geo-sdk';
import { Data, Array as EffectArray, Schema as EffectSchema, Option, pipe } from 'effect';
import { GeoIdSchema } from '../utils/geo-id.js';
import { namesAreUnique, toCamelCase, toPascalCase } from './Utils.js';
Expand Down Expand Up @@ -523,7 +523,7 @@ function processType(type: SchemaType, typeIdMap: TypeIdMapping): ProcessedType
*
* @example
* ```ts
* import { Id } from "@graphprotocol/grc-20"
* import { Id } from "@geoprotocol/geo-sdk"
* import { generateMapping } from "@graphprotocol/hypergraph"
*
* const schema: Schema = {
Expand Down
4 changes: 2 additions & 2 deletions packages/hypergraph/src/space/find-many-public.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ContentIds, SystemIds } from '@graphprotocol/grc-20';
import { ContentIds, SystemIds } from '@geoprotocol/geo-sdk';
import { Config } from '@graphprotocol/hypergraph';
import * as Either from 'effect/Either';
import * as EffectSchema from 'effect/Schema';
Expand Down Expand Up @@ -186,7 +186,7 @@ export const findManyPublic = async (params?: FindManyPublicParams) => {
throw new Error('Provide only one of memberId or editorId when calling findManyPublic().');
}

const endpoint = `${Config.getApiOrigin()}/v2/graphql`;
const endpoint = `${Config.getApiOrigin()}/graphql`;
const queryDocument = buildSpacesQuery(filter);
const queryResult = await request<SpacesQueryResult>(endpoint, queryDocument);
return parseSpacesQueryResult(queryResult);
Expand Down
2 changes: 1 addition & 1 deletion packages/hypergraph/test/cli/services/Utils.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, it } from '@effect/vitest';
import { Id } from '@graphprotocol/grc-20';
import { Id } from '@geoprotocol/geo-sdk';
import { Effect } from 'effect';
import {
buildMappingFileFromSchema,
Expand Down
2 changes: 1 addition & 1 deletion packages/hypergraph/test/entity/entity.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { AnyDocumentId, DocHandle } from '@automerge/automerge-repo';
import { Repo } from '@automerge/automerge-repo';
import { Id } from '@graphprotocol/grc-20';
import { Id } from '@geoprotocol/geo-sdk';
import { beforeEach, describe, expect, it } from 'vitest';
import * as Entity from '../../src/entity/index.js';
import * as Type from '../../src/type/type.js';
Expand Down
Loading
Loading