Skip to content

codegen: Bump minimum 'graph-ts' version required#853

Merged
evaporei merged 1 commit intomainfrom
otavio/bump-minimum-ts-version
Mar 18, 2022
Merged

codegen: Bump minimum 'graph-ts' version required#853
evaporei merged 1 commit intomainfrom
otavio/bump-minimum-ts-version

Conversation

@evaporei
Copy link
Contributor

This is required after graphprotocol/graph-ts#253, otherwise subgraph developers will experience errors like these:

ERROR TS2339: Property 'displayData' does not exist on type '~lib/@graphprotocol/graph-ts/common/value/Value'. Entities of type [removed contract name] must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()} ~~~ in generated/schema.ts(1036,102) ERROR TS2339: Property 'displayKind' does not exist on type '~lib/@graphprotocol/graph-ts/common/value/Value'. Entities of type [removed contract name] must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()} ~~~ in generated/schema.ts(1036,134)

Methods like displayData are available only in graph-ts versions greater than or equal to 0.26.0

@evaporei evaporei requested a review from lutter March 18, 2022 17:42
@evaporei evaporei self-assigned this Mar 18, 2022
@evaporei
Copy link
Contributor Author

evaporei commented Mar 18, 2022

The CI is failing, I'm taking a look into why 🕵️‍♀️

Edit: I figured out why, it's because we clone the example-subgraph and that wasn't up to date, well, just fixed it 👷‍♀️

@evaporei evaporei force-pushed the otavio/bump-minimum-ts-version branch 2 times, most recently from fc64662 to 663439d Compare March 18, 2022 17:55
This is being done because the `displayData` was only
released in @graprotocol/graph-ts@0.25.0, which is now
required in the codegen step.
@evaporei evaporei force-pushed the otavio/bump-minimum-ts-version branch from 663439d to 64ea09e Compare March 18, 2022 18:33
Copy link
Collaborator

@lutter lutter left a comment

Choose a reason for hiding this comment

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

LGTM!

@evaporei evaporei merged commit bfb5584 into main Mar 18, 2022
@evaporei evaporei deleted the otavio/bump-minimum-ts-version branch March 19, 2022 03:27
@evaporei evaporei mentioned this pull request Mar 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants