GraphQL Federation Patterns Cheat Sheet

Composing schemas with ownership

Last Updated: November 21, 2025

Focus Areas

Focus
Expose `@key` fields per service and avoid loops
Use `@requires` and `@provides` judiciously

Commands & Queries

apollo service:push --name accounts --schema ./schema.graphql
Publish federated schema
apollo router --config router.yaml
Run the Apollo Router
tail -f /var/log/apollo/router.log
Monitor gateway errors

Summary

Document ownership, guard dependencies, and monitor the gateway.

💡 Pro Tip: Keep `@key` fields minimal and avoid circular dependencies.
← Back to Databases & APIs | Browse all categories | View all cheat sheets