feat(api): add call_hash/block/time filters to extrinsics GraphQL field #8047
Conversation
Mirror list_extrinsics / GET /api/v1/extrinsics so GraphQL clients can narrow by call_hash, block_start/block_end, and from/to (String epoch-ms). Closes JSONbored#7872. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8047 +/- ##
=======================================
Coverage 97.67% 97.67%
=======================================
Files 220 220
Lines 27206 27211 +5
Branches 10783 10788 +5
=======================================
+ Hits 26574 26579 +5
Misses 140 140
Partials 492 492
🚀 New features to boost your workflow:
|
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-24 20:41:59 UTC
Review summary Nits — 4 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Summary
Adds
call_hash,block_start,block_end,from, andtoto the GraphQLextrinsicsfield so it matcheslist_extrinsics/GET /api/v1/extrinsics.Closes #7872
Why previous PRs were closed
dirty) — CI green, content OK; gate auto-closeddirty) again after resubmit with SDL + types — same dispositionReimplementation on a fresh branch off current
main(no competing open PR).What changed (4 files)
src/graphql-sdl.tsextrinsicsargs:call_hash: String,block_start: Int,block_end: Int,from: String,to: Stringfrom/toare String because epoch-ms overflows GraphQL Int32 (same asaccount_history/blocks)src/graphql.ts/api/v1/extrinsics(no local filter logic)generated/graphql/types.tsnpm run build:graphql-types) —QueryExtrinsicsArgsincludes the new fieldstests/graphql.test.tscall_hash+ block-range + time-range to the Postgres tierStringvsInt)Validation
vitest run tests/graphql.test.ts -t '#7872'— 2/2 passedsrc/graphql.tslines: 100% statements, 100% branches (10/10)codecov/patch≥99%)Test plan
extrinsics(call_hash: "0x…")reaches/api/v1/extrinsics?call_hash=…extrinsics(block_start:, block_end:)andextrinsics(from:, to:)forward correctlycall_hash/from/toare String;block_start/block_endare Int