feat: 🎸 Retrieve instruction info from middleware(if available) #1369
+1,502
−497
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add option to query information from middleware for instruction related methods.
Breaking Changes
🧨 Methods in the
Instruction
entity that retrieve information from thechain were updated to use middleware for fetching data, when available. If middleware is
unavailable, the methods will continue to fetch data directly from the chain.
The following methods were modified with this logic:
details
,getAffirmations
,getLegs
,getMediators
,getOffChainAffirmations
,getOffChainAffirmationForLeg
.When querying via middleware, these methods will now throw an error in the following cases:
a. If the instruction does not exist.
b.If the instruction data has not yet been processed by the middleware.
Also, the pagination options for
getAffirmations
andgetLegs
now supportsMiddlewarePaginationOptions
as well (when querying via middleware)JIRA Link
DA-1369
Checklist