Get transaction input and output address when filtering for both in OR condition

I have a query that fetch transactions for a specific address. I managed to create the filter in OR condition, so that inputAddress OR outputAddress must match the given one.
That works but it seems it misses the information about the address. I would like to fetch the inputAddress and outputAddress to understand where the filter did the match, but those fields are unavailable in the transactions API. I need some other field that helps me to understand the direction ofr the transaction, if the given wallet was in input or in output.
This is my query

query ($network: BitcoinNetwork!, $limit: Int!, $offset: Int!, $from: ISO8601DateTime, $till: ISO8601DateTime, $address: String!) {
  bitcoin(network: $network) {
    transactions(
      options: {desc: ["block.height", "index"], limit: $limit, offset: $offset}
      any: [{inputAddress: {is: $address}}, {outputAddress: {is: $address}}]
    ) {
      block(time: {since: $from, till: $till}) {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
        height
      }
      inputValue
      outputValue
      index
      hash
      feeValue
      txCoinbase
      fee_value_usd: feeValue(in: USD)
      minedValue
      outputCount
      inputCount
    }
  }
}

Looks like Coinpath is the API for what you are asking.

Coinpath like the name says traces the path b/w two addresses, even if they’re connected 4-5 levels deep.

Check sample query bitcoin coinpath example - Blockchain Data API

More docs on how coinapth works Bitquery V1 API Documentation | Blockchain Data API (V1 Docs)