I have defined a query in the query.qry file in my hyperledger composer app:
query selectPersonsByHobby {
description: "Select all persons with a certain hobby."
statement:
SELECT org.comp.myapp.Person
WHERE (passTime CONTAINS (name == _$targetHobby ))
}
Here's the relevant part of the model file:
participant Person identified by id {
o String id
o String firstName
o String lastName
o String email
o Interest[] passTime
}
concept Interest {
o String name
o String description
}
How can I access the query from my angular application and pass parameters;?
Is the following correct?:
return this.httpClient.get(`http://localhost:3000/api/queries/selectPersonsByHobby`, {_$targetHobby: "Football"});