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
11 changes: 11 additions & 0 deletions .changeset/dark-radios-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@graphprotocol/hypergraph-react": minor
"@graphprotocol/hypergraph": minor
"connect": minor
---

For IDs switch from UUIDs with dashes to UUIDs without dashes e.g. "a126ca53-0c8e-48d5-b888-82c734c38935" to "a126ca530c8e48d5b88882c734c38935"

- For all public API endpoints switch from `/graphql` to `/v2/graphql`
- Expose new Utils: `Utils.GeoIdSchema`, `Utils.normalizeGeoId`, `Utils.isGeoId`, `Utils.parseGeoId`, `Utils.toUuid`

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.25.2",
"@graphprotocol/grc-20": "^0.27.0",
"@graphprotocol/hypergraph": "workspace:*",
"@graphprotocol/hypergraph-react": "workspace:*",
"@heroicons/react": "^2.2.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/connect/src/lib/get-app-info-by-ids.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// const apps = {
// '93bb8907-085a-4a0e-83dd-62b0dc98e793': {
// '93bb8907085a4a0e83dd62b0dc98e793': {
// name: 'Todos',
// },
// };
Expand Down
4 changes: 2 additions & 2 deletions apps/connect/src/routes/authenticate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}/graphql`
: `${Graph.TESTNET_API_ORIGIN}/graphql`;
? `${Graph.MAINNET_API_ORIGIN}/v2/graphql`
: `${Graph.TESTNET_API_ORIGIN}/v2/graphql`;

type AuthenticateSearch = {
data: unknown;
Expand Down
2 changes: 1 addition & 1 deletion apps/connect/src/routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function Authorized() {
isPending: publicSpacesPending,
error: publicSpacesError,
data: publicSpacesData,
} = usePublicSpaces(`${Graph.TESTNET_API_ORIGIN}/graphql`);
} = usePublicSpaces(`${Graph.TESTNET_API_ORIGIN}/v2/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 @@ -9,7 +9,7 @@
"typesync": "hypergraph typesync"
},
"dependencies": {
"@graphprotocol/grc-20": "^0.25.2",
"@graphprotocol/grc-20": "^0.27.0",
"@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 @@ -14,7 +14,7 @@ declare module '@tanstack/react-router' {

export function Boot() {
return (
<HypergraphAppProvider syncServerUri="http://localhost:3030" appId="93bb8907-085a-4a0e-83dd-62b0dc98e793">
<HypergraphAppProvider syncServerUri="http://localhost:3030" appId="93bb8907085a4a0e83dd62b0dc98e793">
<RouterProvider router={router} />
</HypergraphAppProvider>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const CreatePropertiesAndTypesEvent = ({ space }: { space: string }) => {
const newMapping = `Event: {
typeIds: [Id('${eventTypeId}')],
properties: {
name: Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
name: Id('a126ca530c8e48d5b88882c734c38935'),
},
relations: {
sponsors: Id('${sponsorsRelationTypeId}'),
Expand All @@ -111,7 +111,7 @@ export const CreatePropertiesAndTypesEvent = ({ space }: { space: string }) => {
Company: {
typeIds: [Id('${companyTypeId}')],
properties: {
name: Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
name: Id('a126ca530c8e48d5b88882c734c38935'),
},
relations: {
jobOffers: Id('${jobOffersRelationTypeId}'),
Expand All @@ -120,7 +120,7 @@ Company: {
JobOffer: {
typeIds: [Id('${jobOfferTypeId}')],
properties: {
name: Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
name: Id('a126ca530c8e48d5b88882c734c38935'),
salary: Id('${salaryPropertyId}'),
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export const CreatePropertiesAndTypesTodos = ({ space }: { space: string }) => {
const newMapping = `Todo2: {
typeIds: [Id('${todoTypeId}')],
properties: {
name: Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
name: Id('a126ca530c8e48d5b88882c734c38935'),
checked: Id('${checkedPropertyId}'),
due: Id('${duePropertyId}'),
point: Id('${pointPropertyId}'),
Expand All @@ -136,7 +136,7 @@ export const CreatePropertiesAndTypesTodos = ({ space }: { space: string }) => {
User: {
typeIds: [Id('${userId}')],
properties: {
name: Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
name: Id('a126ca530c8e48d5b88882c734c38935'),
},
}
`;
Expand Down
56 changes: 28 additions & 28 deletions apps/events/src/mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,67 +3,67 @@ import { Id } from '@graphprotocol/hypergraph';

export const mapping: Mapping.Mapping = {
User: {
typeIds: [Id('bffa181e-a333-495b-949c-57f2831d7eca')],
typeIds: [Id('bffa181ea333495b949c57f2831d7eca')],
properties: {
name: Id('c9c79675-850a-42c5-bbbd-9e5c55d3f4e7'),
name: Id('c9c79675850a42c5bbbd9e5c55d3f4e7'),
},
},
Todo: {
typeIds: [Id('44fe82a9-e4c2-4330-a395-ce85ed78e421')],
typeIds: [Id('44fe82a9e4c24330a395ce85ed78e421')],
properties: {
name: Id('c668aa67-bbca-4b2c-908c-9c5599035eab'),
completed: Id('71e7654f-2623-4794-88fb-841c8f3dd9b4'),
name: Id('c668aa67bbca4b2c908c9c5599035eab'),
completed: Id('71e7654f2623479488fb841c8f3dd9b4'),
},
relations: {
assignees: Id('5b80d3ee-2463-4246-b628-44ba808ab3e1'),
assignees: Id('5b80d3ee24634246b62844ba808ab3e1'),
},
},
Todo2: {
typeIds: [Id('210f4e94-234c-49d7-af0f-f3b74fb07650')],
typeIds: [Id('210f4e94234c49d7af0ff3b74fb07650')],
properties: {
name: Id('e291f4da-632d-4b70-aca8-5c6c01dbf1ca'),
checked: Id('d1cc82ef-8bde-45f4-b31c-56b6d59279ec'),
due: Id('6a28f275-b31c-47bc-83cd-ad416aaa7073'),
amount: Id('0c8219be-e284-4738-bd95-91a1c113c78e'),
point: Id('7f032477-c60e-4c85-a161-019b70db05ca'),
website: Id('75b6a647-5c2b-41e7-92c0-b0a0c9b28b02'),
name: Id('e291f4da632d4b70aca85c6c01dbf1ca'),
checked: Id('d1cc82ef8bde45f4b31c56b6d59279ec'),
due: Id('6a28f275b31c47bc83cdad416aaa7073'),
amount: Id('0c8219bee2844738bd9591a1c113c78e'),
point: Id('7f032477c60e4c85a161019b70db05ca'),
website: Id('75b6a6475c2b41e792c0b0a0c9b28b02'),
},
relations: {
assignees: Id('1115e9f8-db2e-41df-8969-c5d34c367c10'),
assignees: Id('1115e9f8db2e41df8969c5d34c367c10'),
},
},
JobOffer: {
typeIds: [Id('a4c1b288-756e-477b-aab2-007decf01c61')],
typeIds: [Id('a4c1b288756e477baab2007decf01c61')],
properties: {
name: Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
salary: Id('86ff5361-b820-4ba8-b689-b48e815e07d2'),
name: Id('a126ca530c8e48d5b88882c734c38935'),
salary: Id('86ff5361b8204ba8b689b48e815e07d2'),
},
},
Company: {
typeIds: [Id('bcf56f59-c532-47d5-a005-2d802f512c85')],
typeIds: [Id('bcf56f59c53247d5a0052d802f512c85')],
properties: {
name: Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
name: Id('a126ca530c8e48d5b88882c734c38935'),
},
relations: {
jobOffers: Id('54190b30-1c68-499c-9ed8-5c6190810e31'),
jobOffers: Id('54190b301c68499c9ed85c6190810e31'),
},
},
Event: {
typeIds: [Id('239bc639-938e-427c-bebb-d562d82ae272')],
typeIds: [Id('239bc639938e427cbebbd562d82ae272')],
properties: {
name: Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
description: Id('9b1f76ff-9711-404c-861e-59dc3fa7d037'),
name: Id('a126ca530c8e48d5b88882c734c38935'),
description: Id('9b1f76ff9711404c861e59dc3fa7d037'),
},
relations: {
sponsors: Id('926b00ee-68b5-4462-a27f-3806af705118'),
sponsors: Id('926b00ee68b54462a27f3806af705118'),
},
},
Todo3: {
typeIds: [Id('4f7bba76-7855-4d63-b59d-1d9f2be866df')],
typeIds: [Id('4f7bba7678554d63b59d1d9f2be866df')],
properties: {
name: Id('47006386-d351-411c-8287-1dae1c1aa8c1'),
completed: Id('9f9f00eb-4f32-4f71-92ba-b266566d0013'),
description: Id('89cac80a-1dbd-4bca-97b2-45e1556d9122'),
name: Id('47006386d351411c82871dae1c1aa8c1'),
completed: Id('9f9f00eb4f324f7192bab266566d0013'),
description: Id('89cac80a1dbd4bca97b245e1556d9122'),
},
},
};
6 changes: 3 additions & 3 deletions apps/events/src/routes/playground.lazy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ export const Route = createLazyFileRoute('/playground')({
});

function RouteComponent() {
const space = '282aee96-48b0-4c6e-b020-736430a82a87';
const space = '282aee9648b04c6eb020736430a82a87';
return (
<>
<Event spaceId={space} entityId="22aa0386-3365-4425-a60e-eaaec919c034" />
<Event spaceId={space} entityId="22aa038633654425a60eeaaec919c034" />
<Playground spaceId={space} />
{/* <Projects spaceId="3f32353d-3b27-4a13-b71a-746f06e1f7db" /> */}
{/* <Projects spaceId="3f32353d3b274a13b71a746f06e1f7db" /> */}
<HypergraphSpaceProvider space={space}>
<div className="flex flex-col gap-4 max-w-(--breakpoint-sm) mx-auto py-8">
<h1 className="text-2xl font-bold">Playground</h1>
Expand Down
2 changes: 1 addition & 1 deletion apps/events/src/routes/podcasts-infinite.lazy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const Route = createLazyFileRoute('/podcasts-infinite')({
});

function RouteComponent() {
const space = 'e252f9e1-d3ad-4460-8bf1-54f93b02f220';
const space = 'e252f9e1d3ad44608bf154f93b02f220';

const { data, isLoading, isError, fetchNextPage } = useEntitiesPublicInfinite(Podcast, {
first: 2,
Expand Down
17 changes: 7 additions & 10 deletions apps/events/src/routes/podcasts.lazy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const Route = createLazyFileRoute('/podcasts')({
});

function RouteComponent() {
const space = 'e252f9e1-d3ad-4460-8bf1-54f93b02f220';
const space = 'e252f9e1d3ad44608bf154f93b02f220';

// useEffect(() => {
// setTimeout(async () => {
Expand All @@ -27,14 +27,14 @@ function RouteComponent() {
invalidEntity: personInvalidEntity,
invalidRelationEntities: personInvalidRelationEntities,
} = useEntity(Person, {
id: '9800a4e8-8437-4310-9af6-ac91644f7c26',
id: '9800a4e8843743109af6ac91644f7c26',
mode: 'public',
space: '95a4a1cc-bfcc-4038-b7a1-02c513d27700',
space: '95a4a1ccbfcc4038b7a102c513d27700',
include: {
skills: {
_config: {
relationSpaces: ['95a4a1cc-bfcc-4038-b7a1-02c513d27700'],
valueSpaces: ['021265e2-d839-47c3-8d03-0ee3dfb29ffc', '95a4a1cc-bfcc-4038-b7a1-02c513d27700'],
relationSpaces: ['95a4a1ccbfcc4038b7a102c513d27700'],
valueSpaces: ['021265e2d83947c38d030ee3dfb29ffc', '95a4a1ccbfcc4038b7a102c513d27700'],
},
},
skillsTotalCount: true,
Expand All @@ -51,7 +51,7 @@ function RouteComponent() {
invalidEntity,
invalidRelationEntities,
} = useEntity(Podcast, {
id: 'f5d27d3e-3a51-452d-bac2-702574381633',
id: 'f5d27d3e3a51452dbac2702574381633',
mode: 'public',
space: space,
include: {
Expand Down Expand Up @@ -107,10 +107,7 @@ function RouteComponent() {
cover: {
exists: true,
},
or: [
{ id: { is: '01d162e2-6d64-4acb-b0a6-be94169b8746' } },
{ id: { is: '0cd77106-5e1e-4784-96da-e4d191861081' } },
],
or: [{ id: { is: '01d162e26d644acbb0a6be94169b8746' } }, { id: { is: '0cd771065e1e478496dae4d191861081' } }],
},
include: {
cover: {},
Expand Down
Loading
Loading