frontend-api

Generate type-safe GraphQL API consumption code for React frontends.

Updated Sep 16, 2025
One-click install
npx skills add https://github.com/slingr-stack/qa-test-drumr --skill frontend-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: frontend-api
Source: https://github.com/slingr-stack/qa-test-drumr/tree/main/project-management-app/.agents/skills/frontend-api
Command: npx skills add https://github.com/slingr-stack/qa-test-drumr --skill frontend-api

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes the guesswork from building frontend API calls by showing how to compose type-safe GraphQL operations, choose the right UI or data builder, and handle responses correctly in app code.

Core Features & Use Cases

  • Frontend CRUD and Actions: Build create, read, update, delete, and custom action flows for React views, hooks, and services.
  • Type-Safe Query Construction: Use generated @gql types, explicit generics, field selection, pagination, and auto-expansion for references and compositions.
  • Error-Aware UI Handling: Map validation, permission, and not-found unions into field-level or form-level feedback instead of treating every failure the same.
  • Use Case: A frontend engineer can generate a paginated task list, open a detail view, submit an update form, and branch on union responses without writing raw GraphQL strings.

Quick Start

Use the frontend-api skill to generate a type-safe React data flow for fetching, listing, and updating records with pagination and validation handling.

Frequently Asked Questions about frontend-api

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

FAQPage Schema
How do I build type-safe GraphQL API calls in React without writing raw query strings?

Type-safe GraphQL API calls in React are built by composing generated @gql imports, explicit builder generics, and UI versus data operation selection to construct queries without raw strings. This approach handles pagination, field expansion, and reference auto-expansion directly in your hooks and views.

What is the best way to handle GraphQL validation and permission errors in React forms?

GraphQL validation and permission errors in React forms are handled by mapping __typename union responses into field-level or form-level feedback. Instead of treating every failure identically, you branch on specific validation, permission, and not-found union types to display targeted UI feedback.

How do I generate a paginated CRUD data flow for React hooks using GraphQL?

A paginated CRUD data flow for React hooks is generated by selecting the appropriate UI or data builder for create, read, update, and delete operations. The flow leverages explicit builder generics and proper id or object variables to manage pagination and custom backend actions safely.

Do I need generated @gql imports to use type-safe frontend API builders?

Generated @gql imports are required to use type-safe frontend API builders. The builders depend on these generated types, explicit generics, and correct UI versus data operation selection to enforce type safety and ensure proper id or object variable handling in your application code.

How does __typename union handling work for frontend API mutations?

__typename union handling for frontend API mutations works by branching on the distinct union response types returned by the server. This allows your application to map validation errors, permission issues, and not-found states into specific field-level or form-level UI feedback instead of generic failure messages.