Moving from 0.34.0 to 0.47.0, issue with default values
vrde opened this issue Β· comments
π I've upgraded from 0.34.0
to 0.47.0
. I noticed that the generated schemas are now missing the default values, see example below
0.34.0
export class Resolution extends Entity {
constructor(id: string) {
super();
this.set("id", Value.fromString(id));
this.set("snapshotId", Value.fromBigInt(BigInt.zero()));
this.set("ipfsDataURI", Value.fromString(""));
this.set("isNegative", Value.fromBoolean(false));
this.set("yesVotesTotal", Value.fromBigInt(BigInt.zero()));
this.set("resolutionType", Value.fromString(""));
this.set("createTimestamp", Value.fromBigInt(BigInt.zero()));
this.set("updateTimestamp", Value.fromBigInt(BigInt.zero()));
this.set("approveTimestamp", Value.fromBigInt(BigInt.zero()));
this.set("rejectTimestamp", Value.fromBigInt(BigInt.zero()));
this.set("createBy", Value.fromBytes(Bytes.empty()));
this.set("voters", Value.fromStringArray(new Array(0)));
this.set("hasQuorum", Value.fromBoolean(false));
this.set("executionTo", Value.fromBytesArray(new Array(0)));
this.set("executionData", Value.fromBytesArray(new Array(0)));
}
// ...
0.47.0
export class Resolution extends Entity {
constructor(id: string) {
super();
this.set("id", Value.fromString(id));
}
// ...
Question
Is there any flag I need to pass to the generator to create the missing default values?
Is this related to Graph Client or Graph CLI?
Is this related to Graph Client or Graph CLI?
I got confused, it should be the CLI. Is this the right repo https://github.com/graphprotocol/graph-tooling ?
Yes you can create your issue there.