Repository navigation
2.1.1
Apollo iOS CLI 2.1.1 — Rust codegen parity build.
Output is byte-identical to the official Swift apollo-ios-cli 2.1.1 on the upstream fixtures, the options matrix (conversion strategies, field merging, inflection rules, reduceGeneratedSchemaTypes), the synthetic KitchenSink fixture (nested lists, reserved/mock-conflicting names, interface hierarchies, unions, every literal and default-value kind, @skip/@include/@defer, local cache mutations, @import, @typePolicy), init output and operation manifests (persistedQueries and legacy, via generate and generate-operation-manifest). Includes the Bazel @flagfile expansion fix for RBE non-worker spawns.
CLI fixes in this build: file discovery follows symlinks (sandboxed inputs); no hardcoded app paths or namespaces in Bazel mode; --bazel-keep-schema-configuration and exact --bazel-generate-for <file> selection; --version reports 2.1.1; test mocks are written to TestMocks/ in Bazel schema_types mode; multiplex persistent worker with one shared parsed schema per schema and a compilation cache keyed on config digest; invalid operations are validation errors with Swift-like messages and exit code 1 instead of panics (verified on an invalid-inputs set against the Swift CLI).
Scoped test mocks (fork extension): output.testMocks accepts scope (all | referencedByOperations), includeTypes, excludeTypes, baseModule and includeTypealiases, and Bazel mode --bazel-mode test_mocks with --bazel-mocks-scope|for|exclude|base-module|typealiases, so a shared base mock module and per-feature mock modules compose. Verified against this version's Apollo iOS runtime: Swift-CLI and Rust-CLI mocks compiled side by side with an XCTest asserting identical behaviour, and a base/feature split whose union equals the unscoped output (split-module SwiftPM build + tests).
Bazel mode: test mocks now carry their fields, byte-identical to plain generate. Under --bazel-output-dir (--bazel-mode test_mocks and schema_types, with or without a --bazel-generate-for/--bazel-framework-path selection, one-shot and through the persistent worker) the CLI builds the IR of every compiled operation and fragment before generating the mocks, so MockFields are the app-wide union Swift produces (previously empty). Verified file for file against plain generate and the Swift CLI on AnimalKingdom and KitchenSink. Bazel mode no longer prunes generated files outside the tree artifact.
File discovery deduplicates files reached by overlapping search paths (e.g. operationSearchPaths: ["Ops/**/*.graphql", "**/*.graphql"]), like Swift; previously such a file was compiled twice and failed validation with a duplicate-definition error. Verified with five synthetic handoff cases (SchemaMetadata order, @include(if:) groups, legacy manifest order, escaped deprecation reasons, overlapping globs) against the Swift CLI of this version.