Skip to content
Open
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
15 changes: 15 additions & 0 deletions src/Entity/Objkt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
14 changes: 14 additions & 0 deletions src/Resolver/ObjktResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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."
})
Expand Down