Setting the file. One moment.
Skill 07 · Apollo Router Plugin Creator
Subchapter 7.2
references/existing-plugins.mdMarkdown2 KBView on GitHub
Reference plugins from the Apollo Router open-source plugins directory. Use as reference when creating new plugins.
Browse the Apollo Router plugins directory (opens in a new tab) for the full list of built-in plugins.
Find plugins by service hook in a local checkout of the Apollo Router repo:
# Plugins with router_service
grep -r "fn router_service" apollo-router/src/plugins/
# Plugins with supergraph_service
grep -r "fn supergraph_service" apollo-router/src/plugins/
# Plugins with subgraph_service
grep -r "fn subgraph_service" apollo-router/src/plugins/// introspection_gate.rs
#[derive(Debug, Default, Deserialize, JsonSchema)]
struct Config {
enabled: bool,
proxy_request_header: String
}// header_plugin.rs
#[derive(Clone, Debug, Default, Deserialize, JsonSchema)]
struct Config {
enabled: bool,
subgraphs_allowed_to_set_cookie: Option<Arc<HashSet<String>>>
}// add_extensions.rs
#[derive(Debug, Default, Clone, Deserialize, JsonSchema)]
struct Extensions {
name: String,
rename_as: Option<String>
}
#[derive(Debug, Default, Clone, Deserialize, JsonSchema)]
struct Config {
enabled: bool,
extensions_to_forward: Arc<Vec<Extensions>>
}// subgraph_circuit_breaker
#[derive(Debug, Clone, Deserialize, JsonSchema)]
struct Config {
enabled: bool,
default: CircuitBreakerSettings,
subgraphs: HashMap<String, CircuitBreakerSettings>
}