GraphQL Wallet API Endpoint
This GraphQL API provides operations to manage Wallets and Wallet Transactions.
To use this API, you need to have:
- A GraphQL client to make queries and mutations to this API (e.g., Apollo)
- The URL of the GraphQL endpoint
The following operations are available in this API:
-
getAllWalletTransaction(walletId: String!, skip: Int!, limit: Int!)
: Returns a list of wallet transactions for the specified wallet ID, with optional pagination. -
getWallet(walletId: String!)
: Returns the wallet with the specified ID.
-
createWallet(createWalletInput: WalletInput!)
: Creates a new wallet with the specified name and optional balance. -
updateWallet(updateWalletInput: UpdateWalletInput!)
: Updates the wallet with the specified ID, with optional name and balance. -
removeWallet(id: Int!)
: Removes the wallet with the specified ID. -
setupWallet(setupWalletInput: WalletInput!)
: Creates or updates a wallet with the specified name and balance. -
transactWallet(transactWalletInput: walletTransactionInput!)
: Creates a new transaction for the specified wallet ID with the specified description, amount, and type (credit or debit).
-
WalletOutput
: The output type for wallets, containing the wallet's balance, name, and ID. -
walletTransactionOutput
: The output type for wallet transactions, containing the transaction's description, wallet ID, amount, type, ID, transaction ID, and balance. -
WALLET_TX_TYPE
: The enumeration for wallet transaction types, with options for credit and debit. -
WalletInput
: The input type for creating a new wallet or updating a wallet's name and balance. -
UpdateWalletInput
: The input type for updating a wallet's name and balance. -
walletTransactionInput
: The input type for creating a new wallet transaction with the specified description, amount, and type (credit or debit).
To get all wallets:
query { getWallet(walletId: "provide_wallet_id") { balance name id } }
To create a new wallet:
mutation { createWallet(createWalletInput: {name: "New Wallet", balance: 100}) { balance name id } }
- GraphQL - Query language and runtime for APIs
- Node.js - JavaScript runtime
- Apollo Server - GraphQL server implementation for Node.js