diff --git a/src/Entity/Objkt.ts b/src/Entity/Objkt.ts index 20070f8..c8590c8 100644 --- a/src/Entity/Objkt.ts +++ b/src/Entity/Objkt.ts @@ -103,6 +103,21 @@ export class Objkt extends BaseEntity { @Column({ nullable: true }) metadataUri: string + @Field({ + nullable: true, + description: + "IPFS uri pointing to the 300x300 (contained) thumbnail of the gentk", + }) + @Column({ nullable: true }) + thumbnailUri?: string; + + @Field({ + nullable: true, + description: "IPFS uri pointing to the full res image of the gentk", + }) + @Column({ nullable: true }) + displayUri?: string; + @Field(() => [String], { nullable: true, description: "A list of tags, set by the author(s) at mint time. Corresponds the the Generative Token tags." diff --git a/src/Resolver/ObjktResolver.ts b/src/Resolver/ObjktResolver.ts index 2060db2..31ec741 100644 --- a/src/Resolver/ObjktResolver.ts +++ b/src/Resolver/ObjktResolver.ts @@ -47,6 +47,20 @@ export class ObjktResolver { return ctx.genTokLoader.load(objkt.issuerId) } + @FieldResolver((returns) => String, { + description: "IPFS uri pointing to the 300x300 (contained) thumbnail", + }) + thumbnailUri(@Root() objkt: Objkt, @Ctx() ctx: RequestContext) { + return objkt.metadata?.thumbnailUri; + } + + @FieldResolver((returns) => String, { + description: "IPFS uri pointing to the full res image", + }) + displayUri(@Root() objkt: Objkt, @Ctx() ctx: RequestContext) { + return objkt.metadata?.displayUri; + } + @FieldResolver(returns => [Split], { description: "A list of the royalties split for this gentk." })