axolotl-federation

Compose GraphQL modules into a type-safe supergraph with Axolotl.

27|2|Updated Oct 10, 2023
One-click install
npx skills add https://github.com/aexol-studio/axolotl --skill axolotl-federation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: axolotl-federation
Source: https://github.com/aexol-studio/axolotl/tree/main/examples/new/.opencode/skills/axolotl-federation
Command: npx skills add https://github.com/aexol-studio/axolotl --skill axolotl-federation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Axolotl micro-federation enables composing multiple domain GraphQL modules into a single, type-safe supergraph, reducing cross-module conflicts and eliminating duplicate gateway resolvers.

Core Features & Use Cases

  • Micro-federation patterns for modular GraphQL schemas with per-module axolotl.ts
  • Schema merging at build time and resolver merging via mergeAxolotls to unify results
  • Cross-module dependencies and shared types across modules with an auth gateway pattern to centralize authentication
  • Use case: large monorepos with several domain modules (auth, users, posts) coexisting in a single service

Quick Start

Provide a ready-to-run federation setup by configuring modules, generating models, and building the merged schema with axolotl build.

Frequently Asked Questions about axolotl-federation

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

FAQPage Schema
How do I merge multiple GraphQL schemas in a monorepo?

To merge multiple GraphQL schemas in a monorepo, use build-time schema merging via axolotl.json combined with runtime resolver merging through mergeAxolotls. This composes domain modules into a single type-safe supergraph.

What is GraphQL micro-federation and when do I need it?

GraphQL micro-federation composes multiple domain modules into a single type-safe supergraph. You need it for large monorepos with several domain modules like auth, users, and posts coexisting in one service to reduce cross-module conflicts.

Can I centralize authentication across modular GraphQL schemas?

Yes, you can centralize authentication across modular GraphQL schemas using an auth gateway pattern. This centralizes authentication while supporting cross-module dependencies and shared gateway types across your modules.

How do I configure per-module GraphQL definitions in a monorepo?

You can configure per-module GraphQL definitions in a monorepo by providing a per-module axolotl.ts file. This allows each domain module to define its own schema and resolvers before the build-time merge.

Does Axolotl support cross-module dependencies and shared types?

Yes, Axolotl supports cross-module dependencies and shared types across modules. It enables shared gateway types and intelligent resolver merging to unify results without duplicate gateway resolvers.

What is the best way to eliminate duplicate gateway resolvers in a modular GraphQL architecture?

The best way to eliminate duplicate gateway resolvers is using micro-federation patterns with mergeAxolotls for runtime resolver merging. This unifies results and reduces cross-module conflicts in a single type-safe supergraph.