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
10 changes: 10 additions & 0 deletions .changeset/lovely-beans-stick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@graphprotocol/hypergraph-react": patch
"@graphprotocol/hypergraph": patch
"@graphprotocol/typesync": patch
"@graphprotocol/hypergraph-cli": patch
"connect": patch
---

update grc-20 library

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.1",
"@graphprotocol/grc-20": "^0.21.6",
"@graphprotocol/grc-20": "^0.23.1",
"@graphprotocol/hypergraph": "workspace:*",
"@graphprotocol/hypergraph-react": "workspace:*",
"@heroicons/react": "^2.2.0",
Expand Down
10 changes: 5 additions & 5 deletions apps/create-hypergraph/template-nextjs/app/mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ import type { Mapping } from '@graphprotocol/hypergraph';

export const mapping: Mapping.Mapping = {
Address: {
typeIds: [Id.Id('5c6e72fb-8340-47c0-8281-8be159ecd495')],
typeIds: [Id('5c6e72fb-8340-47c0-8281-8be159ecd495')],
properties: {
name: Id.Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
description: Id.Id('9b1f76ff-9711-404c-861e-59dc3fa7d037'),
name: Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
description: Id('9b1f76ff-9711-404c-861e-59dc3fa7d037'),
},
},
Project: {
typeIds: [Id.Id('484a18c5-030a-499c-b0f2-ef588ff16d50')],
typeIds: [Id('484a18c5-030a-499c-b0f2-ef588ff16d50')],
properties: {
name: Id.Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
name: Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
},
},
};
2 changes: 1 addition & 1 deletion apps/create-hypergraph/template-nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"type": "module",
"dependencies": {
"@graphprotocol/grc-20": "^0.21.6",
"@graphprotocol/grc-20": "^0.23.1",
"@graphprotocol/hypergraph": "workspace:*",
"@graphprotocol/hypergraph-react": "workspace:*",
"@radix-ui/react-navigation-menu": "^1.2.13",
Expand Down
2 changes: 1 addition & 1 deletion apps/create-hypergraph/template-vite-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@graphprotocol/grc-20": "^0.21.6",
"@graphprotocol/grc-20": "^0.23.1",
"@graphprotocol/hypergraph": "workspace:*",
"@graphprotocol/hypergraph-react": "workspace:*",
"@radix-ui/react-navigation-menu": "^1.2.13",
Expand Down
10 changes: 5 additions & 5 deletions apps/create-hypergraph/template-vite-react/src/mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ import type { Mapping } from '@graphprotocol/hypergraph';

export const mapping: Mapping.Mapping = {
Address: {
typeIds: [Id.Id('5c6e72fb-8340-47c0-8281-8be159ecd495')],
typeIds: [Id('5c6e72fb-8340-47c0-8281-8be159ecd495')],
properties: {
name: Id.Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
description: Id.Id('9b1f76ff-9711-404c-861e-59dc3fa7d037'),
name: Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
description: Id('9b1f76ff-9711-404c-861e-59dc3fa7d037'),
},
},
Project: {
typeIds: [Id.Id('484a18c5-030a-499c-b0f2-ef588ff16d50')],
typeIds: [Id('484a18c5-030a-499c-b0f2-ef588ff16d50')],
properties: {
name: Id.Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
name: Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
},
},
};
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.21.6",
"@graphprotocol/grc-20": "^0.23.1",
"@graphprotocol/hypergraph": "workspace:*",
"@graphprotocol/hypergraph-react": "workspace:*",
"@noble/hashes": "^1.8.0",
Expand Down
18 changes: 9 additions & 9 deletions apps/events/src/components/create-properties-and-types-event.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,28 +100,28 @@ export const CreatePropertiesAndTypesEvent = ({ space }: { space: string }) => {
});

const newMapping = `Event: {
typeIds: [Id.Id('${eventTypeId}')],
typeIds: [Id('${eventTypeId}')],
properties: {
name: Id.Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
name: Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
},
relations: {
sponsors: Id.Id('${sponsorsRelationTypeId}'),
sponsors: Id('${sponsorsRelationTypeId}'),
},
},
Company: {
typeIds: [Id.Id('${companyTypeId}')],
typeIds: [Id('${companyTypeId}')],
properties: {
name: Id.Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
name: Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
},
relations: {
jobOffers: Id.Id('${jobOffersRelationTypeId}'),
jobOffers: Id('${jobOffersRelationTypeId}'),
},
},
JobOffer: {
typeIds: [Id.Id('${jobOfferTypeId}')],
typeIds: [Id('${jobOfferTypeId}')],
properties: {
name: Id.Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
salary: Id.Id('${salaryPropertyId}'),
name: Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
salary: Id('${salaryPropertyId}'),
},
},
`;
Expand Down
20 changes: 10 additions & 10 deletions apps/events/src/components/create-properties-and-types-todos.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,23 +120,23 @@ export const CreatePropertiesAndTypesTodos = ({ space }: { space: string }) => {
});

const newMapping = `Todo2: {
typeIds: [Id.Id('${todoTypeId}')],
typeIds: [Id('${todoTypeId}')],
properties: {
name: Id.Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
checked: Id.Id('${checkedPropertyId}'),
due: Id.Id('${duePropertyId}'),
point: Id.Id('${pointPropertyId}'),
website: Id.Id('${websitePropertyId}'),
amount: Id.Id('${amountPropertyId}'),
name: Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
checked: Id('${checkedPropertyId}'),
due: Id('${duePropertyId}'),
point: Id('${pointPropertyId}'),
website: Id('${websitePropertyId}'),
amount: Id('${amountPropertyId}'),
},
relations: {
assignees: Id.Id('${assigneesRelationTypeId}'),
assignees: Id('${assigneesRelationTypeId}'),
},
},
User: {
typeIds: [Id.Id('${userId}')],
typeIds: [Id('${userId}')],
properties: {
name: Id.Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
name: Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
},
}
`;
Expand Down
40 changes: 20 additions & 20 deletions apps/events/src/mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,50 @@ import type { Mapping } from '@graphprotocol/hypergraph';

export const mapping: Mapping.Mapping = {
Event: {
typeIds: [Id.Id('7f9562d4-034d-4385-bf5c-f02cdebba47a')],
typeIds: [Id('7f9562d4-034d-4385-bf5c-f02cdebba47a')],
properties: {
name: Id.Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
description: Id.Id('9b1f76ff-9711-404c-861e-59dc3fa7d037'),
name: Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
description: Id('9b1f76ff-9711-404c-861e-59dc3fa7d037'),
},
relations: {
sponsors: Id.Id('6860bfac-f703-4289-b789-972d0aaf3abe'),
sponsors: Id('6860bfac-f703-4289-b789-972d0aaf3abe'),
},
},
Company: {
typeIds: [Id.Id('6c504df5-1a8f-43d1-bf2d-1ef9fa5b08b5')],
typeIds: [Id('6c504df5-1a8f-43d1-bf2d-1ef9fa5b08b5')],
properties: {
name: Id.Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
name: Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
},
relations: {
jobOffers: Id.Id('1203064e-9741-4235-89d4-97f4b22eddfb'),
jobOffers: Id('1203064e-9741-4235-89d4-97f4b22eddfb'),
},
},
JobOffer: {
typeIds: [Id.Id('f60585af-71b6-4674-9a26-b74ca6c1cceb')],
typeIds: [Id('f60585af-71b6-4674-9a26-b74ca6c1cceb')],
properties: {
name: Id.Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
salary: Id.Id('baa36ac9-78ac-4cf7-8394-6b2d3006bebe'),
name: Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
salary: Id('baa36ac9-78ac-4cf7-8394-6b2d3006bebe'),
},
},

// Todo2: {
// typeIds: [Id.Id('LJuM8ju67mCv78FhAiK9k9')],
// typeIds: [Id('LJuM8ju67mCv78FhAiK9k9')],
// properties: {
// name: Id.Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
// checked: Id.Id('Ud9kn9gAUsCr1pxvxcgDj8'),
// due: Id.Id('CFisPgjjWVdnaMtSWJDBqA'),
// point: Id.Id('BkcVo7JZHF5LsWw7XZJwwe'),
// website: Id.Id('XZmLQ8XyaUHnNWgSSbzaHU'),
// amount: Id.Id('LfzKTfgy5Qg3PxAfKB2BL7'),
// name: Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
// checked: Id('Ud9kn9gAUsCr1pxvxcgDj8'),
// due: Id('CFisPgjjWVdnaMtSWJDBqA'),
// point: Id('BkcVo7JZHF5LsWw7XZJwwe'),
// website: Id('XZmLQ8XyaUHnNWgSSbzaHU'),
// amount: Id('LfzKTfgy5Qg3PxAfKB2BL7'),
// },
// relations: {
// assignees: Id.Id('HCdFcTRyMyZMXScKox738i'),
// assignees: Id('HCdFcTRyMyZMXScKox738i'),
// },
// },
// User: {
// typeIds: [Id.Id('Fk5qzwdpKsD35gm5ts4SZA')],
// typeIds: [Id('Fk5qzwdpKsD35gm5ts4SZA')],
// properties: {
// name: Id.Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
// name: Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
// },
// },
};
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.21.6",
"@graphprotocol/grc-20": "^0.23.1",
"@graphprotocol/hypergraph": "workspace:*",
"@graphprotocol/hypergraph-react": "workspace:*",
"next": "15.3.2",
Expand Down
8 changes: 4 additions & 4 deletions apps/typesync/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@
"@types/react-dom": "^19.1.6",
"@vitejs/plugin-react": "^4.6.0",
"glob": "^11.0.3",
"rimraf": "^6.0.1",
"tsup": "^8.5.0",
"tsx": "^4.20.3",
"vite": "^7.0.4",
"rimraf": "^6.0.1"
"vite": "^7.0.4"
},
"dependencies": {
"@graphql-typed-document-node/core": "^3.2.0",
"@graphprotocol/grc-20": "^0.21.6",
"@graphprotocol/grc-20": "^0.23.1",
"@graphprotocol/typesync": "^0.0.3",
"@graphql-typed-document-node/core": "^3.2.0",
"@headlessui/react": "^2.2.4",
"@heroicons/react": "^2.2.0",
"@phosphor-icons/react": "^2.1.10",
Expand Down
6 changes: 3 additions & 3 deletions apps/typesync/src/Generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ export function buildMappingFile(schema: Domain.InsertAppSchema) {
mappingLines.push(Doc.text(` ${typeName}: {`));

// Type IDs
const typeIdsList = typeData.typeIds.map((id: string) => `Id.Id("${id}")`).join(', ');
const typeIdsList = typeData.typeIds.map((id: string) => `Id("${id}")`).join(', ');
mappingLines.push(Doc.text(` typeIds: [${typeIdsList}],`));

// Properties
Expand All @@ -388,7 +388,7 @@ export function buildMappingFile(schema: Domain.InsertAppSchema) {
properties.forEach(([propName, propId], index, entries) => {
const isLast = index === entries.length - 1;
const comma = isLast ? '' : ',';
mappingLines.push(Doc.text(` ${propName}: Id.Id("${propId}")${comma}`));
mappingLines.push(Doc.text(` ${propName}: Id("${propId}")${comma}`));
});
mappingLines.push(Doc.text(' },'));
}
Expand All @@ -400,7 +400,7 @@ export function buildMappingFile(schema: Domain.InsertAppSchema) {
relations.forEach(([relationName, relationId], index, entries) => {
const isLast = index === entries.length - 1;
const comma = isLast ? '' : ',';
mappingLines.push(Doc.text(` ${relationName}: Id.Id("${relationId}")${comma}`));
mappingLines.push(Doc.text(` ${relationName}: Id("${relationId}")${comma}`));
});
mappingLines.push(Doc.text(' },'));
}
Expand Down
14 changes: 7 additions & 7 deletions apps/typesync/test/Generator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ import type { Mapping } from '@graphprotocol/typesync/Mapping';
export const mapping: Mapping = {
Space: {
typeIds: [Id.Id("362c1dbd-dc64-44bb-a3c4-652f38a642d7")],
typeIds: [Id("362c1dbd-dc64-44bb-a3c4-652f38a642d7")],
properties: {
name: Id.Id("a126ca53-0c8e-48d5-b888-82c734c38935"),
description: Id.Id("9b1f76ff-9711-404c-861e-59dc3fa7d037")
name: Id("a126ca53-0c8e-48d5-b888-82c734c38935"),
description: Id("9b1f76ff-9711-404c-861e-59dc3fa7d037")
},
},
Activity: {
typeIds: [Id.Id("8275c359-4662-40fb-9aec-27177b520cd2")],
typeIds: [Id("8275c359-4662-40fb-9aec-27177b520cd2")],
properties: {
name: Id.Id("a126ca53-0c8e-48d5-b888-82c734c38935"),
description: Id.Id("9b1f76ff-9711-404c-861e-59dc3fa7d037")
name: Id("a126ca53-0c8e-48d5-b888-82c734c38935"),
description: Id("9b1f76ff-9711-404c-861e-59dc3fa7d037")
},
relations: {
relatedSpaces: Id.Id("5b722cd3-61d6-494e-8887-1310566437ba")
relatedSpaces: Id("5b722cd3-61d6-494e-8887-1310566437ba")
},
},
}`;
Expand Down
10 changes: 5 additions & 5 deletions docs/docs/mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ A mapping entry defines the type IDs, properties and relations of a type. Here i
```tsx
export const mapping: Mapping = {
Event: {
typeIds: [Id.Id('407d9e8a-c703-4fb4-830d-98c758c8564e')],
typeIds: [Id('407d9e8a-c703-4fb4-830d-98c758c8564e')],
properties: {
name: Id.Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
name: Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
},
relations: {
sponsors: Id.Id('a7ac80a6-d3d9-4b04-9b9f-ead1723af09f'),
sponsors: Id('a7ac80a6-d3d9-4b04-9b9f-ead1723af09f'),
},
},
Company: {
typeIds: [Id.Id('b0220a78-9205-4e5e-9bf1-c03ee0791e23')],
typeIds: [Id('b0220a78-9205-4e5e-9bf1-c03ee0791e23')],
properties: {
name: Id.Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
name: Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
},
},
```
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/typesync.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ import type { Mapping } from '@graphprotocol/typesync/Mapping';
export const mapping: Mapping = {
AcademicYear: {
typeIds: [Id.Id("27e097b7-fba0-4fdd-a264-b0ed70f79e0a")],
typeIds: [Id("27e097b7-fba0-4fdd-a264-b0ed70f79e0a")],
properties: {
description: Id.Id("9b1f76ff-9711-404c-861e-59dc3fa7d037"),
name: Id.Id("a126ca53-0c8e-48d5-b888-82c734c38935")
description: Id("9b1f76ff-9711-404c-861e-59dc3fa7d037"),
name: Id("a126ca53-0c8e-48d5-b888-82c734c38935")
},
},
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@babel/core": "^7.28.0",
"@biomejs/biome": "^2.1.2",
"@changesets/cli": "^2.29.5",
"@graphprotocol/grc-20": "^0.21.6",
"@graphprotocol/grc-20": "^0.23.1",
"babel-plugin-annotate-pure-calls": "^0.5.0",
"glob": "^11.0.3",
"pkg-pr-new": "^0.0.54",
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": "^2.2.9",
"@automerge/automerge-repo": "^2.0.6",
"@automerge/automerge-repo-react-hooks": "^2.0.6",
"@graphprotocol/grc-20": "^0.21.6",
"@graphprotocol/grc-20": "^0.23.1",
"@noble/hashes": "^1.8.0",
"@tanstack/react-query": "^5.75.5",
"effect": "^3.17.3",
Expand Down
Loading
Loading