rdc-endpoint-setup

Wraps async functions in Endpoint for Data Client hooks.

2.0k|99|Updated Feb 15, 2019
One-click install
npx skills add https://github.com/reactive/data-client --skill rdc-endpoint-setup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rdc-endpoint-setup
Source: https://github.com/reactive/data-client/tree/main/.cursor/skills/rdc-endpoint-setup
Command: npx skills add https://github.com/reactive/data-client --skill rdc-endpoint-setup

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill simplifies integrating non-REST/GraphQL async patterns with Data Client by wrapping arbitrary async functions in an Endpoint, enabling standard hooks and consistent data handling.

Core Features & Use Cases

  • Wrap existing async functions with Endpoint to expose them to Data Client hooks and controllers.
  • Supports varied patterns such as third-party SDKs, WebSocket handlers, and IndexedDB operations.
  • Use Case: Integrate a Firebase/Firestore or custom WebSocket endpoint into your Data Client workflow without rewriting logic.

Quick Start

Wrap an existing async function with Endpoint after rdc-setup detects non-REST/GraphQL patterns to enable Data Client hooks.

Frequently Asked Questions about rdc-endpoint-setup

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

FAQPage Schema
How do I use custom async functions with Data Client hooks?

To use custom async functions with Data Client hooks, you wrap them with an Endpoint. This provides a consistent interface by configuring the Endpoint with a schema, a stable name, and optional settings for smooth hook integration.

Can I integrate a WebSocket handler or IndexedDB operation into my Data Client workflow?

Yes, you can integrate WebSocket handlers and IndexedDB operations into your Data Client workflow. You wrap these non-REST/GraphQL async patterns with Endpoint to expose them to standard hooks and controllers without rewriting logic.

When do I need to wrap an async function with Endpoint?

You need to wrap an async function with Endpoint when rdc-setup detects non-REST/GraphQL async patterns, such as third-party SDKs or WebSocket handlers. Wrapping them enables standard data handling and consistent Data Client hook integration.

What is the best way to expose a third-party SDK to Data Client controllers?

The best way to expose a third-party SDK to Data Client controllers is by wrapping the existing SDK async functions with Endpoint. This applies a consistent schema and stable name to integrate smoothly with your existing hooks.

Does wrapping a custom async pattern with Endpoint require rewriting my existing logic?

No, wrapping a custom async pattern with Endpoint does not require rewriting your existing logic. It simplifies integrating non-REST/GraphQL patterns by exposing the original async functions directly to Data Client hooks and controllers.

What configuration is required when wrapping an async function with Endpoint?

Wrapping an async function with Endpoint requires configuring it with a schema and a stable name. You can also provide optional settings to ensure the wrapper integrates smoothly with your Data Client hooks and controllers.