Skip to content

Commit 0dabf75

Browse files
committed
Fix: Add typeVersion to GraphQL query response fields
- Add typeVersion field to all entry response blocks in GraphQL queries - Regenerate SDK to include typeVersion in TypeScript types - Fixes TypeScript errors in tests that check typeVersion
1 parent 723c48b commit 0dabf75

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

‎tests/fixtures/generated-test-client.ts‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3092,7 +3092,7 @@ export type PostUserFundsAccountMutationVariables = Exact<{
30923092
}>;
30933093

30943094

3095-
export type PostUserFundsAccountMutation = { __typename?: 'Mutation', addLedgerEntry: { __typename: 'AddLedgerEntryResult', isIkReplay: boolean, entry: { __typename?: 'LedgerEntry', ik: string, id: string, created: string, type?: string | null, posted: string, description?: string | null, ledger: { __typename?: 'Ledger', ik: string }, tags: Array<{ __typename?: 'LedgerEntryTag', key: string, value: string }>, groups: Array<{ __typename?: 'LedgerEntryGroup', key: string, value: string }> }, lines: Array<{ __typename?: 'LedgerLine', amount: string, key?: string | null, account: { __typename?: 'LedgerAccount', path: string }, currency?: { __typename?: 'Currency', code: CurrencyCode, customCurrencyId?: string | null } | null }> } | { __typename: 'BadRequestError', code: string, message: string, retryable: boolean } | { __typename: 'InternalError', code: string, message: string, retryable: boolean } };
3095+
export type PostUserFundsAccountMutation = { __typename?: 'Mutation', addLedgerEntry: { __typename: 'AddLedgerEntryResult', isIkReplay: boolean, entry: { __typename?: 'LedgerEntry', ik: string, id: string, created: string, type?: string | null, typeVersion?: number | null, posted: string, description?: string | null, ledger: { __typename?: 'Ledger', ik: string }, tags: Array<{ __typename?: 'LedgerEntryTag', key: string, value: string }>, groups: Array<{ __typename?: 'LedgerEntryGroup', key: string, value: string }> }, lines: Array<{ __typename?: 'LedgerLine', amount: string, key?: string | null, account: { __typename?: 'LedgerAccount', path: string }, currency?: { __typename?: 'Currency', code: CurrencyCode, customCurrencyId?: string | null } | null }> } | { __typename: 'BadRequestError', code: string, message: string, retryable: boolean } | { __typename: 'InternalError', code: string, message: string, retryable: boolean } };
30963096

30973097
export type PostUserFundsAccount_V2MutationVariables = Exact<{
30983098
ik: Scalars['SafeString']['input'];
@@ -3103,7 +3103,7 @@ export type PostUserFundsAccount_V2MutationVariables = Exact<{
31033103
}>;
31043104

31053105

3106-
export type PostUserFundsAccount_V2Mutation = { __typename?: 'Mutation', addLedgerEntry: { __typename: 'AddLedgerEntryResult', isIkReplay: boolean, entry: { __typename?: 'LedgerEntry', ik: string, id: string, created: string, type?: string | null, posted: string, description?: string | null, ledger: { __typename?: 'Ledger', ik: string }, tags: Array<{ __typename?: 'LedgerEntryTag', key: string, value: string }>, groups: Array<{ __typename?: 'LedgerEntryGroup', key: string, value: string }> }, lines: Array<{ __typename?: 'LedgerLine', amount: string, key?: string | null, account: { __typename?: 'LedgerAccount', path: string }, currency?: { __typename?: 'Currency', code: CurrencyCode, customCurrencyId?: string | null } | null }> } | { __typename: 'BadRequestError', code: string, message: string, retryable: boolean } | { __typename: 'InternalError', code: string, message: string, retryable: boolean } };
3106+
export type PostUserFundsAccount_V2Mutation = { __typename?: 'Mutation', addLedgerEntry: { __typename: 'AddLedgerEntryResult', isIkReplay: boolean, entry: { __typename?: 'LedgerEntry', ik: string, id: string, created: string, type?: string | null, typeVersion?: number | null, posted: string, description?: string | null, ledger: { __typename?: 'Ledger', ik: string }, tags: Array<{ __typename?: 'LedgerEntryTag', key: string, value: string }>, groups: Array<{ __typename?: 'LedgerEntryGroup', key: string, value: string }> }, lines: Array<{ __typename?: 'LedgerLine', amount: string, key?: string | null, account: { __typename?: 'LedgerAccount', path: string }, currency?: { __typename?: 'Currency', code: CurrencyCode, customCurrencyId?: string | null } | null }> } | { __typename: 'BadRequestError', code: string, message: string, retryable: boolean } | { __typename: 'InternalError', code: string, message: string, retryable: boolean } };
31073107

31083108
export type PostFundingSettlementMutationVariables = Exact<{
31093109
ik: Scalars['SafeString']['input'];
@@ -3113,7 +3113,7 @@ export type PostFundingSettlementMutationVariables = Exact<{
31133113
}>;
31143114

31153115

3116-
export type PostFundingSettlementMutation = { __typename?: 'Mutation', addLedgerEntry: { __typename: 'AddLedgerEntryResult', isIkReplay: boolean, entry: { __typename?: 'LedgerEntry', ik: string, id: string, created: string, type?: string | null, posted: string, description?: string | null, ledger: { __typename?: 'Ledger', ik: string }, tags: Array<{ __typename?: 'LedgerEntryTag', key: string, value: string }>, groups: Array<{ __typename?: 'LedgerEntryGroup', key: string, value: string }> }, lines: Array<{ __typename?: 'LedgerLine', amount: string, key?: string | null, account: { __typename?: 'LedgerAccount', path: string }, currency?: { __typename?: 'Currency', code: CurrencyCode, customCurrencyId?: string | null } | null }> } | { __typename: 'BadRequestError', code: string, message: string, retryable: boolean } | { __typename: 'InternalError', code: string, message: string, retryable: boolean } };
3116+
export type PostFundingSettlementMutation = { __typename?: 'Mutation', addLedgerEntry: { __typename: 'AddLedgerEntryResult', isIkReplay: boolean, entry: { __typename?: 'LedgerEntry', ik: string, id: string, created: string, type?: string | null, typeVersion?: number | null, posted: string, description?: string | null, ledger: { __typename?: 'Ledger', ik: string }, tags: Array<{ __typename?: 'LedgerEntryTag', key: string, value: string }>, groups: Array<{ __typename?: 'LedgerEntryGroup', key: string, value: string }> }, lines: Array<{ __typename?: 'LedgerLine', amount: string, key?: string | null, account: { __typename?: 'LedgerAccount', path: string }, currency?: { __typename?: 'Currency', code: CurrencyCode, customCurrencyId?: string | null } | null }> } | { __typename: 'BadRequestError', code: string, message: string, retryable: boolean } | { __typename: 'InternalError', code: string, message: string, retryable: boolean } };
31173117

31183118
export type PostPaymentProcessingMutationVariables = Exact<{
31193119
ik: Scalars['SafeString']['input'];
@@ -3123,7 +3123,7 @@ export type PostPaymentProcessingMutationVariables = Exact<{
31233123
}>;
31243124

31253125

3126-
export type PostPaymentProcessingMutation = { __typename?: 'Mutation', addLedgerEntry: { __typename: 'AddLedgerEntryResult', isIkReplay: boolean, entry: { __typename?: 'LedgerEntry', ik: string, id: string, created: string, type?: string | null, posted: string, description?: string | null, ledger: { __typename?: 'Ledger', ik: string }, tags: Array<{ __typename?: 'LedgerEntryTag', key: string, value: string }>, groups: Array<{ __typename?: 'LedgerEntryGroup', key: string, value: string }> }, lines: Array<{ __typename?: 'LedgerLine', amount: string, key?: string | null, account: { __typename?: 'LedgerAccount', path: string }, currency?: { __typename?: 'Currency', code: CurrencyCode, customCurrencyId?: string | null } | null }> } | { __typename: 'BadRequestError', code: string, message: string, retryable: boolean } | { __typename: 'InternalError', code: string, message: string, retryable: boolean } };
3126+
export type PostPaymentProcessingMutation = { __typename?: 'Mutation', addLedgerEntry: { __typename: 'AddLedgerEntryResult', isIkReplay: boolean, entry: { __typename?: 'LedgerEntry', ik: string, id: string, created: string, type?: string | null, typeVersion?: number | null, posted: string, description?: string | null, ledger: { __typename?: 'Ledger', ik: string }, tags: Array<{ __typename?: 'LedgerEntryTag', key: string, value: string }>, groups: Array<{ __typename?: 'LedgerEntryGroup', key: string, value: string }> }, lines: Array<{ __typename?: 'LedgerLine', amount: string, key?: string | null, account: { __typename?: 'LedgerAccount', path: string }, currency?: { __typename?: 'Currency', code: CurrencyCode, customCurrencyId?: string | null } | null }> } | { __typename: 'BadRequestError', code: string, message: string, retryable: boolean } | { __typename: 'InternalError', code: string, message: string, retryable: boolean } };
31273127

31283128

31293129
export const PostUserFundsAccountDocument = gql`
@@ -3139,6 +3139,7 @@ export const PostUserFundsAccountDocument = gql`
31393139
id
31403140
created
31413141
type
3142+
typeVersion
31423143
posted
31433144
description
31443145
ledger {
@@ -3192,6 +3193,7 @@ export const PostUserFundsAccount_V2Document = gql`
31923193
id
31933194
created
31943195
type
3196+
typeVersion
31953197
posted
31963198
description
31973199
ledger {
@@ -3245,6 +3247,7 @@ export const PostFundingSettlementDocument = gql`
32453247
id
32463248
created
32473249
type
3250+
typeVersion
32483251
posted
32493252
description
32503253
ledger {
@@ -3298,6 +3301,7 @@ export const PostPaymentProcessingDocument = gql`
32983301
id
32993302
created
33003303
type
3304+
typeVersion
33013305
posted
33023306
description
33033307
ledger {

‎tests/fixtures/test-schema-queries.graphql‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ mutation PostUserFundsAccount($ik: SafeString!, $posted: DateTime, $ledgerIk: Sa
1010
id
1111
created
1212
type
13+
typeVersion
1314
posted
1415
description
1516
ledger {
@@ -61,6 +62,7 @@ mutation PostUserFundsAccount_v2($ik: SafeString!, $posted: DateTime, $ledgerIk:
6162
id
6263
created
6364
type
65+
typeVersion
6466
posted
6567
description
6668
ledger {
@@ -112,6 +114,7 @@ mutation PostFundingSettlement($ik: SafeString!, $posted: DateTime, $ledgerIk: S
112114
id
113115
created
114116
type
117+
typeVersion
115118
posted
116119
description
117120
ledger {
@@ -163,6 +166,7 @@ mutation PostPaymentProcessing($ik: SafeString!, $posted: DateTime, $ledgerIk: S
163166
id
164167
created
165168
type
169+
typeVersion
166170
posted
167171
description
168172
ledger {

0 commit comments

Comments
 (0)