Apollo GraphQL/apollo-router-plugin-creator — Agent Skills | officialskills.sh
Back to skills

apollo-router-plugin-creator

Guides you through writing native Rust plugins for Apollo Router.

Setup & Installation

npx skills add https://github.com/apollographql/skills --skill apollo-router-plugin-creator
or paste the link and ask your coding assistant to install it
https://github.com/apollographql/skills/tree/main/skills/apollo-router-plugin-creator
View on GitHub

What This Skill Does

Guides you through writing native Rust plugins for Apollo Router. It covers the full request lifecycle, service hooks (router, supergraph, execution, subgraph), configuration structs, and registration. You get scaffolded plugin files with the right imports and trait implementations.

Apollo Router's native plugin API requires specific Rust trait implementations, Tower service composition, and correct registration boilerplate that's easy to get wrong without a reference.

When to use it

  • Adding JWT authentication or custom header logic at the router service layer
  • Building a subgraph service hook to inject dynamic HTTP headers per downstream service
  • Creating an execution service checkpoint that blocks specific queries based on policy rules
  • Scaffolding a new Rust plugin file with config struct, trait impl, and YAML registration
  • Modifying an existing router plugin to add response transformation or rate limiting