# Sample Queries

Below are some sample queries you can use to gather information from the Connext contracts.

You can build your own queries using a [GraphQL Explorer](https://graphiql-online.com/graphiql) and enter your endpoint to limit the data to exactly what you need.

## Get origin domain details of an xcall

```graphql
query OriginTransfer {
  originTransfers(
    where: {
      # Query by the transaction hash of the xcall
      transactionHash: "<TRANSACTION_HASH>"
      # Or by the xcall's transfer ID
      transferId: "<TRANSFER_ID>"
    }
  ) {
    # Meta Data
    chainId
    nonce
    transferId
    to
    delegate
    receiveLocal
    callData
    slippage
    originSender
    originDomain
    destinationDomain
    transactionHash
    bridgedAmt
    status
    timestamp
    normalizedIn
    # Asset Data
    asset {
      id
      adoptedAsset
      canonicalId
      canonicalDomain
    }
  }
}
```

## Get destination domain details of an xcall

```graphql
query DestinationTransfer {
  destinationTransfers(where: { transferId: "<TRANSFER_ID>" }) {
    # Meta Data
    chainId
    nonce
    transferId
    to
    callData
    originDomain
    destinationDomain
    delegate
    # Asset Data
    asset {
      id
    }
    bridgedAmt
    # Executed event Data
    status
    routers {
      id
    }
    originSender
    # Executed Transaction
    executedCaller
    executedTransactionHash
    executedTimestamp
    executedGasPrice
    executedGasLimit
    executedBlockNumber
    # Reconciled Transaction
    reconciledCaller
    reconciledTransactionHash
    reconciledTimestamp
    reconciledGasPrice
    reconciledGasLimit
    reconciledBlockNumber
    routersFee
    slippage
  }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.connext.network/developers/reference/subgraphs/sample-queries.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
