|
1 | | -import { Field, ID, ObjectType } from "type-graphql"; |
2 | | -import { GraphQLJSON } from "graphql-scalars"; |
3 | | -import type { Json } from "../../../types/supabaseCaching.js"; |
4 | | -import { Hypercert } from "./hypercertTypeDefs.js"; |
5 | | -import { BasicTypeDef } from "./baseTypes/basicTypeDef.js"; |
6 | | -import { EthBigInt } from "../../scalars/ethBigInt.js"; |
| 1 | +import { Field, ObjectType } from "type-graphql"; |
| 2 | +import { AttestationBaseType } from "./baseTypes/attestationBaseType.js"; |
| 3 | +import { HypercertBaseType } from "./baseTypes/hypercertBaseType.js"; |
7 | 4 |
|
8 | | -@ObjectType({ description: "Attestation on the Ethereum Attestation Service" }) |
9 | | -class Attestation extends BasicTypeDef { |
10 | | - @Field(() => ID, { |
| 5 | +@ObjectType({ |
| 6 | + description: "Attestation on the Ethereum Attestation Service", |
| 7 | + simpleResolvers: true, |
| 8 | +}) |
| 9 | +class Attestation extends AttestationBaseType { |
| 10 | + @Field(() => HypercertBaseType, { |
11 | 11 | nullable: true, |
12 | | - description: "ID referencing the supported EAS schema in the database", |
| 12 | + description: "Hypercert related to the attestation", |
13 | 13 | }) |
14 | | - supported_schemas_id?: string; |
15 | | - @Field(() => ID, { |
16 | | - nullable: true, |
17 | | - description: "Unique identifier for the attestation on EAS", |
18 | | - }) |
19 | | - uid?: string; |
20 | | - |
21 | | - @Field(() => EthBigInt, { |
22 | | - nullable: true, |
23 | | - description: "Block number at which the attestation was created", |
24 | | - }) |
25 | | - creation_block_number?: bigint | number | string; |
26 | | - @Field(() => EthBigInt, { |
27 | | - nullable: true, |
28 | | - description: "Timestamp at which the attestation was created", |
29 | | - }) |
30 | | - creation_block_timestamp?: bigint | number | string; |
31 | | - @Field(() => EthBigInt, { |
32 | | - nullable: true, |
33 | | - description: "Block number at which the attestation was last updated", |
34 | | - }) |
35 | | - last_update_block_number?: bigint | number | string; |
36 | | - @Field(() => EthBigInt, { |
37 | | - nullable: true, |
38 | | - description: "Timestamp at which the attestation was last updated", |
39 | | - }) |
40 | | - last_update_block_timestamp?: bigint | number | string; |
41 | | - |
42 | | - @Field({ |
43 | | - nullable: true, |
44 | | - description: "Address of the creator of the attestation", |
45 | | - }) |
46 | | - attester?: string; |
47 | | - @Field({ |
48 | | - nullable: true, |
49 | | - description: "Address of the recipient of the attestation", |
50 | | - }) |
51 | | - recipient?: string; |
52 | | - @Field({ |
53 | | - nullable: true, |
54 | | - description: "Address of the resolver contract for the attestation", |
55 | | - }) |
56 | | - resolver?: string; |
57 | | - @Field({ |
58 | | - nullable: true, |
59 | | - description: |
60 | | - "Unique identifier of the EAS schema used to create the attestation", |
61 | | - }) |
62 | | - schema?: string; |
63 | | - @Field(() => GraphQLJSON, { |
64 | | - nullable: true, |
65 | | - description: "Encoded data of the attestation", |
66 | | - }) |
67 | | - data?: Json; |
68 | | - |
69 | | - @Field(() => [Hypercert], { |
70 | | - nullable: true, |
71 | | - description: "List of hypercerts related to the attestation", |
72 | | - }) |
73 | | - hypercerts?: Hypercert[]; |
| 14 | + hypercert?: HypercertBaseType; |
74 | 15 | } |
75 | 16 |
|
76 | 17 | export { Attestation }; |
0 commit comments