apollo-router-plugin-creator

Create native Rust plugins for Apollo Router using service hooks.

102|12|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/apollographql/skills --skill apollo-router-plugin-creator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: apollo-router-plugin-creator
Source: https://github.com/apollographql/skills/tree/main/skills/apollo-router-plugin-creator
Command: npx skills add https://github.com/apollographql/skills --skill apollo-router-plugin-creator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

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.

Frequently Asked Questions about apollo-router-plugin-creator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a custom Apollo Router plugin in Rust?

To create a custom Apollo Router plugin in Rust, you need to create a Rust file, define your configuration and plugin structs, implement service hooks, and register the plugin with the Apollo Router.

What service hooks are available for Apollo Router plugin development?

Available service hooks for Apollo Router plugin development include `router_service`, `supergraph_service`, `execution_service`, and `subgraph_service`, allowing you to intercept the request lifecycle at different stages.

How do I add custom authentication logic to Apollo Router?

You can add custom authentication logic to Apollo Router by implementing a Rust plugin using the `router_service` hook to inspect HTTP headers before the GraphQL request is processed.

What implementation patterns are commonly used when building Apollo Router plugins?

Common implementation patterns for Apollo Router plugins include request and response transformation, checkpointing, and handling asynchronous operations, often supported by practical code snippets.

Do I need Rust to extend the Apollo Router with custom logic?

Yes, you need Rust to build native Apollo Router plugins, as this approach enables you to extend its functionality with high-performance custom logic directly integrated into the router.