Cosmo Connect now supports TypeScript router plugins, enabling developers to extend GraphQL federation routers with custom logic written in TypeScript without deploying separate services. Previously limited to Go, this feature makes plugin development accessible to TypeScript-focused teams. Plugins run inside the router, are published through Cosmo Cloud, and participate in schema checks like subgraphs. The workflow involves initializing a plugin via CLI, generating protobuf definitions from GraphQL schemas, implementing RPC handlers in TypeScript, building the plugin artifact, and publishing to Cosmo Cloud where routers automatically pull updates. This approach is particularly useful for wrapping legacy REST APIs or exposing small pieces of logic without the operational overhead of deploying full subgraph services.

7m read timeFrom wundergraph.com
Post cover image
Table of contents
TLDR;Getting Started with TypeScript PluginsWhy TypeScript Plugins MatterWhy TypeScript shipped after GoInitializing a TypeScript pluginAdding a GraphQL schemaGenerating Protobuf TypesImplementing the Plugin LogicBuilding the PluginPublishing the pluginQuerying the routerSchema Checks and ObservabilityConclusionFrequently Asked Questions (FAQ)

Sort: