From 1afb5ba161221916c5a6356983739016f6d23c67 Mon Sep 17 00:00:00 2001 From: Albert G <516972+alber70g@users.noreply.github.com> Date: Fri, 10 Jan 2025 14:22:32 +0100 Subject: [PATCH] feat(graph): update schema to represent correct structure in preparation of transition to kadindexer.io/graphql --- .changeset/green-scissors-refuse.md | 74 +++++++++++++++++++ .graphqlrc.ts | 21 ++++++ .../AccountTransfers.graph.ts | 16 +++- .../loadingData/loadingDataBlockquery.ts | 4 +- .../loadingDataTransactionRequestKeyQuery.ts | 1 - .../TransactionResultComponent.tsx | 5 +- .../transaction-requestkey.graph.ts | 5 +- packages/apps/explorer/src/services/format.ts | 11 ++- packages/apps/graph-client/apollo.config.js | 2 +- .../components/events-table/events-table.tsx | 2 +- .../src/graphql/fields/event.graph.ts | 2 +- .../src/graphql/fields/miner-key.graph.ts | 20 ----- .../src/graphql/fields/transaction.graph.ts | 1 - .../graph-client/src/graphql/queries.graph.ts | 4 +- .../overview/[fungible]/[account]/[chain].tsx | 15 ++-- .../src/pages/transactions/[key].tsx | 8 +- packages/apps/graph/.graphqlrc.yml | 1 - .../apps/graph/Updates-graphql-hackachain.md | 62 ++++++++++++++++ packages/apps/graph/generated-schema.graphql | 42 +++-------- packages/apps/graph/src/graph/builder.ts | 6 -- packages/apps/graph/src/graph/index.ts | 1 - .../apps/graph/src/graph/objects/block.ts | 4 +- .../apps/graph/src/graph/objects/event.ts | 2 - .../src/graph/objects/fungible-account.ts | 18 ++--- .../graph/objects/fungible-chain-account.ts | 4 +- .../apps/graph/src/graph/objects/miner-key.ts | 39 ---------- .../src/graph/objects/non-fungible-account.ts | 12 +-- .../objects/non-fungible-chain-account.ts | 2 +- .../src/graph/objects/transaction-result.ts | 9 +-- .../graph/src/graph/objects/transaction.ts | 1 - .../apps/graph/src/graph/objects/transfer.ts | 3 - .../src/graph/query/blocks-from-depth.ts | 4 +- .../src/graph/query/blocks-from-height.ts | 3 +- .../graph/query/completed-block-heights.ts | 3 +- packages/apps/graph/src/graph/query/events.ts | 4 +- .../graph/src/graph/query/fungible-account.ts | 12 ++- .../query/fungible-accounts-by-public-key.ts | 4 +- .../src/graph/query/fungible-chain-account.ts | 28 +++++-- .../fungible-chain-accounts-by-public-key.ts | 4 +- .../subscription/new-blocks-from-depth.ts | 5 +- .../src/graph/subscription/new-blocks.ts | 3 +- .../graph/src/graph/types/graphql-types.ts | 1 - packages/apps/graph/src/services/git/path.ts | 3 +- packages/apps/graph/src/utils/isDefined.ts | 11 +++ packages/apps/rwa-demo/codegen-sdk.yml | 4 +- 45 files changed, 285 insertions(+), 201 deletions(-) create mode 100644 .changeset/green-scissors-refuse.md create mode 100644 .graphqlrc.ts delete mode 100644 packages/apps/graph-client/src/graphql/fields/miner-key.graph.ts delete mode 100644 packages/apps/graph/.graphqlrc.yml create mode 100644 packages/apps/graph/Updates-graphql-hackachain.md delete mode 100644 packages/apps/graph/src/graph/objects/miner-key.ts create mode 100644 packages/apps/graph/src/utils/isDefined.ts diff --git a/.changeset/green-scissors-refuse.md b/.changeset/green-scissors-refuse.md new file mode 100644 index 0000000000..b28586e695 --- /dev/null +++ b/.changeset/green-scissors-refuse.md @@ -0,0 +1,74 @@ +--- +'@kadena/graph': major +--- + +BREAKING CHANGES: we've introduced a number of breaking changes to prepare to +transition to kadindexer.io/graphql + +Changes and their resolution + +## Breaking Changes + +### Without alternative + +- ✖ Field `Block.target` changed type from `Decimal!` to `String!` +- ✖ Field `Block.weight` changed type from `Decimal!` to `String!` +- ✖ Field `incrementedId` was removed from object type `Event` +- ✖ Field `parameterText` was removed from object type `Event` +- ✖ Type `MinerKey` was removed +- ✖ Type `PositiveFloat` was removed +- ✖ Field `metadata` was removed from object type `TransactionResult` + +### With Alternatives + +- ✖ Field `Query.fungibleChainAccount` changed type from `FungibleChainAccount` + to [FungibleChainAccount!] +- ✖ Argument `chainId`: String! was removed from field + `Query.fungibleChainAccount` + - `chainId` was replaced by `chainIds: [String!]` with a default value +- ✖ Field `blockHash` was removed from object type `Transfer` + - can be retrieved via `block.hash` +- ✖ Field `chainId` was removed from object type `Transfer` + - can be retrieved via `block.chainId` +- ✖ Field `height` was removed from object type `Transfer` + - can be retrieved via `block.height` + +## Improvements + +These shouldn't affect how it's being used. We changed the value for + +- `chainIds` to include all chains as the default value, +- `fungibleName` to include `coin` as the default value + +and represented as such by GraphQL instead of a optional argument with a hidden +default value. + +- ⚠ Default value + `[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ]` was + added to argument `chainIds` on field `Query.blocksFromDepth` +- ⚠ Default value + `[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ]` was + added to argument `chainIds` on field `Query.blocksFromHeight` +- ⚠ Default value + `[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ]` was + added to argument `chainIds` on field `Query.completedBlockHeights` +- ⚠ Default value `coin` was added to argument fungibleName on field + `Query.fungibleAccount` +- ⚠ Argument `chainIds: [String!]!` (with default value) added to field + `Query.fungibleChainAccount` +- ⚠ Default value `coin` was added to argument fungibleName on field + `Query.fungibleChainAccount` +- ⚠ Default value + `[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ]` was + added to argument `chainIds` on field `Subscription.newBlocks` +- ⚠ Default value + `[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ]` was + added to argument `chainIds` on field `Subscription.newBlocksFromDepth` + +## Other Changes + +- ✔ Directive oneOf was added +- ✔ Directive deprecated was added to field IGuard.keys +- ✔ Directive deprecated was added to field IGuard.predicate +- ✔ Type for argument chainIds on field Subscription.newBlocksFromDepth changed + from [String!]! to [String!] diff --git a/.graphqlrc.ts b/.graphqlrc.ts new file mode 100644 index 0000000000..e507cb9125 --- /dev/null +++ b/.graphqlrc.ts @@ -0,0 +1,21 @@ +// .graphqlrc.ts or graphql.config.ts +export default { + projects: { + 'graph-client': { + schema: ['./packages/apps/graph/generated-schema.graphql'], + documents: ['./packages/apps/graph-client/src/**/*.graph.ts'], + }, + explorer: { + schema: ['./packages/apps/graph/generated-schema.graphql'], + documents: ['./packages/apps/explorer/src/**/*.graph.ts'], + }, + 'proof-of-us': { + schema: ['./packages/apps/graph/generated-schema.graphql'], + documents: ['./packages/apps/proof-of-us/src/**/*.graph.ts'], + }, + 'rwa-demo': { + schema: ['./packages/apps/graph/generated-schema.graphql'], + documents: ['./packages/apps/rwa-demo/src/**/*.graph.ts'], + }, + }, +}; diff --git a/packages/apps/explorer/src/components/AccountTransfersTable/AccountTransfers.graph.ts b/packages/apps/explorer/src/components/AccountTransfersTable/AccountTransfers.graph.ts index 5dec1f6a10..e1a66d0fb6 100644 --- a/packages/apps/explorer/src/components/AccountTransfersTable/AccountTransfers.graph.ts +++ b/packages/apps/explorer/src/components/AccountTransfersTable/AccountTransfers.graph.ts @@ -20,13 +20,21 @@ export const accountTransfers: DocumentNode = gql` } edges { node { - requestKey - blockHash + transaction { + cmd { + meta { + chainId + } + } + hash + } + block { + hash + height + } amount - chainId receiverAccount senderAccount - height } } } diff --git a/packages/apps/explorer/src/components/LoadingSkeleton/loadingData/loadingDataBlockquery.ts b/packages/apps/explorer/src/components/LoadingSkeleton/loadingData/loadingDataBlockquery.ts index b875ab0fd9..827c6f0968 100644 --- a/packages/apps/explorer/src/components/LoadingSkeleton/loadingData/loadingDataBlockquery.ts +++ b/packages/apps/explorer/src/components/LoadingSkeleton/loadingData/loadingDataBlockquery.ts @@ -34,8 +34,8 @@ export const loadingData: BlockQuery = { }, payloadHash: '', powHash: '', - target: 0, - weight: 0, + target: '', + weight: '', transactions: { totalCount: 0, }, diff --git a/packages/apps/explorer/src/components/LoadingSkeleton/loadingData/loadingDataTransactionRequestKeyQuery.ts b/packages/apps/explorer/src/components/LoadingSkeleton/loadingData/loadingDataTransactionRequestKeyQuery.ts index 768aac2a33..4691ed36b4 100644 --- a/packages/apps/explorer/src/components/LoadingSkeleton/loadingData/loadingDataTransactionRequestKeyQuery.ts +++ b/packages/apps/explorer/src/components/LoadingSkeleton/loadingData/loadingDataTransactionRequestKeyQuery.ts @@ -44,7 +44,6 @@ export const loadingTransactionData: TransactionRequestKeyQuery = { transactionId: 1, logs: '1', gas: 262, - metadata: null, continuation: null, __typename: 'TransactionResult', events: { diff --git a/packages/apps/explorer/src/components/TransactionComponents/TransactionResultComponent.tsx b/packages/apps/explorer/src/components/TransactionComponents/TransactionResultComponent.tsx index 88ba392f3b..f722f42d49 100644 --- a/packages/apps/explorer/src/components/TransactionComponents/TransactionResultComponent.tsx +++ b/packages/apps/explorer/src/components/TransactionComponents/TransactionResultComponent.tsx @@ -93,8 +93,8 @@ export const TransactionResultComponent: React.FC<{ }, { key: 'Counterpart', - value: getCrosschainTransfer(transaction).requestKey, - link: `/transaction/${getCrosschainTransfer(transaction).requestKey}`, + value: getCrosschainTransfer(transaction).transaction?.hash || '', + link: `/transaction/${getCrosschainTransfer(transaction).transaction?.hash || ''}`, }, ]} /> @@ -124,7 +124,6 @@ export const TransactionResultComponent: React.FC<{ /> ), }, - { key: 'Metadata', value: transaction.metadata }, ]} /> diff --git a/packages/apps/explorer/src/graphql/pages/transaction/transaction-requestkey.graph.ts b/packages/apps/explorer/src/graphql/pages/transaction/transaction-requestkey.graph.ts index f7d77d9f10..5b2de373a8 100644 --- a/packages/apps/explorer/src/graphql/pages/transaction/transaction-requestkey.graph.ts +++ b/packages/apps/explorer/src/graphql/pages/transaction/transaction-requestkey.graph.ts @@ -57,7 +57,6 @@ export const transactionRequestKey: DocumentNode = gql` hash creationTime } - metadata continuation events { edges { @@ -71,7 +70,9 @@ export const transactionRequestKey: DocumentNode = gql` edges { node { crossChainTransfer { - requestKey + transaction { + hash + } senderAccount receiverAccount } diff --git a/packages/apps/explorer/src/services/format.ts b/packages/apps/explorer/src/services/format.ts index 7b0317ae6c..08e45263b5 100644 --- a/packages/apps/explorer/src/services/format.ts +++ b/packages/apps/explorer/src/services/format.ts @@ -19,7 +19,16 @@ export function formatNumberWithUnit(number: number): string { } export function formatStatisticsData( - networkInfo: NetworkInfo | null | undefined, + networkInfo: + | Pick< + NetworkInfo, + | 'networkHashRate' + | 'totalDifficulty' + | 'transactionCount' + | 'coinsInCirculation' + > + | null + | undefined, ): { label: string; value: string }[] { if (!networkInfo) { return [ diff --git a/packages/apps/graph-client/apollo.config.js b/packages/apps/graph-client/apollo.config.js index 92fbdfe19a..d42505f99e 100644 --- a/packages/apps/graph-client/apollo.config.js +++ b/packages/apps/graph-client/apollo.config.js @@ -2,7 +2,7 @@ module.exports = { client: { service: { name: 'graph', - localSchemaFile: __dirname + '/../graph/generated-schema.graphql', + localSchemaFile: `${__dirname}/../graph/generated-schema.graphql`, }, includes: ['src/**/*.ts', 'src/**/*.tsx'], excludes: ['**/node_modulues/**/*', 'src/__generated__/**/*'], diff --git a/packages/apps/graph-client/src/components/events-table/events-table.tsx b/packages/apps/graph-client/src/components/events-table/events-table.tsx index 03a514858f..f36b956577 100644 --- a/packages/apps/graph-client/src/components/events-table/events-table.tsx +++ b/packages/apps/graph-client/src/components/events-table/events-table.tsx @@ -42,7 +42,7 @@ export const EventsTable = (props: IEventsTableProps): JSX.Element => { Values - {JSON.parse(event.parameterText).map( + {JSON.parse(event.parameters || '""').map( (parameter: any, index: number) => ( diff --git a/packages/apps/graph-client/src/graphql/fields/event.graph.ts b/packages/apps/graph-client/src/graphql/fields/event.graph.ts index 00284dc7e9..d499841d85 100644 --- a/packages/apps/graph-client/src/graphql/fields/event.graph.ts +++ b/packages/apps/graph-client/src/graphql/fields/event.graph.ts @@ -3,7 +3,7 @@ import { gql } from '@apollo/client'; export const CORE_EVENT_FIELDS: DocumentNode = gql` fragment CoreEventFields on Event { - parameterText + parameters qualifiedName } `; diff --git a/packages/apps/graph-client/src/graphql/fields/miner-key.graph.ts b/packages/apps/graph-client/src/graphql/fields/miner-key.graph.ts deleted file mode 100644 index 323147b393..0000000000 --- a/packages/apps/graph-client/src/graphql/fields/miner-key.graph.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { DocumentNode } from '@apollo/client'; -import { gql } from '@apollo/client'; - -export const CORE_MINER_KEY_FIELDS: DocumentNode = gql` - fragment CoreMinerKeyFields on MinerKey { - blockHash - id - key - } -`; - -export const ALL_MINER_KEY_FIELDS: DocumentNode = gql` - ${CORE_MINER_KEY_FIELDS} - - fragment AllMinerKeyFields on MinerKey { - ...CoreMinerKeyFields - - # block {} - } -`; diff --git a/packages/apps/graph-client/src/graphql/fields/transaction.graph.ts b/packages/apps/graph-client/src/graphql/fields/transaction.graph.ts index 1d031be110..ff455a855d 100644 --- a/packages/apps/graph-client/src/graphql/fields/transaction.graph.ts +++ b/packages/apps/graph-client/src/graphql/fields/transaction.graph.ts @@ -75,7 +75,6 @@ export const ALL_TRANSACTION_FIELDS: DocumentNode = gql` gas goodResult logs - metadata eventCount transactionId } diff --git a/packages/apps/graph-client/src/graphql/queries.graph.ts b/packages/apps/graph-client/src/graphql/queries.graph.ts index ed60446cfc..4ebdfbd2f4 100644 --- a/packages/apps/graph-client/src/graphql/queries.graph.ts +++ b/packages/apps/graph-client/src/graphql/queries.graph.ts @@ -5,7 +5,6 @@ import { ALL_FUNGIBLE_CHAIN_ACCOUNT_FIELDS, CORE_FUNGIBLE_CHAIN_ACCOUNT_FIELDS, } from './fields/fungible-chain-account.graph'; -import { CORE_MINER_KEY_FIELDS } from './fields/miner-key.graph'; import { ALL_NON_FUNGIBLE_ACCOUNT_FIELDS } from './fields/non-fungible-account.graph'; import { CORE_NON_FUNGIBLE_CHAIN_ACCOUNT_FIELDS } from './fields/non-fungible-chain-account.graph'; import { CORE_TRANSACTION_FIELDS } from './fields/transaction.graph'; @@ -17,7 +16,6 @@ import { gql } from '@apollo/client'; export const getBlockFromHash: DocumentNode = gql` ${ALL_BLOCK_FIELDS} ${CORE_TRANSACTION_FIELDS} - ${CORE_MINER_KEY_FIELDS} query getBlockFromHash( $hash: String! @@ -136,7 +134,7 @@ export const getFungibleChainAccount: DocumentNode = gql` fungibleChainAccount( fungibleName: $fungibleName accountName: $accountName - chainId: $chainId + chainIds: [$chainId] ) { ...AllFungibleChainAccountFields transactions { diff --git a/packages/apps/graph-client/src/pages/account/overview/[fungible]/[account]/[chain].tsx b/packages/apps/graph-client/src/pages/account/overview/[fungible]/[account]/[chain].tsx index fcdec00be8..a7c35a6332 100644 --- a/packages/apps/graph-client/src/pages/account/overview/[fungible]/[account]/[chain].tsx +++ b/packages/apps/graph-client/src/pages/account/overview/[fungible]/[account]/[chain].tsx @@ -199,7 +199,7 @@ const ChainAccount: React.FC = () => { { - fungibleChainAccountData.fungibleChainAccount + fungibleChainAccountData.fungibleChainAccount[0] .fungibleName } @@ -209,7 +209,7 @@ const ChainAccount: React.FC = () => { Balance - {fungibleChainAccountData.fungibleChainAccount.balance} + {fungibleChainAccountData.fungibleChainAccount[0].balance} @@ -218,7 +218,7 @@ const ChainAccount: React.FC = () => { { - fungibleChainAccountData.fungibleChainAccount.guard + fungibleChainAccountData.fungibleChainAccount[0].guard .predicate } @@ -228,7 +228,10 @@ const ChainAccount: React.FC = () => { Guard Keys - {fungibleChainAccountData.fungibleChainAccount.guard.keys} + { + fungibleChainAccountData.fungibleChainAccount[0].guard + .keys + } @@ -244,7 +247,7 @@ const ChainAccount: React.FC = () => { chainId={router.query.chain as string} truncateColumns={true} transfers={ - fungibleChainAccountData.fungibleChainAccount + fungibleChainAccountData.fungibleChainAccount[0] .transfers as FungibleChainAccountTransfersConnection } /> @@ -258,7 +261,7 @@ const ChainAccount: React.FC = () => { }`} truncateColumns={true} transactions={ - fungibleChainAccountData.fungibleChainAccount + fungibleChainAccountData.fungibleChainAccount[0] .transactions as FungibleChainAccountTransactionsConnection } /> diff --git a/packages/apps/graph-client/src/pages/transactions/[key].tsx b/packages/apps/graph-client/src/pages/transactions/[key].tsx index cd9a849c0c..4e9b68f72d 100644 --- a/packages/apps/graph-client/src/pages/transactions/[key].tsx +++ b/packages/apps/graph-client/src/pages/transactions/[key].tsx @@ -219,12 +219,6 @@ const RequestKey: React.FC = () => { {transaction.result.logs} - - - Metadata - - {transaction.result.metadata} - Continuation @@ -282,7 +276,7 @@ const RequestKey: React.FC = () => {
                                 {event?.node ? (
-                                  formatCode(event.node.parameterText)
+                                  formatCode(event.node.parameters || '""')
                                 ) : (
                                   
                                     N/A
diff --git a/packages/apps/graph/.graphqlrc.yml b/packages/apps/graph/.graphqlrc.yml
deleted file mode 100644
index e0c5e735f1..0000000000
--- a/packages/apps/graph/.graphqlrc.yml
+++ /dev/null
@@ -1 +0,0 @@
-schema: ./src/__generated__/graphql.schema.json
diff --git a/packages/apps/graph/Updates-graphql-hackachain.md b/packages/apps/graph/Updates-graphql-hackachain.md
new file mode 100644
index 0000000000..1ea14bc3e6
--- /dev/null
+++ b/packages/apps/graph/Updates-graphql-hackachain.md
@@ -0,0 +1,62 @@
+- [ ] Marcos Update descriptions of the fields
+
+- [ ] Marcos [log] ✖  Field Block.difficulty changed type from BigInt! to BigInt
+- [ ] Marcos [log] ✖  Field Block.flags changed type from Decimal! to NonNegativeFloat!
+- [ ] Marcos [log] ✖  Field Block.nonce changed type from Decimal! to NonNegativeFloat!
+- [x] Albert [log] ✖  Field Block.target changed type from Decimal! to String!
+- [x] Albert [log] ✖  Field Block.weight changed type from Decimal! to String!
+[log] ✖  Type Decimal was removed
+- [x] Albert [log] ✖  Field incrementedId was removed from object type Event
+- [ ] Marcos [log] ✖  Field Event.name changed type from String! to String
+- [x] Albert [log] ✖  Field parameterText was removed from object type Event
+- [ ] Marcos [log] ✖  Field FungibleAccount.totalBalance changed type from Decimal! to NonNegativeFloat!
+- [ ] Marcos [log] ✖  Field version was removed from object type GraphConfiguration
+- [ ] Marcos [log] ✖  Guard object type no longer implements IGuard interface
+  For now, use the IGuard interface with only the KeysetGuard implements IGuard.
+
+  """
+  A guard. Has values `keys`, `predicate` to provide backwards compatibility for `KeysetGuard`.
+  """
+  interface IGuard {
+    raw: String!
+  }
+
+  type KeysetGuard implements IGuard {
+    keys: [String!]!
+    predicate: String!
+    raw: String!
+  }
+- [ ] Marcos for next version we need the different guards to be implemented
+
+- [x] Albert [log] ✖  Type MinerKey was removed
+
+- [ ] Marcos [log] ✖  Field chainAccounts was removed from object type NonFungibleAccount
+  Reintroduce NonFungibleAccount.chainAccounts
+  [log] ✖  Field guard was removed from object type NonFungibleTokenBalance
+
+- [x] Albert [log] ✖  Type PositiveFloat was removed
+- [x] Albert [log] ✖  Field Query.fungibleChainAccount changed type from FungibleChainAccount to [FungibleChainAccount!]!
+- [x] Albert [log] ✖  Argument chainId: String! was removed from field Query.fungibleChainAccount
+
+- [ ] Marcos [log] ✖  Argument parametersFilter: String was removed from field Subscription.events
+  https://www.prisma.io/docs/orm/prisma-client/special-fields-and-types/working-with-json-fields#filter-on-object-property
+  Add complexity information to the queries, and limit complexity for production servers
+
+- [ ] Marcos [log] ✖  Type for argument chainIds on field Subscription.newBlocks changed from [String!] to [String]!
+- [x] Albert [log] ✖  Field metadata was removed from object type TransactionResult
+- [ ] Marcos [log] ✖  Field Transfer.amount changed type from Decimal! to NonNegativeFloat!
+- [x] Albert [log] ⚠  Argument chainIds: [String!] added to field Query.fungibleChainAccount
+
+
+
+
+[log]
+Detected the following changes (150) between schemas:
+
+- [ ] Albert [log] ✖  Field FungibleChainAccount.guard changed type from Guard! to KeysetGuard!
+- [ ] Albert [log] ✖  Type Guard was removed
+- [ ] Albert [log] ✖  Field keys (deprecated) was removed from interface IGuard
+- [ ] Albert [log] ✖  Field predicate (deprecated) was removed from interface IGuard
+
+[log] ✖  Field moduleHash was removed from object type Transfer
+[log] ✖  Field requestKey was removed from object type Transfer
diff --git a/packages/apps/graph/generated-schema.graphql b/packages/apps/graph/generated-schema.graphql
index 9870c1c6e1..ce2a878c14 100644
--- a/packages/apps/graph/generated-schema.graphql
+++ b/packages/apps/graph/generated-schema.graphql
@@ -30,11 +30,11 @@ type Block implements Node {
 
   """The proof of work hash."""
   powHash: String!
-  target: Decimal!
+  target: String!
 
   """Default page size is 20."""
   transactions(after: String, before: String, first: Int, last: Int): BlockTransactionsConnection!
-  weight: Decimal!
+  weight: String!
 }
 
 type BlockEventsConnection {
@@ -105,7 +105,6 @@ type Event implements Node {
   """The height of the block where the event was emitted."""
   height: BigInt!
   id: ID!
-  incrementedId: Int!
   moduleName: String!
   name: String!
 
@@ -113,7 +112,6 @@ type Event implements Node {
   The order index of this event, in the case that there are multiple events in one transaction.
   """
   orderIndex: BigInt!
-  parameterText: String!
   parameters: String
 
   """
@@ -244,14 +242,6 @@ interface IGuard {
   raw: String!
 }
 
-"""The account of the miner that solved a block."""
-type MinerKey implements Node {
-  block: Block!
-  blockHash: String!
-  id: ID!
-  key: String!
-}
-
 """Information about the network."""
 type NetworkInfo {
   """The version of the API."""
@@ -374,9 +364,6 @@ type PageInfo {
   startCursor: String
 }
 
-"""Floats that will have a value greater than 0."""
-scalar PositiveFloat
-
 type Query {
   """Retrieve a block by hash."""
   block(hash: String!): Block
@@ -387,7 +374,7 @@ type Query {
     before: String
 
     """Default: all chains"""
-    chainIds: [String!]
+    chainIds: [String!] = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"]
     first: Int
     last: Int
     minimumDepth: Int!
@@ -399,7 +386,7 @@ type Query {
     before: String
 
     """Default: all chains"""
-    chainIds: [String!]
+    chainIds: [String!] = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"]
     endHeight: Int
     first: Int
     last: Int
@@ -414,7 +401,7 @@ type Query {
     before: String
 
     """Default: all chains"""
-    chainIds: [String!]
+    chainIds: [String!] = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"]
 
     """Retrieve blocks from completed heights only. Default: true"""
     completedHeights: Boolean = true
@@ -425,9 +412,9 @@ type Query {
 
   """
   Retrieve events by qualifiedName (e.g. `coin.TRANSFER`). Default page size is 20.
-         
+  
         The parametersFilter is a stringified JSON object that matches the [JSON object property filters](https://www.prisma.io/docs/orm/prisma-client/special-fields-and-types/working-with-json-fields#filter-on-object-property) from Prisma.
-         
+  
         An example of such a filter parameter value: `events(parametersFilter: "{\"array_starts_with\": \"k:abcdefg\"}")`
   """
   events(after: String, before: String, blockHash: String, chainId: String, first: Int, last: Int, maxHeight: Int, minHeight: Int, minimumDepth: Int, orderIndex: Int, parametersFilter: String, qualifiedEventName: String!, requestKey: String): QueryEventsConnection!
@@ -435,7 +422,7 @@ type Query {
   """
   Retrieve an fungible specific account by its name and fungible, such as coin.
   """
-  fungibleAccount(accountName: String!, fungibleName: String): FungibleAccount
+  fungibleAccount(accountName: String!, fungibleName: String = "coin"): FungibleAccount
 
   """Retrieve an account by public key."""
   fungibleAccountsByPublicKey(fungibleName: String, publicKey: String!): [FungibleAccount!]!
@@ -443,7 +430,7 @@ type Query {
   """
   Retrieve an account by its name and fungible, such as coin, on a specific chain.
   """
-  fungibleChainAccount(accountName: String!, chainId: String!, fungibleName: String): FungibleChainAccount
+  fungibleChainAccount(accountName: String!, chainIds: [String!]! = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"], fungibleName: String = "coin"): [FungibleChainAccount!]
 
   """Retrieve a chain account by public key."""
   fungibleChainAccountsByPublicKey(chainId: String!, fungibleName: String, publicKey: String!): [FungibleChainAccount!]!
@@ -602,10 +589,10 @@ type Subscription {
   events(chainId: String, minimumDepth: Int, parametersFilter: String, qualifiedEventName: String!): [Event!]
 
   """Subscribe to new blocks."""
-  newBlocks(chainIds: [String!]): [Block!]
+  newBlocks(chainIds: [String!] = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"]): [Block!]
 
   """Subscribe to new blocks from a specific depth."""
-  newBlocksFromDepth(chainIds: [String!]!, minimumDepth: Int!): [Block!]
+  newBlocksFromDepth(chainIds: [String!] = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"], minimumDepth: Int!): [Block!]
 
   """Listen for a transaction by request key."""
   transaction(chainId: String, requestKey: String!): Transaction
@@ -676,12 +663,8 @@ type TransactionResult {
   """The transaction result when it was successful. Formatted as raw JSON."""
   goodResult: String
 
-  """The height of the block this transaction belongs to."""
-  height: BigInt!
-
   """Identifier to retrieve the logs for the execution of the transaction."""
   logs: String
-  metadata: String
   transactionId: BigInt
   transfers(after: String, before: String, first: Int, last: Int): TransactionResultTransfersConnection!
 }
@@ -716,15 +699,12 @@ type TransactionSignature {
 type Transfer implements Node {
   amount: Decimal!
   block: Block!
-  blockHash: String!
-  chainId: BigInt!
   creationTime: DateTime!
 
   """
   The counterpart of the crosschain-transfer. `null` when it is not a cross-chain-transfer.
   """
   crossChainTransfer: Transfer
-  height: BigInt!
   id: ID!
   moduleHash: String!
   moduleName: String!
diff --git a/packages/apps/graph/src/graph/builder.ts b/packages/apps/graph/src/graph/builder.ts
index 371f52b58a..647ae7caba 100644
--- a/packages/apps/graph/src/graph/builder.ts
+++ b/packages/apps/graph/src/graph/builder.ts
@@ -18,7 +18,6 @@ import {
   BigIntResolver,
   DateTimeResolver,
   NonNegativeFloatResolver,
-  PositiveFloatResolver,
 } from 'graphql-scalars';
 import type { IncomingMessage } from 'http';
 import { prismaClient } from '../db/prisma-client';
@@ -60,10 +59,6 @@ interface IDefaultTypesExtension {
       Input: number;
       Output: number;
     };
-    PositiveFloat: {
-      Input: number;
-      Output: number;
-    };
   };
 }
 
@@ -183,7 +178,6 @@ const SCALARS = [
   ['BigInt', BigIntResolver],
   ['DateTime', DateTimeResolver],
   ['Decimal', NonNegativeFloatResolver],
-  ['PositiveFloat', PositiveFloatResolver],
 ] as const;
 
 // add the custom scalars
diff --git a/packages/apps/graph/src/graph/index.ts b/packages/apps/graph/src/graph/index.ts
index 8e52ab550b..9e194cbe59 100644
--- a/packages/apps/graph/src/graph/index.ts
+++ b/packages/apps/graph/src/graph/index.ts
@@ -7,7 +7,6 @@ import './objects/gas-limit-estimation';
 import './objects/graph-configuration';
 import './objects/guard';
 import './objects/keyset-guard';
-import './objects/miner-key';
 import './objects/network-info';
 import './objects/non-fungible-account';
 import './objects/non-fungible-chain-account';
diff --git a/packages/apps/graph/src/graph/objects/block.ts b/packages/apps/graph/src/graph/objects/block.ts
index f72b7678d1..2a6ec9370e 100644
--- a/packages/apps/graph/src/graph/objects/block.ts
+++ b/packages/apps/graph/src/graph/objects/block.ts
@@ -40,8 +40,8 @@ export default builder.prismaNode(Prisma.ModelName.Block, {
     powHash: t.exposeString('powHash', {
       description: 'The proof of work hash.',
     }),
-    target: t.expose('target' as never, { type: 'Decimal' }),
-    weight: t.expose('weight' as never, { type: 'Decimal' }),
+    target: t.expose('target' as never, { type: 'String' }),
+    weight: t.expose('weight' as never, { type: 'String' }),
     nonce: t.expose('nonce' as never, { type: 'Decimal' }),
     flags: t.expose('flags' as never, { type: 'Decimal' }),
     minerAccount: t.field({
diff --git a/packages/apps/graph/src/graph/objects/event.ts b/packages/apps/graph/src/graph/objects/event.ts
index 447af248a6..daed685dc7 100644
--- a/packages/apps/graph/src/graph/objects/event.ts
+++ b/packages/apps/graph/src/graph/objects/event.ts
@@ -12,7 +12,6 @@ export default builder.prismaNode(Prisma.ModelName.Event, {
   select: {},
   fields: (t) => ({
     // database fields
-    incrementedId: t.exposeInt('id'),
     chainId: t.expose('chainId', { type: 'BigInt' }),
     height: t.expose('height', {
       type: 'BigInt',
@@ -25,7 +24,6 @@ export default builder.prismaNode(Prisma.ModelName.Event, {
     }),
     moduleName: t.exposeString('moduleName'),
     name: t.exposeString('name'),
-    parameterText: t.exposeString('parameterText'),
     parameters: t.string({
       nullable: true,
       select: {
diff --git a/packages/apps/graph/src/graph/objects/fungible-account.ts b/packages/apps/graph/src/graph/objects/fungible-account.ts
index b04f65501e..ec5db4f0d3 100644
--- a/packages/apps/graph/src/graph/objects/fungible-account.ts
+++ b/packages/apps/graph/src/graph/objects/fungible-account.ts
@@ -12,10 +12,8 @@ import { builder } from '../builder';
 import { fungibleAccountDetailsLoader } from '../data-loaders/fungible-account-details';
 
 import { dotenv } from '@utils/dotenv';
-import type {
-  IFungibleAccount,
-  IFungibleChainAccount,
-} from '../types/graphql-types';
+import { isDefined } from '@utils/isDefined';
+import type { IFungibleAccount } from '../types/graphql-types';
 import {
   FungibleAccountName,
   FungibleChainAccountName,
@@ -320,7 +318,6 @@ export const getTransactions = async (
             goodresult AS "good_result",
             height,
             logs,
-            metadata,
             nonce,
             num_events AS "event_count",
             pactid AS "pact_id",
@@ -357,7 +354,6 @@ export const getTransactions = async (
             goodresult AS "good_result",
             height,
             logs,
-            metadata,
             nonce,
             num_events AS "event_count",
             pactid AS "pact_id",
@@ -412,7 +408,6 @@ export const getTransactions = async (
           goodresult AS "good_result",
           height,
           logs,
-          metadata,
           nonce,
           num_events AS "event_count",
           pactid AS "pact_id",
@@ -460,7 +455,6 @@ export const getTransactions = async (
           goodresult AS "good_result",
           height,
           logs,
-          metadata,
           nonce,
           num_events AS "event_count",
           pactid AS "pact_id",
@@ -546,9 +540,7 @@ export default builder.node(
                   });
                 }),
               )
-            ).filter(
-              (chainAccount) => chainAccount !== null,
-            ) as IFungibleChainAccount[];
+            ).filter(isDefined);
           } catch (error) {
             throw normalizeError(error);
           }
@@ -584,7 +576,7 @@ export default builder.node(
         },
       }),
       transactions: t.prismaConnection({
-        description: 'Default page size is 20.',
+                description: 'Default page size is 20.',
         type: Prisma.ModelName.Transaction,
         cursor: 'blockHash_requestKey',
         edgesNullable: false,
@@ -630,7 +622,7 @@ export default builder.node(
         },
       }),
       transfers: t.prismaConnection({
-        description: 'Default page size is 20.',
+                description: 'Default page size is 20.',
         type: Prisma.ModelName.Transfer,
         cursor: 'blockHash_chainId_orderIndex_moduleHash_requestKey',
         edgesNullable: false,
diff --git a/packages/apps/graph/src/graph/objects/fungible-chain-account.ts b/packages/apps/graph/src/graph/objects/fungible-chain-account.ts
index e99c48e4d3..c6c5cb67b5 100644
--- a/packages/apps/graph/src/graph/objects/fungible-chain-account.ts
+++ b/packages/apps/graph/src/graph/objects/fungible-chain-account.ts
@@ -71,7 +71,7 @@ export default builder.node(
       }),
       balance: t.exposeFloat('balance'),
       transactions: t.prismaConnection({
-        description:
+                description:
           'Transactions that the current account is sender of. Default page size is 20.',
         type: Prisma.ModelName.Transaction,
         cursor: 'blockHash_requestKey',
@@ -109,7 +109,7 @@ export default builder.node(
         },
       }),
       transfers: t.prismaConnection({
-        description: 'Default page size is 20.',
+                description: 'Default page size is 20.',
         type: Prisma.ModelName.Transfer,
         edgesNullable: false,
         cursor: 'blockHash_chainId_orderIndex_moduleHash_requestKey',
diff --git a/packages/apps/graph/src/graph/objects/miner-key.ts b/packages/apps/graph/src/graph/objects/miner-key.ts
deleted file mode 100644
index c38e938bf8..0000000000
--- a/packages/apps/graph/src/graph/objects/miner-key.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-import { prismaClient } from '@db/prisma-client';
-import { Prisma } from '@prisma/client';
-import { COMPLEXITY } from '@services/complexity';
-import { normalizeError } from '@utils/errors';
-import { builder } from '../builder';
-
-export default builder.prismaNode(Prisma.ModelName.MinerKey, {
-  description: 'The account of the miner that solved a block.',
-  id: { field: 'blockHash_key' },
-  select: {},
-  fields: (t) => ({
-    blockHash: t.exposeString('blockHash'),
-    key: t.exposeString('key'),
-    block: t.prismaField({
-      type: Prisma.ModelName.Block,
-      nullable: false,
-      complexity: COMPLEXITY.FIELD.PRISMA_WITHOUT_RELATIONS,
-      select: {
-        blocks: true,
-        blockHash: true,
-      },
-      async resolve(query, parent) {
-        try {
-          return (
-            parent.blocks ||
-            (await prismaClient.block.findUniqueOrThrow({
-              ...query,
-              where: {
-                hash: parent.blockHash,
-              },
-            }))
-          );
-        } catch (error) {
-          throw normalizeError(error);
-        }
-      },
-    }),
-  }),
-});
diff --git a/packages/apps/graph/src/graph/objects/non-fungible-account.ts b/packages/apps/graph/src/graph/objects/non-fungible-account.ts
index 73e22b898f..6eac57a411 100644
--- a/packages/apps/graph/src/graph/objects/non-fungible-account.ts
+++ b/packages/apps/graph/src/graph/objects/non-fungible-account.ts
@@ -6,13 +6,11 @@ import {
   getDefaultConnectionComplexity,
 } from '@services/complexity';
 import { normalizeError } from '@utils/errors';
+import { isDefined } from '@utils/isDefined';
 import { builder } from '../builder';
 import { nonFungibleChainCheck } from '../data-loaders/non-fungible-chain-check';
 import { tokenDetailsLoader } from '../data-loaders/token-details';
-import type {
-  INonFungibleAccount,
-  INonFungibleChainAccount,
-} from '../types/graphql-types';
+import type { INonFungibleAccount } from '../types/graphql-types';
 import {
   NonFungibleAccountName,
   NonFungibleChainAccountName,
@@ -68,9 +66,7 @@ export default builder.node(
                   });
                 }),
               )
-            ).filter(
-              (chainAccount) => chainAccount !== null,
-            ) as INonFungibleChainAccount[];
+            ).filter(isDefined);
           } catch (error) {
             throw normalizeError(error);
           }
@@ -92,7 +88,7 @@ export default builder.node(
         },
       }),
       transactions: t.prismaConnection({
-        description:
+                description:
           'Default page size is 20. Note that custom token related transactions are not included.',
         type: Prisma.ModelName.Transaction,
         cursor: 'blockHash_requestKey',
diff --git a/packages/apps/graph/src/graph/objects/non-fungible-chain-account.ts b/packages/apps/graph/src/graph/objects/non-fungible-chain-account.ts
index 9b0f7d1878..c99c2a3a0d 100644
--- a/packages/apps/graph/src/graph/objects/non-fungible-chain-account.ts
+++ b/packages/apps/graph/src/graph/objects/non-fungible-chain-account.ts
@@ -57,7 +57,7 @@ export default builder.node(
         },
       }),
       transactions: t.prismaConnection({
-        description:
+                description:
           'Default page size is 20. Note that custom token related transactions are not included.',
         type: Prisma.ModelName.Transaction,
         cursor: 'blockHash_requestKey',
diff --git a/packages/apps/graph/src/graph/objects/transaction-result.ts b/packages/apps/graph/src/graph/objects/transaction-result.ts
index a2566fcd1d..5f609494bc 100644
--- a/packages/apps/graph/src/graph/objects/transaction-result.ts
+++ b/packages/apps/graph/src/graph/objects/transaction-result.ts
@@ -36,16 +36,11 @@ const TransactionResult = builder.objectType('TransactionResult', {
         'The transaction result when it was successful. Formatted as raw JSON.',
       nullable: true,
     }),
-    height: t.expose('height', {
-      description: 'The height of the block this transaction belongs to.',
-      type: 'BigInt',
-    }),
     logs: t.exposeString('logs', {
       description:
         'Identifier to retrieve the logs for the execution of the transaction.',
       nullable: true,
     }),
-    metadata: t.exposeString('metadata', { nullable: true }),
     eventCount: t.expose('eventCount', { type: 'BigInt', nullable: true }),
     transactionId: t.expose('transactionId', {
       type: 'BigInt',
@@ -67,7 +62,7 @@ const TransactionResult = builder.objectType('TransactionResult', {
     }),
 
     events: t.prismaConnection({
-      type: Prisma.ModelName.Event,
+            type: Prisma.ModelName.Event,
       cursor: 'blockHash_orderIndex_requestKey',
       complexity: (args) => ({
         field: getDefaultConnectionComplexity({
@@ -95,7 +90,7 @@ const TransactionResult = builder.objectType('TransactionResult', {
       },
     }),
     transfers: t.prismaConnection({
-      type: Prisma.ModelName.Transfer,
+            type: Prisma.ModelName.Transfer,
       cursor: 'blockHash_chainId_orderIndex_moduleHash_requestKey',
       complexity: (args) => ({
         field: getDefaultConnectionComplexity({
diff --git a/packages/apps/graph/src/graph/objects/transaction.ts b/packages/apps/graph/src/graph/objects/transaction.ts
index bd33d95707..33d458360e 100644
--- a/packages/apps/graph/src/graph/objects/transaction.ts
+++ b/packages/apps/graph/src/graph/objects/transaction.ts
@@ -110,7 +110,6 @@ export default builder.prismaNode(Prisma.ModelName.Transaction, {
               : null,
             height: parent.height,
             logs: parent.logs,
-            metadata: parent.metadata ? JSON.stringify(parent.metadata) : null,
             eventCount: parent.eventCount,
             transactionId: parent.transactionId,
             blockHash: parent.blockHash,
diff --git a/packages/apps/graph/src/graph/objects/transfer.ts b/packages/apps/graph/src/graph/objects/transfer.ts
index be22da787a..27b9085f99 100644
--- a/packages/apps/graph/src/graph/objects/transfer.ts
+++ b/packages/apps/graph/src/graph/objects/transfer.ts
@@ -12,10 +12,7 @@ export default builder.prismaNode(Prisma.ModelName.Transfer, {
   fields: (t) => ({
     // database fields
     amount: t.expose('amount' as never, { type: 'Decimal' }),
-    blockHash: t.exposeString('blockHash'),
-    chainId: t.expose('chainId', { type: 'BigInt' }),
     senderAccount: t.exposeString('senderAccount'),
-    height: t.expose('height', { type: 'BigInt' }),
     orderIndex: t.expose('orderIndex', {
       type: 'BigInt',
       description:
diff --git a/packages/apps/graph/src/graph/query/blocks-from-depth.ts b/packages/apps/graph/src/graph/query/blocks-from-depth.ts
index 74bf5b6997..e9d9ab008c 100644
--- a/packages/apps/graph/src/graph/query/blocks-from-depth.ts
+++ b/packages/apps/graph/src/graph/query/blocks-from-depth.ts
@@ -1,4 +1,5 @@
 import { prismaClient } from '@db/prisma-client';
+import { CHAINS } from '@kadena/chainweb-node-client';
 import type { Block } from '@prisma/client';
 import { getDefaultConnectionComplexity } from '@services/complexity';
 import {
@@ -6,6 +7,7 @@ import {
   getConfirmationDepth,
 } from '@services/depth-service';
 import { normalizeError } from '@utils/errors';
+import { networkData } from '@utils/network';
 import { builder } from '../builder';
 import GQLBlock from '../objects/block';
 
@@ -21,7 +23,7 @@ builder.queryField('blocksFromDepth', (t) =>
         },
       }),
       chainIds: t.arg.stringList({
-        required: false,
+        defaultValue: [...CHAINS],
         description: 'Default: all chains',
         validate: {
           minLength: 1,
diff --git a/packages/apps/graph/src/graph/query/blocks-from-height.ts b/packages/apps/graph/src/graph/query/blocks-from-height.ts
index 4bb4dec19b..40247ba193 100644
--- a/packages/apps/graph/src/graph/query/blocks-from-height.ts
+++ b/packages/apps/graph/src/graph/query/blocks-from-height.ts
@@ -1,4 +1,5 @@
 import { prismaClient } from '@db/prisma-client';
+import { CHAINS } from '@kadena/chainweb-node-client';
 import { getDefaultConnectionComplexity } from '@services/complexity';
 import { normalizeError } from '@utils/errors';
 import { networkData } from '@utils/network';
@@ -24,7 +25,7 @@ builder.queryField('blocksFromHeight', (t) =>
         },
       }),
       chainIds: t.arg.stringList({
-        required: false,
+        defaultValue: [...CHAINS],
         description: 'Default: all chains',
         validate: {
           minLength: 1,
diff --git a/packages/apps/graph/src/graph/query/completed-block-heights.ts b/packages/apps/graph/src/graph/query/completed-block-heights.ts
index aae7e8314b..aeb5f13a05 100644
--- a/packages/apps/graph/src/graph/query/completed-block-heights.ts
+++ b/packages/apps/graph/src/graph/query/completed-block-heights.ts
@@ -1,4 +1,5 @@
 import { prismaClient } from '@db/prisma-client';
+import { CHAINS } from '@kadena/chainweb-node-client';
 import { COMPLEXITY } from '@services/complexity';
 import { normalizeError } from '@utils/errors';
 import { networkData } from '@utils/network';
@@ -24,7 +25,7 @@ builder.queryField('completedBlockHeights', (t) =>
         },
       }),
       chainIds: t.arg.stringList({
-        required: false,
+        defaultValue: [...CHAINS],
         description: 'Default: all chains',
         validate: {
           minLength: 1,
diff --git a/packages/apps/graph/src/graph/query/events.ts b/packages/apps/graph/src/graph/query/events.ts
index a5254fcdc6..49250f2f58 100644
--- a/packages/apps/graph/src/graph/query/events.ts
+++ b/packages/apps/graph/src/graph/query/events.ts
@@ -67,9 +67,9 @@ const generateEventsFilter = async (args: {
 builder.queryField('events', (t) =>
   t.prismaConnection({
     description: `Retrieve events by qualifiedName (e.g. \`coin.TRANSFER\`). Default page size is 20.
-       
+
       The parametersFilter is a stringified JSON object that matches the [JSON object property filters](https://www.prisma.io/docs/orm/prisma-client/special-fields-and-types/working-with-json-fields#filter-on-object-property) from Prisma.
-       
+
       An example of such a filter parameter value: \`events(parametersFilter: "{\\"array_starts_with\\": \\"k:abcdefg\\"}")\``,
     edgesNullable: false,
     args: {
diff --git a/packages/apps/graph/src/graph/query/fungible-account.ts b/packages/apps/graph/src/graph/query/fungible-account.ts
index 17c5413c23..aa812b45f9 100644
--- a/packages/apps/graph/src/graph/query/fungible-account.ts
+++ b/packages/apps/graph/src/graph/query/fungible-account.ts
@@ -1,9 +1,9 @@
 import { getFungibleChainAccount } from '@services/account-service';
 import { dotenv } from '@utils/dotenv';
+import { isDefined } from '@utils/isDefined';
 import { networkData } from '@utils/network';
 import { builder } from '../builder';
 import FungibleAccount from '../objects/fungible-account';
-import type { IFungibleChainAccount } from '../types/graphql-types';
 import { FungibleAccountName } from '../types/graphql-types';
 
 builder.queryField('fungibleAccount', (t) =>
@@ -19,7 +19,7 @@ builder.queryField('fungibleAccount', (t) =>
         },
       }),
       fungibleName: t.arg.string({
-        required: false,
+        defaultValue: dotenv.DEFAULT_FUNGIBLE_NAME,
         validate: {
           minLength: 1,
         },
@@ -32,14 +32,12 @@ builder.queryField('fungibleAccount', (t) =>
           networkData.chainIds.map(async (chainId) => {
             return getFungibleChainAccount({
               chainId: chainId,
-              fungibleName: args.fungibleName || dotenv.DEFAULT_FUNGIBLE_NAME,
+              fungibleName: args.fungibleName as string,
               accountName: args.accountName,
             });
           }),
         )
-      ).filter(
-        (chainAccount) => chainAccount !== null,
-      ) as IFungibleChainAccount[];
+      ).filter(isDefined);
 
       if (chainAccounts.length === 0) {
         return null;
@@ -48,7 +46,7 @@ builder.queryField('fungibleAccount', (t) =>
       return {
         __typename: FungibleAccountName,
         accountName: args.accountName,
-        fungibleName: args.fungibleName || dotenv.DEFAULT_FUNGIBLE_NAME,
+        fungibleName: args.fungibleName as string,
         chainAccounts: chainAccounts,
         totalBalance: 0,
         transactions: [],
diff --git a/packages/apps/graph/src/graph/query/fungible-accounts-by-public-key.ts b/packages/apps/graph/src/graph/query/fungible-accounts-by-public-key.ts
index b97644a48a..8e3de801f8 100644
--- a/packages/apps/graph/src/graph/query/fungible-accounts-by-public-key.ts
+++ b/packages/apps/graph/src/graph/query/fungible-accounts-by-public-key.ts
@@ -1,10 +1,10 @@
 import { prismaClient } from '@db/prisma-client';
 import { getFungibleChainAccount } from '@services/account-service';
 import { normalizeError } from '@utils/errors';
+import { isDefined } from '@utils/isDefined';
 import { networkData } from '@utils/network';
 import { builder } from '../builder';
 import FungibleAccount from '../objects/fungible-account';
-import type { IFungibleChainAccount } from '../types/graphql-types';
 import { FungibleAccountName } from '../types/graphql-types';
 
 builder.queryField('fungibleAccountsByPublicKey', (t) =>
@@ -49,7 +49,7 @@ builder.queryField('fungibleAccountsByPublicKey', (t) =>
                   }),
                 ),
               )
-            ).filter(Boolean) as IFungibleChainAccount[];
+            ).filter(isDefined);
 
             return {
               __typename: FungibleAccountName,
diff --git a/packages/apps/graph/src/graph/query/fungible-chain-account.ts b/packages/apps/graph/src/graph/query/fungible-chain-account.ts
index 4d22bbfab0..dfe538f52c 100644
--- a/packages/apps/graph/src/graph/query/fungible-chain-account.ts
+++ b/packages/apps/graph/src/graph/query/fungible-chain-account.ts
@@ -2,8 +2,10 @@ import { getFungibleChainAccount } from '@services/account-service';
 import { COMPLEXITY } from '@services/complexity';
 import { dotenv } from '@utils/dotenv';
 import { normalizeError } from '@utils/errors';
+import { isDefined } from '@utils/isDefined';
 import { builder } from '../builder';
 import FungibleChainAccount from '../objects/fungible-chain-account';
+import { CHAINS } from '@kadena/chainweb-node-client';
 
 builder.queryField('fungibleChainAccount', (t) =>
   t.field({
@@ -17,28 +19,38 @@ builder.queryField('fungibleChainAccount', (t) =>
         },
       }),
       fungibleName: t.arg.string({
-        required: false,
+        defaultValue: dotenv.DEFAULT_FUNGIBLE_NAME,
         validate: {
           minLength: 1,
         },
       }),
-      chainId: t.arg.string({
+      chainIds: t.arg.stringList({
+        defaultValue: [...CHAINS],
         required: true,
         validate: {
           minLength: 1,
+          items: {
+            minLength: 1,
+          },
         },
       }),
     },
-    type: FungibleChainAccount,
+    type: [FungibleChainAccount],
     nullable: true,
     complexity: COMPLEXITY.FIELD.CHAINWEB_NODE,
     async resolve(__parent, args) {
       try {
-        return await getFungibleChainAccount({
-          chainId: args.chainId,
-          fungibleName: args.fungibleName || dotenv.DEFAULT_FUNGIBLE_NAME,
-          accountName: args.accountName,
-        });
+        return (
+          await Promise.all(
+            args.chainIds.map((chainId) =>
+              getFungibleChainAccount({
+                chainId: chainId,
+                fungibleName: args.fungibleName as string,
+                accountName: args.accountName,
+              }),
+            ),
+          )
+        ).filter(isDefined);
       } catch (error) {
         throw normalizeError(error);
       }
diff --git a/packages/apps/graph/src/graph/query/fungible-chain-accounts-by-public-key.ts b/packages/apps/graph/src/graph/query/fungible-chain-accounts-by-public-key.ts
index 52bd8c72a1..d9ef4cd95d 100644
--- a/packages/apps/graph/src/graph/query/fungible-chain-accounts-by-public-key.ts
+++ b/packages/apps/graph/src/graph/query/fungible-chain-accounts-by-public-key.ts
@@ -1,9 +1,9 @@
 import { prismaClient } from '@db/prisma-client';
 import { getFungibleChainAccount } from '@services/account-service';
 import { normalizeError } from '@utils/errors';
+import { isDefined } from '@utils/isDefined';
 import { builder } from '../builder';
 import FungibleChainAccount from '../objects/fungible-chain-account';
-import type { IFungibleChainAccount } from '../types/graphql-types';
 
 builder.queryField('fungibleChainAccountsByPublicKey', (t) =>
   t.field({
@@ -51,7 +51,7 @@ builder.queryField('fungibleChainAccountsByPublicKey', (t) =>
               });
             }),
           )
-        ).filter(Boolean) as IFungibleChainAccount[];
+        ).filter(isDefined);
 
         return fungibleChainAccounts;
       } catch (error) {
diff --git a/packages/apps/graph/src/graph/subscription/new-blocks-from-depth.ts b/packages/apps/graph/src/graph/subscription/new-blocks-from-depth.ts
index ad6fe5ef5a..a209b4febf 100644
--- a/packages/apps/graph/src/graph/subscription/new-blocks-from-depth.ts
+++ b/packages/apps/graph/src/graph/subscription/new-blocks-from-depth.ts
@@ -5,6 +5,7 @@ import { nullishOrEmpty } from '@utils/nullish-or-empty';
 import type { IContext } from '../builder';
 import { builder } from '../builder';
 import GQLBlock from '../objects/block';
+import { CHAINS } from '@kadena/chainweb-node-client';
 
 builder.subscriptionField('newBlocksFromDepth', (t) =>
   t.field({
@@ -18,7 +19,7 @@ builder.subscriptionField('newBlocksFromDepth', (t) =>
         },
       }),
       chainIds: t.arg.stringList({
-        required: true,
+        defaultValue: [...CHAINS],
         validate: {
           minLength: 1,
           items: {
@@ -29,7 +30,7 @@ builder.subscriptionField('newBlocksFromDepth', (t) =>
     },
     nullable: true,
     subscribe: (__root, args, context) =>
-      iteratorFn(args.chainIds, args.minimumDepth, context),
+      iteratorFn(args.chainIds as string[], args.minimumDepth, context),
     resolve: (parent) => parent,
   }),
 );
diff --git a/packages/apps/graph/src/graph/subscription/new-blocks.ts b/packages/apps/graph/src/graph/subscription/new-blocks.ts
index f0e45381ec..392b9aadd5 100644
--- a/packages/apps/graph/src/graph/subscription/new-blocks.ts
+++ b/packages/apps/graph/src/graph/subscription/new-blocks.ts
@@ -5,13 +5,14 @@ import { nullishOrEmpty } from '@utils/nullish-or-empty';
 import type { IContext } from '../builder';
 import { builder } from '../builder';
 import GQLBlock from '../objects/block';
+import { CHAINS } from '@kadena/chainweb-node-client';
 
 builder.subscriptionField('newBlocks', (t) =>
   t.field({
     description: 'Subscribe to new blocks.',
     args: {
       chainIds: t.arg.stringList({
-        required: false,
+        defaultValue: [...CHAINS],
         validate: {
           minLength: 1,
           items: {
diff --git a/packages/apps/graph/src/graph/types/graphql-types.ts b/packages/apps/graph/src/graph/types/graphql-types.ts
index 1e77744209..c32ad59323 100644
--- a/packages/apps/graph/src/graph/types/graphql-types.ts
+++ b/packages/apps/graph/src/graph/types/graphql-types.ts
@@ -134,7 +134,6 @@ export interface ITransactionResult {
   goodResult: string | null;
   height: bigint;
   logs: string | null;
-  metadata: string | null;
   eventCount: bigint | null;
   transactionId: bigint | null;
 }
diff --git a/packages/apps/graph/src/services/git/path.ts b/packages/apps/graph/src/services/git/path.ts
index b34d554102..ac3717596d 100644
--- a/packages/apps/graph/src/services/git/path.ts
+++ b/packages/apps/graph/src/services/git/path.ts
@@ -1,3 +1,4 @@
+import { isDefined } from '@utils/isDefined';
 import {
   mkdirSync,
   readdirSync,
@@ -52,7 +53,7 @@ export async function flattenFolder(
       // if file, rename to include parent folder name
       if (basePath === currentPath) continue;
       const relativePath = currentPath.replace(basePath, '');
-      const folderChain = relativePath.split('/').filter(Boolean).join('.');
+      const folderChain = relativePath.split('/').filter(isDefined).join('.');
       const newFilePath = join(
         basePath,
         `${basename(folderChain)}.${basename(file)}`,
diff --git a/packages/apps/graph/src/utils/isDefined.ts b/packages/apps/graph/src/utils/isDefined.ts
new file mode 100644
index 0000000000..65b70a05df
--- /dev/null
+++ b/packages/apps/graph/src/utils/isDefined.ts
@@ -0,0 +1,11 @@
+/**
+ * Wrapper for filter(Boolean) that also narrows the type.
+ * @example `[].filter(isDefined)` is equal to `[].filter(Boolean)`.
+ * @param value - The value to check.
+ * @returns `true` if the value is defined, `false` otherwise.
+ */
+export function isDefined(
+  value: T | null | undefined,
+): value is NonNullable {
+  return Boolean(value);
+}
diff --git a/packages/apps/rwa-demo/codegen-sdk.yml b/packages/apps/rwa-demo/codegen-sdk.yml
index 3f0b027fbe..323d38721b 100644
--- a/packages/apps/rwa-demo/codegen-sdk.yml
+++ b/packages/apps/rwa-demo/codegen-sdk.yml
@@ -1,6 +1,6 @@
 overwrite: true
-# schema: ./node_modules/@kadena/graph/generated-schema.graphql
-schema: https://graph.kadena.network/graphql
+schema: ./node_modules/@kadena/graph/generated-schema.graphql
+# schema: https://graph.kadena.network/graphql
 generates:
   ./src/__generated__/sdk.ts:
     documents: 'src/**/*.graph.(ts|tsx)'