DataFetcher<Optional<TransactionAdapter>> getTransactionDataFetcher() {
    return dataFetchingEnvironment -> {
      final BlockchainQueries blockchain =
          dataFetchingEnvironment.getGraphQlContext().get(GraphQLContextType.BLOCKCHAIN_QUERIES);
      final Bytes32 hash = dataFetchingEnvironment.getArgument("hash");
      final Optional<TransactionWithMetadata> tran = blockchain.transactionByHash(Hash.wrap(hash));
      return tran.map(this::getTransactionAdapter);
    };
  }
Returns a DataFetcher that fetches a specific block in the Ethereum blockchain.

<p>The DataFetcher is a functional interface. It has a single method that takes a
DataFetchingEnvironment object as input. This method fetches a block based on either a block
number or a block hash. If both a block number and a block hash are provided, it throws a
GraphQLException with INVALID_PARAMS error. If neither a block number nor a block hash is
provided, it fetches the latest block.

<p>The fetched block is then wrapped in a {@link NormalBlockAdapter} and returned as an {@code
Optional<NormalBlockAdapter>}.

@return a DataFetcher that fetches a specific block in the Ethereum blockchain
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/graphql/GraphQLDataFetchers.java