How to show transaction input data in a Hyperledger Composer query

后端 未结 2 1828
说谎
说谎 2021-01-16 10:56

I\'m trying to build a Historian Query that will allow me to see Transactions (and their original inputs). I was kind of trying out an idea based on this issue https://githu

相关标签:
2条回答
  • 2021-01-16 11:20

    So actually, instead of bothering with a query to the Historian, I got this to work using this query

    query myTransactions{
      description: "return all transactions made (not system transactions)"
      statement: SELECT org.acme.sample.NAME_OF_TRANSACTION_CLASS
    
    }
    
    0 讨论(0)
  • 2021-01-16 11:30

    correct, that will work, as its querying a Transaction Registry (or registries) direct. Ultimately, you should be able to query through the Historian Registry too - that is, the input to the transaction should be displayed in full in the historian as well. The historical transaction record has a relationship to the Transaction invoked (from the Txn Registry) to find out 'what the change to the asset (say) was' ie a la Playground. Queries are meant add 'value' to Historian as 'the' historical record - eg"query the history of transactions (and what was it that changed) of type x for the period 1 to period 2". On REST support in the Historian feature - we plan on providing REST support for Historian too and this is in the pipeline (will update the answer later when it is released).

    0 讨论(0)
提交回复
热议问题