apollo-check
**Project context:** Values in angle brackets below (e.g. `<scheme>`, `<JIRA_KEY>`, `<flag-key-enum>`) are resolved at runtime — detect them from the project…
**Project context:** Values in angle brackets below (e.g. `<scheme>`, `<JIRA_KEY>`, `<flag-key-enum>`) are resolved at runtime — detect them from the project (`xcodebuild -list -json` for the scheme, `git`/`gh` for repo & owner, the branch name for the Jira key, a codebase
> /plugin marketplace add carloshpdoc/ios-workflow-claudeHow it fires
How this command gets triggered: by you, by Claude, or both.
/apollo-migrateContext preview
What this command does when you run it.
**Project context:** Values in angle brackets below (e.g. `<scheme>`, `<JIRA_KEY>`, `<flag-key-enum>`) are resolved at runtime — detect them from the project (`xcodebuild -list -json` for the scheme, `git`/`gh` for repo & owner, the branch name for the Jira key, a codebase
> **Project context:** Values in angle brackets below (e.g. `<scheme>`, `<JIRA_KEY>`, `<flag-key-enum>`) are resolved at runtime — detect them from the project (`xcodebuild -list -json` for the scheme, `git`/`gh` for repo & owner, the branch name for the Jira key, a codebase search for flag/font files), or ask if they cannot be inferred. This plugin ships no per-project config.
Migrate the Apollo repository **$ARGUMENTS** to the new `GraphQLClientProtocol` pattern.
**MANDATORY:** Before writing any code, read the investigation file:
docs/apollo-removal/issues/$ARGUMENTS.md
If the investigation file does NOT exist, tell the user to run `/apollo-check $ARGUMENTS` first and stop. Do not proceed without an investigation.
If the investigation file exists, read it completely. It contains:
**Follow the investigation.** The migration steps are always the same (see CLAUDE.md). What changes per repo is the target files and consumers identified in the investigation. If you need to deviate from it, note the deviation and the reason — you will need to explain this in the report.
Read `docs/apollo-migration-guide.md` for the full migration guide.
**Gold standard reference files (read before writing code):**
The steps are always the same (defined in CLAUDE.md). Use the investigation file for repo-specific details:
Read the source files listed in the investigation. Verify the investigation is still accurate (no files changed since it was written).
Create `Queries/<Name>Query.swift` in the repository directory:
enum <Name>Query {
static let query = """
<paste the exact query from the .graphql file>
"""
static let operationName = "<OperationName>"
}Create `Models/<Name>GraphQLResponse.swift`:
Create `<Name>GraphQLDataSource.swift`:
Create `<Name>ResponseMapper.swift`:
Create or update `<Name>Repository.swift`:
// ✅ CORRECT pattern for repository methods
func fetchData(completion: @escaping (Model?) -> Void) {
Task {
do {
let response = try await dataSource.fetch()
let model = mapper.map(response)
DispatchQueue.main.async { completion(model) }
} catch {
Log.error(message: error.localizedDescription)
DispatchQueue.main.async { completion(nil) }
}
}
}Create `<Name>RepositoryFactory.swift` following the standard pattern from `docs/apollo-migration-guide.md`.
For each consumer listed in the investigation:
1. Replace `import Apollo` with `import Services` (if needed) 2. Replace `Network<Name>Repository()` with `<Name>RepositoryFactory.makeRepository()` 3. Remove any direct Apollo type usage (`<Query>.Data`, fragments, etc.) 4. Update method calls if the protocol signature changed 5. Verify the consumer still compiles
Remove the files listed in the investigation's "Files to Delete" section: 1. The `.graphql` file (unless it has shared fragments — check the plan) 2. The `.graphql.swift` file from `<scheme>/Services/Apollo/API/` 3. The old `Network*Repository.swift` (only if fully replaced) 4. Any Apollo-specific extensions or helpers only used by this repo
**MANDATORY after adding or deleting files.** Run:
tuist generate --no-open
This regenerates `<scheme>.xcodeproj/project.pbxproj` and removes orphaned references to deleted files. Skipping this step causes build failures ("file not found" errors for deleted files that are still referenced in the project).
Build the project to verify compilation:
xcodebuild -works
Reusable Claude Code slash-commands, skills, and workflows extracted from real iOS / backend projects. Packaged as three installable plugins - register the marketplace and /plugin install what you need.
Repo: carloshpdoc/ios-workflow-claude
**Project context:** Values in angle brackets below (e.g. `<scheme>`, `<JIRA_KEY>`, `<flag-key-enum>`) are resolved at runtime — detect them from the project…
**Project context:** Values in angle brackets below (e.g. `<scheme>`, `<JIRA_KEY>`, `<flag-key-enum>`) are resolved at runtime — detect them from the project…
**Project context:** Values in angle brackets below (e.g. `<scheme>`, `<JIRA_KEY>`, `<flag-key-enum>`) are resolved at runtime — detect them from the project…
**Project context:** Values in angle brackets below (e.g. `<scheme>`, `<JIRA_KEY>`, `<flag-key-enum>`) are resolved at runtime — detect them from the project…
Bump the app version or build number across all targets in the current project.
Review code quality applying DRY, SOLID, naming, and formatting standards