Registry / devops / graphql-codegen

graphql-codegen

JSON →
library0.4.0jsnpmunverified

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.

devops
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

This is a CLI tool, not a library import.

apollo-codegen generate ...

CLI commands, not programmatic API.

apollo-codegen download-schema

Install CLI, download schema with auth header, generate Swift code from .graphql files.

npm install -g apollo-codegen@0.4.0 apollo-codegen download-schema http://localhost:4000/graphql --output schema.json --header "Authorization: Bearer ${AUTH_TOKEN}" apollo-codegen generate 'queries/**/*.graphql' --schema schema.json --output API.swift --namespace MyAPI
Debug
Known footguns
deprecatedThis package is deprecated in favor of @graphql-codegen/cli or Apollo CLI.
gotchaOnly generates Swift code (no TypeScript/Flow support).
breakingFragments are only supported if their type condition matches exactly the parent type.
gotchaProgrammatic API is not stable — only CLI commands are documented.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
8 hits · last 30 days
gptbot
3
ahrefsbot
1
Resources