Hyperledger Fabric supports only 2 types of transactions on a broader level.
- Invoke - If you send the proposal response to the orderer then your values (if any) are written to the state otherwise, any queried value are returned as a part of the proposal response payload.
- Deploy - In case of Chaincode deployment transactions where the payload is just a chaincode binary.
If you have a read-only transaction then you could just submit the transaction and get the proposal response payload from the peer(s). The proposal response itself is the result of your query invocation.
Just to be sure to submit the transaction, you can subscribe to the transaction event using the given transaction IDYou can use the same transaction ID to query a peer for the transaction block
Once you get the transaction payload in JSON you can dig into the JSON and find the return value in proposal response part of the JSON payload.