axolotl-subscriptions

Implement real-time GraphQL subscriptions with async generator resolvers and PubSub streaming.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @aexol/axolotl-core.

What problem does it solve?

Axolotl-subscriptions provide structured patterns for implementing real-time GraphQL subscriptions using async generators, PubSub integration, and federated subscription rules, enabling scalable and maintainable live data streams.

Core Features & Use Cases

  • Async subscription resolvers powered by createSubscriptionHandler to stream data efficiently
  • PubSub integration for event-driven updates and real-time notifications
  • Federated subscription coordination across modular schemas to avoid conflicts
  • Clear resolver input shape and conventions to ensure consistency across teams

Quick Start

Import the provided subscription resolvers into your Axolotl project and start the GraphQL server to observe real-time updates.

Frequently Asked Questions about axolotl-subscriptions

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

FAQPage Schema
How do I implement GraphQL subscriptions with async generators?

You implement GraphQL subscriptions with async generators by passing async generator-based resolvers to createSubscriptionHandler, yielding stream events over a PubSub integration for real-time data updates.

What is the correct resolver signature for async subscription resolvers?

The correct resolver signature for async subscription resolvers is a three-element array structure: [source, args, context], ensuring consistent input handling across real-time event streams.

How do I coordinate federated subscriptions across modular schemas?

You coordinate federated subscriptions across modular schemas by applying federated subscription rules to avoid conflicts, ensuring scalable live data streams in micro-frontend or microservice architectures.

Does GraphQL Yoga work with async generator based subscriptions?

Yes, GraphQL Yoga works with async generator based subscriptions by providing stable transports to integrate with the subscription handler for reliable real-time event streaming.

Do I need @aexol/axolotl-core to use async subscription resolvers?

Yes, you need @aexol/axolotl-core as the required dependency to run async subscription resolvers, utilize createSubscriptionHandler, and manage PubSub streaming within your GraphQL server.

Why use async generators instead of standard resolvers for GraphQL subscriptions?

Async generators provide structured patterns for streaming real-time data by yielding multiple values over time, unlike standard resolvers that resolve only once, enabling efficient event-driven updates.