Documentation
¶
Overview ¶
Command gql-sync auto-extracts Twitter GraphQL queryIDs from x.com's webpack bundles and regenerates queryids_gen.go — the "generated" layer of the endpoints override chain (env > generated > committed).
It builds the chunk map via internal/bundle (an HTTPFetcher that honors -proxy, or a disk fixtures fetcher for -fixtures), WalkImports over the bundles, extracts operationName -> queryId (deduped by source priority), and writes a gofmt'd, sorted, code-generated map. On an empty or failed extraction it leaves queryids_gen.go untouched so a transient x.com break can never clobber the committed IDs; -fail-on-empty additionally exits non-zero.
Click to show internal directories.
Click to hide internal directories.