Skip to content

Commit 05b1e8d

Browse files
committed
fix: make graphql types match typescript
Typescript says this id is optional, but the GraphQL type inferred from the decorator said it wasn't. This fixes the mismatch. As a side effect, this also updated the ids in schema.graphql.
1 parent 03b2432 commit 05b1e8d

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

schema.graphql

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type AllowlistRecord {
1313

1414
"""The hypercert ID the claimable fraction belongs to"""
1515
hypercert_id: String
16-
id: ID!
16+
id: ID
1717

1818
"""The leaf of the Merkle tree for the claimable fraction"""
1919
leaf: String
@@ -83,7 +83,7 @@ type Attestation {
8383

8484
"""Hypercert related to the attestation"""
8585
hypercert: HypercertBaseType
86-
id: ID!
86+
id: ID
8787

8888
"""Block number at which the attestation was last updated"""
8989
last_update_block_number: EthBigInt
@@ -115,7 +115,7 @@ input AttestationFetchInput {
115115
type AttestationSchema {
116116
"""Chain ID of the chains where the attestation schema is supported"""
117117
chain_id: EthBigInt
118-
id: ID!
118+
id: ID
119119

120120
"""List of attestations related to the attestation schema"""
121121
records: [Attestation!]
@@ -286,7 +286,7 @@ type Collection {
286286

287287
"""Description of the collection"""
288288
description: String!
289-
id: ID!
289+
id: ID
290290

291291
"""Name of the collection"""
292292
name: String!
@@ -299,7 +299,7 @@ type Contract {
299299

300300
"""The address of the contract"""
301301
contract_address: String
302-
id: ID!
302+
id: ID
303303

304304
"""The block number at which the contract was deployed"""
305305
start_block: EthBigInt
@@ -341,7 +341,7 @@ type Fraction {
341341
The ID of the fraction concatenated from the chain ID, contract address, and ID of the hypercert claim
342342
"""
343343
hypercert_id: ID
344-
id: ID!
344+
id: ID
345345

346346
"""Block number of the last update of the fraction"""
347347
last_update_block_number: EthBigInt
@@ -482,7 +482,7 @@ type Hyperboard {
482482

483483
"""Whether the hyperboard should be rendered as a grayscale image"""
484484
grayscale_images: Boolean
485-
id: ID!
485+
id: ID
486486

487487
"""Name of the hyperboard"""
488488
name: String!
@@ -555,7 +555,7 @@ type Hypercert {
555555
Concatenation of [chainID]-[contractAddress]-[tokenID] to discern hypercerts across chains
556556
"""
557557
hypercert_id: ID
558-
id: ID!
558+
id: ID
559559
last_update_block_number: EthBigInt
560560
last_update_block_timestamp: EthBigInt
561561

@@ -597,7 +597,7 @@ type HypercertBaseType {
597597
Concatenation of [chainID]-[contractAddress]-[tokenID] to discern hypercerts across chains
598598
"""
599599
hypercert_id: ID
600-
id: ID!
600+
id: ID
601601
last_update_block_number: EthBigInt
602602
last_update_block_timestamp: EthBigInt
603603

@@ -682,7 +682,7 @@ type Metadata {
682682

683683
"""References additional information related to the hypercert"""
684684
external_url: String
685-
id: ID!
685+
id: ID
686686

687687
"""Base64 encoded representation of the image of the hypercert"""
688688
image: String
@@ -780,7 +780,7 @@ type Order {
780780
"""The hypercert associated with this order"""
781781
hypercert: HypercertBaseType
782782
hypercert_id: String!
783-
id: ID!
783+
id: ID
784784
invalidated: Boolean!
785785
itemIds: [String!]!
786786
orderNonce: String!
@@ -868,7 +868,7 @@ type Sale {
868868

869869
"""The ID of the hypercert token referenced in the order"""
870870
hypercert_id: String
871-
id: ID!
871+
id: ID
872872

873873
"""Token ids of the sold fractions"""
874874
item_ids: [EthBigInt!]

src/graphql/schemas/typeDefs/baseTypes/basicTypeDef.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Field, ID, ObjectType } from "type-graphql";
22

33
@ObjectType()
44
class BasicTypeDef {
5-
@Field(() => ID)
5+
@Field(() => ID, { nullable: true })
66
id?: string;
77
}
88

0 commit comments

Comments
 (0)