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
5 changes: 5 additions & 0 deletions .changeset/odd-rats-look.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@graphprotocol/grc-20": minor
---

Update `QUOTES_THAT_SUPPORT_CLAIMS_PROPERTY` and `ACADEMIC_FIELD_TYPE` values to be valid IDs
Copy link
Contributor

Choose a reason for hiding this comment

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

We'll need to figure out the migration path for these since there's already data in the mainnet KG using these ids.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What's KG?

One thing we could do is simply create new entities and change the entries manually. In this case in old version we still have old versions pointing to invalid IDs, but since the data is already on chain we can't do a simply SQL migration script or can we?

5 changes: 5 additions & 0 deletions .changeset/spicy-readers-shake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@graphprotocol/grc-20": minor
---

IDs now use a branded type `Id` instead of `string` and validate every ID param
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ const { id: restaurantId, ops: createRestaurantOps } = Graph.createEntity({
// relation property
[propertyId]: {
to: 'id of the entity',
relationId: 'id of the relation', // optional
position: positionString, // optional
properties: {
[propertyId]: {
type: 'TEXT', // TEXT | NUMBER | URL | TIME | POINT | CHECKBOX,
value: 'value of the property',
},
},
},
},
});
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,18 @@
"@changesets/cli": "^2.27.12",
"@ethersproject/abi": "^5.6.4",
"@ethersproject/providers": "^5.6.8",
"@types/uuid": "^9.0.8",
"effect": "^3.12.11",
"ethers": "^5.7.2",
"position-strings": "^2.0.1",
"uuid": "^9.0.0",
"uuid": "^11.1.0",
"viem": "^1.16.0",
"vite": "^5.2.11",
"vitest": "^1.6.0"
},
"devDependencies": {
"@bufbuild/buf": "^1.31.0",
"@bufbuild/protoc-gen-es": "^1.9.0",
"@types/uuid": "^10.0.0",
"typescript": "^5.4.5"
},
"packageManager": "[email protected]"
Expand Down
22 changes: 11 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading