Skip to content

Commit

Permalink
adding generated files
Browse files Browse the repository at this point in the history
  • Loading branch information
raghukapur9 committed Sep 22, 2024
1 parent b0764cc commit eae1c5a
Show file tree
Hide file tree
Showing 4 changed files with 408 additions and 5,863 deletions.
145 changes: 29 additions & 116 deletions packages/graphql/src/graphql/generated/fuelcore/queries/index.js
Original file line number Diff line number Diff line change
@@ -1,119 +1,32 @@
const fs = require('fs');
const path = require('path');

module.exports.balance = fs.readFileSync(
path.join(__dirname, 'balance.graphql'),
'utf8',
);
module.exports.balances = fs.readFileSync(
path.join(__dirname, 'balances.graphql'),
'utf8',
);
module.exports.block = fs.readFileSync(
path.join(__dirname, 'block.graphql'),
'utf8',
);
module.exports.blocks = fs.readFileSync(
path.join(__dirname, 'blocks.graphql'),
'utf8',
);
module.exports.chain = fs.readFileSync(
path.join(__dirname, 'chain.graphql'),
'utf8',
);
module.exports.coin = fs.readFileSync(
path.join(__dirname, 'coin.graphql'),
'utf8',
);
module.exports.coins = fs.readFileSync(
path.join(__dirname, 'coins.graphql'),
'utf8',
);
module.exports.coinsToSpend = fs.readFileSync(
path.join(__dirname, 'coinsToSpend.graphql'),
'utf8',
);
module.exports.contract = fs.readFileSync(
path.join(__dirname, 'contract.graphql'),
'utf8',
);
module.exports.contractBalance = fs.readFileSync(
path.join(__dirname, 'contractBalance.graphql'),
'utf8',
);
module.exports.contractBalances = fs.readFileSync(
path.join(__dirname, 'contractBalances.graphql'),
'utf8',
);
module.exports.estimateGasPrice = fs.readFileSync(
path.join(__dirname, 'estimateGasPrice.graphql'),
'utf8',
);
module.exports.estimatePredicates = fs.readFileSync(
path.join(__dirname, 'estimatePredicates.graphql'),
'utf8',
);
module.exports.health = fs.readFileSync(
path.join(__dirname, 'health.graphql'),
'utf8',
);
module.exports.latestGasPrice = fs.readFileSync(
path.join(__dirname, 'latestGasPrice.graphql'),
'utf8',
);
module.exports.memory = fs.readFileSync(
path.join(__dirname, 'memory.graphql'),
'utf8',
);
module.exports.message = fs.readFileSync(
path.join(__dirname, 'message.graphql'),
'utf8',
);
module.exports.messageProof = fs.readFileSync(
path.join(__dirname, 'messageProof.graphql'),
'utf8',
);
module.exports.messageStatus = fs.readFileSync(
path.join(__dirname, 'messageStatus.graphql'),
'utf8',
);
module.exports.messages = fs.readFileSync(
path.join(__dirname, 'messages.graphql'),
'utf8',
);
module.exports.nodeInfo = fs.readFileSync(
path.join(__dirname, 'nodeInfo.graphql'),
'utf8',
);
module.exports.register = fs.readFileSync(
path.join(__dirname, 'register.graphql'),
'utf8',
);
module.exports.relayedTransactionStatus = fs.readFileSync(
path.join(__dirname, 'relayedTransactionStatus.graphql'),
'utf8',
);
module.exports.transaction = fs.readFileSync(
path.join(__dirname, 'transaction.graphql'),
'utf8',
);
module.exports.transactions = fs.readFileSync(
path.join(__dirname, 'transactions.graphql'),
'utf8',
);
module.exports.transactionsByOwner = fs.readFileSync(
path.join(__dirname, 'transactionsByOwner.graphql'),
'utf8',
);
module.exports.transactionsByBlockId = fs.readFileSync(
path.join(__dirname, 'transactionsByBlockId.graphql'),
'utf8',
);
module.exports.tps = fs.readFileSync(
path.join(__dirname, 'tps.graphql'),
'utf8',
);
module.exports.getBlocksDashboard = fs.readFileSync(
path.join(__dirname, 'getBlocksDashboard.graphql'),
'utf8',
);
module.exports.balance = fs.readFileSync(path.join(__dirname, 'balance.graphql'), 'utf8');
module.exports.balances = fs.readFileSync(path.join(__dirname, 'balances.graphql'), 'utf8');
module.exports.block = fs.readFileSync(path.join(__dirname, 'block.graphql'), 'utf8');
module.exports.blocks = fs.readFileSync(path.join(__dirname, 'blocks.graphql'), 'utf8');
module.exports.chain = fs.readFileSync(path.join(__dirname, 'chain.graphql'), 'utf8');
module.exports.coin = fs.readFileSync(path.join(__dirname, 'coin.graphql'), 'utf8');
module.exports.coins = fs.readFileSync(path.join(__dirname, 'coins.graphql'), 'utf8');
module.exports.coinsToSpend = fs.readFileSync(path.join(__dirname, 'coinsToSpend.graphql'), 'utf8');
module.exports.contract = fs.readFileSync(path.join(__dirname, 'contract.graphql'), 'utf8');
module.exports.contractBalance = fs.readFileSync(path.join(__dirname, 'contractBalance.graphql'), 'utf8');
module.exports.contractBalances = fs.readFileSync(path.join(__dirname, 'contractBalances.graphql'), 'utf8');
module.exports.estimateGasPrice = fs.readFileSync(path.join(__dirname, 'estimateGasPrice.graphql'), 'utf8');
module.exports.estimatePredicates = fs.readFileSync(path.join(__dirname, 'estimatePredicates.graphql'), 'utf8');
module.exports.health = fs.readFileSync(path.join(__dirname, 'health.graphql'), 'utf8');
module.exports.latestGasPrice = fs.readFileSync(path.join(__dirname, 'latestGasPrice.graphql'), 'utf8');
module.exports.memory = fs.readFileSync(path.join(__dirname, 'memory.graphql'), 'utf8');
module.exports.message = fs.readFileSync(path.join(__dirname, 'message.graphql'), 'utf8');
module.exports.messageProof = fs.readFileSync(path.join(__dirname, 'messageProof.graphql'), 'utf8');
module.exports.messageStatus = fs.readFileSync(path.join(__dirname, 'messageStatus.graphql'), 'utf8');
module.exports.messages = fs.readFileSync(path.join(__dirname, 'messages.graphql'), 'utf8');
module.exports.nodeInfo = fs.readFileSync(path.join(__dirname, 'nodeInfo.graphql'), 'utf8');
module.exports.register = fs.readFileSync(path.join(__dirname, 'register.graphql'), 'utf8');
module.exports.relayedTransactionStatus = fs.readFileSync(path.join(__dirname, 'relayedTransactionStatus.graphql'), 'utf8');
module.exports.transaction = fs.readFileSync(path.join(__dirname, 'transaction.graphql'), 'utf8');
module.exports.transactions = fs.readFileSync(path.join(__dirname, 'transactions.graphql'), 'utf8');
module.exports.transactionsByOwner = fs.readFileSync(path.join(__dirname, 'transactionsByOwner.graphql'), 'utf8');
module.exports.transactionsByBlockId = fs.readFileSync(path.join(__dirname, 'transactionsByBlockId.graphql'), 'utf8');
module.exports.tps = fs.readFileSync(path.join(__dirname, 'tps.graphql'), 'utf8');
module.exports.getBlocksDashboard = fs.readFileSync(path.join(__dirname, 'getBlocksDashboard.graphql'), 'utf8');
38 changes: 37 additions & 1 deletion packages/graphql/src/graphql/generated/mocks.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { GQLBalance, GQLBalanceConnection, GQLBalanceEdge, GQLBalanceFilterInput, GQLBlock, GQLBlockConnection, GQLBlockEdge, GQLBreakpoint, GQLChainInfo, GQLChangeOutput, GQLCoin, GQLCoinConnection, GQLCoinEdge, GQLCoinFilterInput, GQLCoinOutput, GQLConsensusParameters, GQLConsensusParametersPurpose, GQLContract, GQLContractBalance, GQLContractBalanceConnection, GQLContractBalanceEdge, GQLContractBalanceFilterInput, GQLContractConnection, GQLContractCreated, GQLContractOutput, GQLContractParameters, GQLDryRunFailureStatus, GQLDryRunSuccessStatus, GQLDryRunTransactionExecutionStatus, GQLEstimateGasPrice, GQLExcludeInput, GQLFailureStatus, GQLFeeParameters, GQLGasCosts, GQLGenesis, GQLGroupedInputCoin, GQLGroupedInputContract, GQLGroupedInputMessage, GQLGroupedOutputChanged, GQLGroupedOutputCoin, GQLGroupedOutputContractCreated, GQLHeader, GQLHeavyOperation, GQLInputCoin, GQLInputContract, GQLInputMessage, GQLLatestGasPrice, GQLLightOperation, GQLMerkleProof, GQLMessage, GQLMessageCoin, GQLMessageConnection, GQLMessageEdge, GQLMessageProof, GQLMessageStatus, GQLMutation, GQLNodeInfo, GQLOperation, GQLOperationReceipt, GQLOperationsFilterInput, GQLOutputBreakpoint, GQLPageInfo, GQLParsedTime, GQLPeerInfo, GQLPoAConsensus, GQLPolicies, GQLPredicateItem, GQLPredicateParameters, GQLProgramState, GQLQuery, GQLReceipt, GQLRelayedTransactionFailed, GQLRunResult, GQLScriptParameters, GQLSearchAccount, GQLSearchBlock, GQLSearchContract, GQLSearchResult, GQLSearchTransaction, GQLSpendQueryElementInput, GQLSqueezedOutStatus, GQLStateTransitionPurpose, GQLSubmittedStatus, GQLSubscription, GQLSuccessStatus, GQLTransaction, GQLTransactionConnection, GQLTransactionEdge, GQLTransactionGasCosts, GQLTxParameters, GQLUtxoItem, GQLVariableOutput, GQLBlockVersion, GQLConsensusParametersVersion, GQLContractParametersVersion, GQLFeeParametersVersion, GQLGasCostsVersion, GQLGroupedInputType, GQLGroupedOutputType, GQLHeaderVersion, GQLMessageState, GQLOperationType, GQLPredicateParametersVersion, GQLReceiptType, GQLReturnType, GQLRunState, GQLScriptParametersVersion, GQLTxParametersVersion } from './sdk';
import type { GQLBalance, GQLBalanceConnection, GQLBalanceEdge, GQLBalanceFilterInput, GQLBlock, GQLBlockConnection, GQLBlockEdge, GQLBlocksDashboard, GQLBlocksDashboardConnection, GQLBreakpoint, GQLChainInfo, GQLChangeOutput, GQLCoin, GQLCoinConnection, GQLCoinEdge, GQLCoinFilterInput, GQLCoinOutput, GQLConsensusParameters, GQLConsensusParametersPurpose, GQLContract, GQLContractBalance, GQLContractBalanceConnection, GQLContractBalanceEdge, GQLContractBalanceFilterInput, GQLContractConnection, GQLContractCreated, GQLContractOutput, GQLContractParameters, GQLDryRunFailureStatus, GQLDryRunSuccessStatus, GQLDryRunTransactionExecutionStatus, GQLEstimateGasPrice, GQLExcludeInput, GQLFailureStatus, GQLFeeParameters, GQLGasCosts, GQLGenesis, GQLGroupedInputCoin, GQLGroupedInputContract, GQLGroupedInputMessage, GQLGroupedOutputChanged, GQLGroupedOutputCoin, GQLGroupedOutputContractCreated, GQLHeader, GQLHeavyOperation, GQLInputCoin, GQLInputContract, GQLInputMessage, GQLLatestGasPrice, GQLLightOperation, GQLMerkleProof, GQLMessage, GQLMessageCoin, GQLMessageConnection, GQLMessageEdge, GQLMessageProof, GQLMessageStatus, GQLMutation, GQLNodeInfo, GQLOperation, GQLOperationReceipt, GQLOperationsFilterInput, GQLOutputBreakpoint, GQLPageInfo, GQLParsedTime, GQLPeerInfo, GQLPoAConsensus, GQLPolicies, GQLPredicateItem, GQLPredicateParameters, GQLProgramState, GQLQuery, GQLReceipt, GQLRelayedTransactionFailed, GQLRunResult, GQLScriptParameters, GQLSearchAccount, GQLSearchBlock, GQLSearchContract, GQLSearchResult, GQLSearchTransaction, GQLSpendQueryElementInput, GQLSqueezedOutStatus, GQLStateTransitionPurpose, GQLSubmittedStatus, GQLSubscription, GQLSuccessStatus, GQLTps, GQLTpsConnection, GQLTransaction, GQLTransactionConnection, GQLTransactionEdge, GQLTransactionGasCosts, GQLTxParameters, GQLUtxoItem, GQLVariableOutput, GQLBlockVersion, GQLConsensusParametersVersion, GQLContractParametersVersion, GQLFeeParametersVersion, GQLGasCostsVersion, GQLGroupedInputType, GQLGroupedOutputType, GQLHeaderVersion, GQLMessageState, GQLOperationType, GQLPredicateParametersVersion, GQLReceiptType, GQLReturnType, GQLRunState, GQLScriptParametersVersion, GQLTxParametersVersion } from './sdk';

export const aBalance = (overrides?: Partial<GQLBalance>): { __typename: 'Balance' } & GQLBalance => {
return {
Expand Down Expand Up @@ -66,6 +66,23 @@ export const aBlockEdge = (overrides?: Partial<GQLBlockEdge>): { __typename: 'Bl
};
};

export const aBlocksDashboard = (overrides?: Partial<GQLBlocksDashboard>): { __typename: 'BlocksDashboard' } & GQLBlocksDashboard => {
return {
__typename: 'BlocksDashboard',
blockNo: overrides && overrides.hasOwnProperty('blockNo') ? overrides.blockNo! : '0xc',
gasUsed: overrides && overrides.hasOwnProperty('gasUsed') ? overrides.gasUsed! : '0x5',
producer: overrides && overrides.hasOwnProperty('producer') ? overrides.producer! : 'error',
timestamp: overrides && overrides.hasOwnProperty('timestamp') ? overrides.timestamp! : '0x8',
};
};

export const aBlocksDashboardConnection = (overrides?: Partial<GQLBlocksDashboardConnection>): { __typename: 'BlocksDashboardConnection' } & GQLBlocksDashboardConnection => {
return {
__typename: 'BlocksDashboardConnection',
nodes: overrides && overrides.hasOwnProperty('nodes') ? overrides.nodes! : [aBlocksDashboard()],
};
};

export const aBreakpoint = (overrides?: Partial<GQLBreakpoint>): GQLBreakpoint => {
return {
contract: overrides && overrides.hasOwnProperty('contract') ? overrides.contract! : 'spxsyh8uujdpzc8kg4t7lkz0r7qmcdsb',
Expand Down Expand Up @@ -806,6 +823,7 @@ export const aQuery = (overrides?: Partial<GQLQuery>): { __typename: 'Query' } &
contracts: overrides && overrides.hasOwnProperty('contracts') ? overrides.contracts! : aContractConnection(),
estimateGasPrice: overrides && overrides.hasOwnProperty('estimateGasPrice') ? overrides.estimateGasPrice! : anEstimateGasPrice(),
estimatePredicates: overrides && overrides.hasOwnProperty('estimatePredicates') ? overrides.estimatePredicates! : aTransaction(),
getBlocksDashboard: overrides && overrides.hasOwnProperty('getBlocksDashboard') ? overrides.getBlocksDashboard! : aBlocksDashboardConnection(),
health: overrides && overrides.hasOwnProperty('health') ? overrides.health! : true,
latestGasPrice: overrides && overrides.hasOwnProperty('latestGasPrice') ? overrides.latestGasPrice! : aLatestGasPrice(),
memory: overrides && overrides.hasOwnProperty('memory') ? overrides.memory! : 'id',
Expand All @@ -818,6 +836,7 @@ export const aQuery = (overrides?: Partial<GQLQuery>): { __typename: 'Query' } &
register: overrides && overrides.hasOwnProperty('register') ? overrides.register! : '0x3',
relayedTransactionStatus: overrides && overrides.hasOwnProperty('relayedTransactionStatus') ? overrides.relayedTransactionStatus! : aRelayedTransactionFailed(),
search: overrides && overrides.hasOwnProperty('search') ? overrides.search! : aSearchResult(),
tps: overrides && overrides.hasOwnProperty('tps') ? overrides.tps! : aTpsConnection(),
transaction: overrides && overrides.hasOwnProperty('transaction') ? overrides.transaction! : aTransaction(),
transactions: overrides && overrides.hasOwnProperty('transactions') ? overrides.transactions! : aTransactionConnection(),
transactionsByBlockId: overrides && overrides.hasOwnProperty('transactionsByBlockId') ? overrides.transactionsByBlockId! : aTransactionConnection(),
Expand Down Expand Up @@ -975,6 +994,23 @@ export const aSuccessStatus = (overrides?: Partial<GQLSuccessStatus>): { __typen
};
};

export const aTps = (overrides?: Partial<GQLTps>): { __typename: 'TPS' } & GQLTps => {
return {
__typename: 'TPS',
end: overrides && overrides.hasOwnProperty('end') ? overrides.end! : 'unde',
start: overrides && overrides.hasOwnProperty('start') ? overrides.start! : 'rerum',
totalGas: overrides && overrides.hasOwnProperty('totalGas') ? overrides.totalGas! : '0x9',
txCount: overrides && overrides.hasOwnProperty('txCount') ? overrides.txCount! : '0xA',
};
};

export const aTpsConnection = (overrides?: Partial<GQLTpsConnection>): { __typename: 'TPSConnection' } & GQLTpsConnection => {
return {
__typename: 'TPSConnection',
nodes: overrides && overrides.hasOwnProperty('nodes') ? overrides.nodes! : [aTps()],
};
};

export const aTransaction = (overrides?: Partial<GQLTransaction>): { __typename: 'Transaction' } & GQLTransaction => {
return {
__typename: 'Transaction',
Expand Down
Loading

0 comments on commit eae1c5a

Please sign in to comment.