Skip to content

Commit 3c53a12

Browse files
authored
fix(#392 | move typesync api): update create-hypergraph templates to use Mapping exported from @graphprotocol/hypergraph (#394)
1 parent fbbd71b commit 3c53a12

File tree

7 files changed

+13
-16
lines changed

7 files changed

+13
-16
lines changed

.changeset/metal-mangos-dig.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"create-hypergraph": minor
3+
---
4+
5+
Update templates to use Mapping exported from @graphprotocol/hypergraph package. Remove @graphprotocol/typesync dep from templates'
6+

apps/create-hypergraph/scripts/copy-template-dir.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,8 @@ const workspaceDepsToReplace = {
1313
'@graphprotocol/hypergraph-react': {
1414
packageJson: 'packages/hypergraph-react/package.json',
1515
},
16-
'@graphprotocol/typesync': {
17-
packageJson: 'packages/typesync/package.json',
18-
},
1916
} as const satisfies Record<
20-
'@graphprotocol/hypergraph' | '@graphprotocol/hypergraph-react' | '@graphprotocol/typesync',
17+
'@graphprotocol/hypergraph' | '@graphprotocol/hypergraph-react',
2118
{ packageJson: `packages/${string}/package.json` }
2219
>;
2320
const ignore = new Set(['.git', 'node_modules', '.tanstack', 'dist', 'publish', 'build', '.next']);

apps/create-hypergraph/template-nextjs/app/mapping.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Id } from '@graphprotocol/grc-20';
2-
import type { Mapping } from '@graphprotocol/typesync/Mapping';
2+
import type { Mapping } from '@graphprotocol/hypergraph';
33

4-
export const mapping: Mapping = {
4+
export const mapping: Mapping.Mapping = {
55
Address: {
66
typeIds: [Id.Id('5c6e72fb-8340-47c0-8281-8be159ecd495')],
77
properties: {

apps/create-hypergraph/template-nextjs/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"@graphprotocol/grc-20": "^0.21.6",
1919
"@graphprotocol/hypergraph": "workspace:*",
2020
"@graphprotocol/hypergraph-react": "workspace:*",
21-
"@graphprotocol/typesync": "workspace:*",
2221
"@radix-ui/react-navigation-menu": "^1.2.13",
2322
"@radix-ui/react-slot": "^1.2.3",
2423
"@radix-ui/react-tooltip": "^1.2.7",

apps/create-hypergraph/template-vite-react/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"@graphprotocol/grc-20": "^0.21.6",
1515
"@graphprotocol/hypergraph": "workspace:*",
1616
"@graphprotocol/hypergraph-react": "workspace:*",
17-
"@graphprotocol/typesync": "workspace:*",
1817
"@radix-ui/react-navigation-menu": "^1.2.13",
1918
"@radix-ui/react-slot": "^1.2.3",
2019
"@radix-ui/react-tooltip": "^1.2.7",

apps/create-hypergraph/template-vite-react/src/mapping.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Id } from '@graphprotocol/grc-20';
2-
import type { Mapping } from '@graphprotocol/typesync/Mapping';
2+
import type { Mapping } from '@graphprotocol/hypergraph';
33

4-
export const mapping: Mapping = {
4+
export const mapping: Mapping.Mapping = {
55
Address: {
66
typeIds: [Id.Id('5c6e72fb-8340-47c0-8281-8be159ecd495')],
77
properties: {

pnpm-lock.yaml

Lines changed: 2 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)