Callam Delaney
Callam Delaney

Reputation: 660

Queries allow you to specify Params; But how do I pass params?

The documentation gives these examples of query definitions. My understanding is items starting with _$ are parameters you can pass to the query.

The only examples I can find of the Query() function inside the transaction processors do not provide parameters.

How can I pass params to my query?

Ala let result = Query('MyGreatQueryReqParam`, name = "john");

Upvotes: 0

Views: 174

Answers (1)

R Thatcher
R Thatcher

Reputation: 5570

As answered on Rocket Chat ...

The buildQuery and Query() methods are covered with examples at the bottom of this doc: https://hyperledger.github.io/composer/latest/api/runtime-api But the short answer is:

return query('Q1', { inputValue: 'blue' })

Upvotes: 1

Related Questions