# Tools that make federated GraphQL fast to build

Interactive playground tracing, schema exploration, lint enforcement, usage-based pruning, and CLI automation — all built into Cosmo.

## Schema tools, built into Cosmo

Cosmo ships a complete set of developer tools alongside its federation engine. The same platform that composes your graph also provides the playground, schema explorer, lint enforcer, usage analyzer, and CLI you need to build and maintain it.

Every tool connects to the same graph and the same analytics data. There is no context-switching between a separate IDE, a lint tool, and a deployment script. You work in one place.

## Why teams need federation-native developer tools

Generic IDEs and linters have no federation awareness. They see a single schema, not a composed graph with subgraphs, operation checks, and real traffic data.

Four problems that surface repeatedly without federation-native tooling.

### Query execution is a black box.

Standard GraphQL IDEs return the final result. No subgraph-level timing, no routing information, no visibility into parallel execution.

### Schema conventions drift across teams.

Without automated enforcement, naming conventions, documentation requirements, and deprecation standards vary by team and erode over time.

### Unused fields accumulate silently.

Teams cannot safely remove fields without usage data. Fear of breaking consumers leads to schema bloat and growing technical debt.

### Schema deployments are manual and unvalidated.

Without a CI-integrated CLI, schema changes go out without checks. Breaking changes reach staging before they are caught.

Cosmo Developer Experience tools address all of this natively — no third-party IDEs, no custom lint scripts, no separate deployment tooling.

## Cosmo Developer Experience capabilities

1. Playground & debugging  
2. Schema intelligence  
3. CLI

### Features

- **[GraphiQL Playground++](/content/cosmo/developer-experience/graphiql-playground/index.html)**  
    Enhanced GraphiQL with Advanced Request Tracing (ART). Add the X-WG-TRACE header and get tree and waterfall visualizations of query execution, including per-subgraph timing and inputs/outputs.

- **[Query Plan Visualization](/content/cosmo/developer-experience/query-plan-visualization/index.html)**  
    Include the X-WG-Include-Query-Plan header to receive the full query plan in the response extensions. Use X-WG-Skip-Loader to inspect plans without making subgraph requests.

- **[Custom Playground Scripts](/content/cosmo/developer-experience/custom-playground-scripts/index.html)**  
    Run JavaScript before and after operations. Pre-flight scripts handle authentication globally across tabs. Pre-operation and post-operation scripts run per-tab for setup, validation, and transformation. Supports CryptoJS and external fetch.

- **[Shared Playground State](/content/cosmo/developer-experience/shared-playground-state/index.html)**  
    Generate a URL that encodes a complete playground session — operation, variables, and headers. Recipients open the link and see the exact session, ready to run.

## Which tool do you need?

| If you are… | Start here |
| --- | --- |
| Debugging a slow or unexpected federated query | [GraphiQL Playground++](/content/cosmo/developer-experience/graphiql-playground/index.html) |
| Understanding how the router routes a query across subgraphs | [Query Plan Visualization](/content/cosmo/developer-experience/query-plan-visualization/index.html) |
| Sharing a query session with a teammate for review or debugging | [Shared Playground State](/content/cosmo/developer-experience/shared-playground-state/index.html) |
| Browsing types, fields, and authentication requirements | [Schema Explorer](/content/cosmo/developer-experience/schema-explorer/index.html) |
| Enforcing naming conventions and documentation on every check | [Lint Policies](/content/cosmo/developer-experience/lint-policies/index.html) |
| Finding unused or deprecated fields safe to remove | [Graph Pruning](/content/cosmo/developer-experience/graph-pruning/index.html) |
| Approving an intentional breaking change without disabling checks | [Breaking Change Overrides](/content/cosmo/developer-experience/breaking-change-overrides/index.html) |
| Automating schema checks and deployments in CI/CD | [Cosmo CLI (wgc)](/content/cosmo/developer-experience/cosmo-cli/index.html) |

## Developer experience use cases

### Performance debugging

#### Find which subgraph is slowing your query

**Scenario**  
A product query takes 2 seconds. Multiple subgraphs contribute fields, but generic monitoring only shows the total request time.

**How Cosmo handles it**  
Open the Cosmo Playground, add the `X-WG-TRACE` header, and run the query. The waterfall visualization shows timing for each subgraph call.

**Outcome**  
The slow subgraph is immediately visible. The fix is targeted — no need to instrument each service separately.

### Schema governance

#### Stop naming inconsistencies before they reach production

**Scenario**  
Multiple teams contribute subgraphs. Without enforcement, field names drift between camelCase and snake_case, types lose descriptions, and deprecated fields accumulate without context.

**How Cosmo handles it**  
Enable Lint Policies with `FIELD_NAMES_SHOULD_BE_CAMEL_CASE`, `ALL_TYPES_REQUIRE_DESCRIPTION`, and `REQUIRE_DEPRECATION_REASON` as errors. Every `wgc subgraph check` enforces these rules automatically.

**Outcome**  
Schema conventions are enforced consistently. Code review stops catching style violations — the check does.

### CI/CD automation

#### Validate and deploy schema changes without manual steps

**Scenario**  
Schema changes require manual review in the Studio UI. Engineers forget to run checks, and breaking changes reach staging.

**How Cosmo handles it**  
Add `wgc subgraph check` to the CI pipeline on pull requests. On merge, `wgc subgraph publish` deploys the schema. Set `COSMO_API_KEY` as a CI secret.

**Outcome**  
Every schema change is validated before merge. Deployments run automatically. Breaking changes surface in code review, not in staging.

## Why teams use Cosmo developer tools

- **Schema checks in CI, not in incidents.** `wgc subgraph check` runs on every pull request. Breaking changes surface before merge, not after deployment.
- **Usage data drives safe removal.** Graph Pruning connects to real traffic analytics. Teams see which fields are used, which are deprecated but active, and which are safe to remove — before touching the schema.
- **Every tool connects to the same graph.** The playground, schema explorer, changelog, lint enforcer, and CLI all work against the same composed schema and the same analytics data. No syncing separate tools.
