How to show transaction input data in a Hyperledger Composer query

半腔热情 提交于 2019-12-01 13:33:56

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

}

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).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!