CLI tool to generate typed client code (Swift initially, later TypeScript/Flow) from GraphQL schemas and query documents. Version 0.4.0 is early stage — only Swift output, no fragment support beyond exact type matches. Unstable API. Superseded by @graphql-codegen/cli (v1+) and Apollo CLI. Releases were sporadic. Differentiated as first codegen from Apollo, but quickly replaced.
npm install graphql-codegenNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Install CLI, download schema with auth header, generate Swift code from .graphql files.
Migrate to @graphql-codegen/cli or @apollo/cli.
Use @graphql-codegen/cli for multi-language output.
Rewrite fragments to match parent type or use later version.
Use CLI directly or migrate to newer tools.
Install globally: npm install -g apollo-codegen@0.4.0
Ensure download-schema succeeded and path is correct.
Change fragment type condition to match exact parent type.