ArweaveKit Docs
  • ArweaveKit
    • Introduction
  • 🔐Wallets
    • Introduction to Wallets
    • Create Wallet
    • Get Wallet Address
    • Get Wallet Balance
    • Wallet Plugins
  • 💳ARWEAVE WALLET KIT
    • Introduction to Arweave Wallet Kit
    • Setup
    • Connect Button
    • Hooks
    • Customization
  • 🏦Transactions
    • Introduction to Transactions
    • Create Transaction
    • Sign Transaction
    • Post Transaction
    • Get Transaction Status
    • Get Transaction
    • Create and Post Transaction with Othent
    • Transaction Plugins
  • 📄SMART CONTRACTS
    • Introduction to Smart Contracts
    • Create Contract
    • Write Contract
    • Read Contract State
    • View Contract State
    • Write Contract with Othent
    • Read Contract with Othent
    • Smart Contract Plugins
  • ✅AUTH
    • Introduction to Auth
    • Connect
    • Disconnect
    • Get Active Address
    • Get Permissions
    • Get Wallet Names
    • Get All Addresses
    • Get Active Public Key
    • Is Installed
    • Log In with Othent
    • Log Out with Othent
    • Get User Details with Othent
    • Auth Plugins
  • 🔐Encryption
    • Introduction to Encryption
    • Encrypt Data with AES
    • Decrypt Data with AES
    • Encrypt AES Key with RSA
    • Decrypt AES Key with RSA
    • Encryption Plugins
  • 🌐GRAPHQL
    • Introduction to GraphQL
    • Query All Arweave Transactions
    • Query Arweave Data
    • Query Arweave Transactions
    • GraphQL Plugins
  • 🗺️RoadMap
    • Features
  • 📘REFERENCES
    • ArweaveKit in Browser Environments
  • 🛠️SUPPORTING TOOLS
    • Arweave StarterKit
Powered by GitBook
On this page
  • Basic Syntax
  • Input Parameters
  • Returned Data

Was this helpful?

  1. GRAPHQL

Query Arweave Transactions

Query GraphQL for Arweave Transactions data with pagination support

You can query for transactions data with support for cursor based pagination on GraphQL endpoint. It is expected from consumer of this method to write the logic for storing the cursor returned and looping until the last page.

Basic Syntax

The function that we will be using is queryTransactionsGQL. For implementation details, see below.

import { queryTransactionsGQL } from 'arweavekit/graphql';

const response = await queryTransactionsGQL(queryString, options);

Input Parameters

You must supply queryTransactionsGQL with two inputs.

  • QueryString: string - A valid GraphQL query string with cursor and first filter.

  • Options: object - An options object.

    • gateway: string - Gateway url like arweave.net

    • filters: object - Filters object like first: 100 . In case of no filters, pass an empty object. cursor filter is not optional. A persisted cursor filter must be supplied in the filters.

Returned Data

The expected response will be an object with following fields.

  • status: number - Query HTTP status code. Example, 200.

  • data: GraphQLEdge[] - Successful response will return a list of GraphQL edges and in case of failure empty list will be returned here.

  • cursor: string - cursor id of last GraphQLEdge.

  • hasNextPage: boolean - if the next page exist this will be true.

  • errors: GraphQLError[] | null - Incase of failure you can expect this field to be non-nullish and a list of GraphQLError is provided.

    • GraphQLError: object - GraphQL error object contains following fields:

      • message: string - Error message in string format

      • extensions: object - This object has a field code and its supposed to provide you with error code.

PreviousQuery Arweave DataNextGraphQL Plugins

Last updated 1 year ago

Was this helpful?

🌐