gql-sync

command
v0.6.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2026 License: MIT Imports: 15 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL