What problem does it solve?
This Skill provides a comprehensive guide and structure for developing native Rust plugins for the Apollo Router, enabling developers to extend its functionality with custom logic.
Core Features & Use Cases
- Plugin Development Guide: Step-by-step instructions for creating new router plugins.
- Service Hook Implementation: Details on using
router_service, supergraph_service, execution_service, and subgraph_service for request lifecycle interception.
- Common Patterns & Examples: Illustrates patterns like request/response transformation, checkpointing, and async operations with practical code snippets.
- Use Case: You need to add custom authentication logic that inspects HTTP headers before the GraphQL request is processed. This skill guides you to implement this using the
router_service hook.
Quick Start
Follow the steps in this skill to create a new Rust plugin file, define its configuration and plugin structs, implement the necessary service hooks, and register it with the Apollo Router.