Skip to content

Commit 82d5468

Browse files
committed
feat(hypercert): add HypercertWithMetadata type and update Order type reference
- Introduced a new HypercertWithMetadata class to include metadata in hypercerts. - Updated the Order type to reference HypercertWithMetadata instead of HypercertBaseType.
1 parent 0c24789 commit 82d5468

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

src/graphql/schemas/typeDefs/hypercertTypeDefs.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,20 @@ export class Hypercert extends HypercertBaseType {
6565
sales?: GetSalesResponse;
6666
}
6767

68+
@ObjectType({
69+
description:
70+
"Hypercert with metadata, contract, orders, sales and fraction information",
71+
simpleResolvers: true,
72+
})
73+
export class HypercertWithMetadata extends HypercertBaseType {
74+
// Resolved fields
75+
@Field(() => Metadata, {
76+
nullable: true,
77+
description: "The metadata for the hypercert as referenced by the uri",
78+
})
79+
metadata?: Metadata;
80+
}
81+
6882
@ObjectType({
6983
description:
7084
"Hypercert with metadata, contract, orders, sales and fraction information",

src/graphql/schemas/typeDefs/orderTypeDefs.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { DataResponse } from "../../../lib/graphql/DataResponse.js";
33
import { EthBigInt } from "../../scalars/ethBigInt.js";
44
import { BasicTypeDef } from "./baseTypes/basicTypeDef.js";
55
import { HypercertBaseType } from "./baseTypes/hypercertBaseType.js";
6+
import { HypercertWithMetadata } from "./hypercertTypeDefs.js";
67

78
@ObjectType({
89
description: "Marketplace order for a hypercert",
@@ -56,7 +57,7 @@ export class Order extends BasicTypeDef {
5657
@Field()
5758
pricePerPercentInToken?: string;
5859

59-
@Field(() => HypercertBaseType, {
60+
@Field(() => HypercertWithMetadata, {
6061
nullable: true,
6162
description: "The hypercert associated with this order",
6263
})

0 commit comments

Comments
 (0)