# API GRAPHQL Architect

> Architects enterprise GraphQL: federated graphs, schema registry governance, and supergraph operations with Rover and GraphOS. Use when working with supergraph ops, schema governance or when the user mentions supergraph ops, schema governance.

- Skill: `opknock/api-graphql-architect` (Agent Skill)
- Install (CLI): `npx get-skill add opknock/api-graphql-architect`
- Raw SKILL.md: https://api.skillmd.com/api/skills/opknock/api-graphql-architect/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Integrations & APIs
- License: MIT
- Author: OpKnock (https://skillmd.com/u/opknock)
- Updated: 2026-11-23
- Page: https://skillmd.com/skills/opknock/api-graphql-architect

---


Architects enterprise GraphQL: federated graphs, schema registry governance, and supergraph operations with Rover and GraphOS.

## Agentic Workflow: Read -> Reason -> Act (api-graphql-architect)

You are **api-graphql-architect** (backend) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.

### 1. Read — backend context for `api-graphql-architect`
- Domain: Architects enterprise GraphQL: federated graphs, schema registry governance, and supergraph operations with Rover and GraphOS.
- **supergraph-ops**: Compose, publish, and check supergraphs with Rover — `rover supergraph compose --config supergraph.yaml --output supergraph.graphql`
- **schema-governance**: Guard the schema against breaking changes with checks and linting — `rover subgraph check mygraph@prod --name products --schema ./products.graphql --`
- Check `knowledge` and `prerequisites: apollo-server, graphql-codegen, rover`

### 2. Reason — think for `api-graphql-architect`
- For `supergraph-ops`: Compose, publish, and check supergraphs with Rover — decide which checks to run
- For `schema-governance`: Guard the schema against breaking changes with checks and linting — decide which checks to run
- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs

### 3. Act — execute with `api-graphql-architect` tools
- Tools: `Glob`, `Grep`, `Read`, `Rover`, `Npx` (see frontmatter `tools`/`allowed-tools`)
- Use `safe_path` for any write; record evidence (paths, checksums)
- Fingerprint: `api-graphql-architect:0ab321c2`

# API GraphQL Architect

Designs and operates enterprise GraphQL platforms.

## When to Use
- Multiple teams share one graph
- Schema changes must be safe
- Standardizing subgraph patterns

## Real Commands

```bash
# Introspect a subgraph
rover graph introspect http://localhost:4001/graphql > products.graphql

# Publish
rover subgraph publish mygraph@prod --name products --schema ./products.graphql --routing-url http://products:4001

# Check for breaking changes
rover subgraph check mygraph@prod --name products --schema ./products.graphql

# Compose supergraph
rover supergraph compose --config supergraph.yaml --output supergraph.graphql

# Diff schemas locally
npx graphql-inspector diff old.graphql new.graphql
```

## Federation Principles
- One subgraph per team boundary
- Entities with @key for shared types
- Checks run on every subgraph PR

## Testing
Compose the supergraph locally and smoke-test queries across subgraphs.

## Best Practices
- Never publish unchecked subgraphs
- Keep supergraph artifacts in version control

## Capabilities

### supergraph-ops
Compose, publish, and check supergraphs with Rover

**Parameters:**
- `graphRef` (string): Apollo graph ref
- `config` (string): Supergraph config path

**Commands:**
- `rover supergraph compose --config supergraph.yaml --output supergraph.graphql`
- `rover subgraph publish mygraph@prod --name products --schema ./products.graphql --routing-url http://products:4001`
- `rover subgraph check mygraph@prod --name products --schema ./products.graphql`
- `rover graph introspect http://localhost:4001/graphql > products.graphql`
- `rover supergraph fetch mygraph@prod --output current.graphql`

**Examples:**
- rover supergraph compose --config supergraph.yaml --output supergraph.graphql
- rover subgraph check mygraph@prod --name products --schema ./products.graphql
- rover supergraph fetch mygraph@prod --output current.graphql

### schema-governance
Guard the schema against breaking changes with checks and linting

**Parameters:**
- `oldSchema` (string): Previous schema
- `newSchema` (string): Candidate schema

**Commands:**
- `rover subgraph check mygraph@prod --name products --schema ./products.graphql --compare prod`
- `npx graphql-inspector diff old.graphql new.graphql`
- `graphql-inspector validate documents/**/*.graphql schema.graphql`
- `npx @graphql-inspector/cli coverage schema.graphql docs/**/*.graphql`
- `graphql-inspector simulate-client requests.json schema.graphql`

**Examples:**
- npx graphql-inspector diff old.graphql new.graphql
- rover subgraph check mygraph@prod --name products --schema ./products.graphql
- graphql-inspector validate docs/**/*.graphql schema.graphql

## References
- [Rover CLI](https://www.apollographql.com/docs/rover/)
- [Apollo Federation](https://www.apollographql.com/docs/federation/)
- [GraphQL Inspector](https://the-guild.dev/graphql/inspector/docs)

