diff --git a/lib/fragment.schema.json b/lib/fragment.schema.json index 12a492f..4b807cc 100644 --- a/lib/fragment.schema.json +++ b/lib/fragment.schema.json @@ -4475,7 +4475,7 @@ }, { "name": "ledgerAccountDataMigrations", - "description": "**EXPERIMENTAL**: Ledger Account data migrations affecting this Ledger.", + "description": "Ledger Account data migrations affecting this Ledger.", "args": [ { "name": "after", @@ -4676,7 +4676,7 @@ }, { "name": "ledgerEntryDataMigrations", - "description": "**EXPERIMENTAL**: Ledger Entry data migrations affecting this Ledger.", + "description": "Ledger Entry data migrations affecting this Ledger.", "args": [ { "name": "after", @@ -6620,8 +6620,8 @@ "name": "accountPath", "description": "Filter by Ledger Account path.", "type": { - "kind": "SCALAR", - "name": "SafeString", + "kind": "INPUT_OBJECT", + "name": "StringFilter", "ofType": null }, "defaultValue": null @@ -8190,8 +8190,8 @@ "name": "entryType", "description": "Filter by Ledger Entry type.", "type": { - "kind": "SCALAR", - "name": "SafeString", + "kind": "INPUT_OBJECT", + "name": "StringFilter", "ofType": null }, "defaultValue": null @@ -8210,8 +8210,8 @@ "name": "typeVersion", "description": "Filter by Ledger Entry type version.", "type": { - "kind": "SCALAR", - "name": "Int", + "kind": "INPUT_OBJECT", + "name": "StringFilter", "ofType": null }, "defaultValue": null diff --git a/lib/queries.graphql b/lib/queries.graphql index ff60a35..8923e07 100644 --- a/lib/queries.graphql +++ b/lib/queries.graphql @@ -947,6 +947,239 @@ query ListLedgerEntryGroupBalances( } } +query GetEntryDataMigrations( + $ledgerIk: SafeString! + $filter: LedgerEntryDataMigrationsFilterSet + $after: String + $before: String + $first: Int + $last: Int +) { + ledger(ledger: { ik: $ledgerIk }) { + ledgerEntryDataMigrations( + first: $first + after: $after + before: $before + last: $last + filter: $filter + ) { + nodes { + entryType + typeVersion + status + currentMigration { + schemaVersion + status + } + ledgerEntries { + nodes { + id + type + posted + parameters + } + pageInfo { + hasNextPage + endCursor + hasPreviousPage + startCursor + } + } + history { + nodes { + schemaVersion + status + } + pageInfo { + hasNextPage + endCursor + hasPreviousPage + startCursor + } + } + } + pageInfo { + hasNextPage + endCursor + hasPreviousPage + startCursor + } + } + } +} + +query GetEntriesToMigrateForLedgerEntryDataMigration( + $ledgerIk: SafeString! + $entryType: String! + $typeVersion: String! + $after: String + $before: String + $first: Int + $last: Int +) { + ledger(ledger: { ik: $ledgerIk }) { + ledgerEntryDataMigrations( + filter: { + entryType: { + equalTo: $entryType + } + typeVersion: { + equalTo: $typeVersion + } + } + ) { + nodes { + ledgerEntries( + first: $first + after: $after + last: $last + before: $before + ) { + nodes { + id + ik + type + typeVersion + description + posted + created + parameters + lines { + nodes { + id + amount + account { + path + } + } + } + } + pageInfo { + hasNextPage + endCursor + hasPreviousPage + startCursor + } + } + } + } + } +} + +query GetAccountDataMigrations( + $ledgerIk: SafeString! + $filter: LedgerAccountDataMigrationsFilterSet + $after: String + $before: String + $first: Int + $last: Int +) { + ledger(ledger: { ik: $ledgerIk }) { + ledgerAccountDataMigrations( + first: $first + after: $after + before: $before + last: $last + filter: $filter + ) { + nodes { + accountPath + status + currentMigration { + schemaVersion + status + } + ledgerEntries { + nodes { + id + type + posted + parameters + } + pageInfo { + hasNextPage + endCursor + hasPreviousPage + startCursor + } + } + history { + nodes { + schemaVersion + status + } + pageInfo { + hasNextPage + endCursor + hasPreviousPage + startCursor + } + } + } + pageInfo { + hasNextPage + endCursor + hasPreviousPage + startCursor + } + } + } +} + +query GetEntriesToMigrateForLedgerAccountDataMigration( + $ledgerIk: SafeString! + $accountPath: String! + $after: String + $before: String + $first: Int + $last: Int +) { + ledger(ledger: { ik: $ledgerIk }) { + ledgerAccountDataMigrations( + filter: { + accountPath: { + equalTo: $accountPath + } + } + ) { + nodes { + ledgerEntries( + first: $first + after: $after + last: $last + before: $before + ) { + nodes { + id + ik + type + typeVersion + description + posted + created + parameters + lines { + nodes { + id + amount + account { + path + } + } + } + } + pageInfo { + hasNextPage + endCursor + hasPreviousPage + startCursor + } + } + } + } + } +} + mutation CreateCustomCurrency( $id: SafeString!, $name: String!,