rest-graphql-contract

Design REST and GraphQL API contracts with schemas, versioning, pagination, and error handling.

9|3|Updated Jun 13, 2026
One-click install
npx skills add https://github.com/Sir-chawakorn/sanook-cli --skill rest-graphql-contract
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rest-graphql-contract
Source: https://github.com/Sir-chawakorn/sanook-cli/tree/main/skills/rest-graphql-contract
Command: npx skills add https://github.com/Sir-chawakorn/sanook-cli --skill rest-graphql-contract

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill addresses the complexity of designing and evolving API surfaces, ensuring that REST endpoints and GraphQL schemas remain consistent, backward-compatible, and well-documented.

Core Features & Use Cases

  • Contract Modeling: Provides standardized patterns for REST resource naming and GraphQL type definitions.
  • Versioning & Compatibility: Implements strategies for safe API evolution without breaking existing client integrations.
  • Error & Pagination Handling: Defines uniform error envelopes and efficient data retrieval patterns like cursors and DataLoaders.
  • Use Case: When building a new service, use this skill to define the OpenAPI spec or GraphQL SDL, ensuring that pagination, error codes, and idempotency keys are implemented correctly from the start.

Quick Start

Use the rest-graphql-contract skill to design the schema and error handling strategy for the new user profile API endpoint.

Frequently Asked Questions about rest-graphql-contract

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

FAQPage Schema
How do I design REST and GraphQL API contracts for new endpoints?

Designing REST and GraphQL API contracts involves defining resource schemas, versioning, pagination, and error handling to ensure standardized service surfaces and backward compatibility. This approach uses standardized patterns for resource naming and type definitions.

What is the best way to maintain backward compatibility when evolving an API schema?

Maintaining backward compatibility when evolving an API schema requires implementing safe API evolution strategies. This ensures existing client integrations remain unbroken by applying consistent versioning patterns to REST endpoints and GraphQL schemas.

How do I standardize error handling and pagination across OpenAPI and GraphQL SDL?

Standardizing error handling and pagination involves defining uniform error envelopes and efficient data retrieval patterns like cursors and DataLoaders. This ensures consistent API responses across both OpenAPI and GraphQL SDL implementations.

Does this approach support generating OpenAPI specs and GraphQL SDL for existing services?

Yes, this approach supports generating OpenAPI specs and GraphQL SDL for existing services. It applies to the evolution of existing service surfaces, ensuring requirements for backward compatibility and standardized error modeling are satisfied.

When do I need to implement idempotency keys and cursor pagination in my API contract?

You need to implement idempotency keys and cursor pagination in your API contract when building a new service or endpoint. Defining these patterns correctly from the start ensures safe data retrieval and prevents duplicate request processing.