rest-graphql-debug

Diagnose REST and GraphQL API failures through layered connectivity, auth, and schema checks.

Updated Jun 5, 2026
One-click install
npx skills add https://github.com/xu1713/openhorse --skill rest-graphql-debug-xu1713
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rest-graphql-debug
Source: https://github.com/xu1713/openhorse/tree/main/openhorse/openhorse/optional-skills/software-development/rest-graphql-debug
Command: npx skills add https://github.com/xu1713/openhorse --skill rest-graphql-debug-xu1713

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, pytest.

What problem does it solve? API integrations fail in opaque ways: a 401 after token refresh, a GraphQL query returning HTTP 200 with hidden errors, or code that works in Postman but breaks in production. This Skill provides a systematic, layer-by-layer debugging methodology that isolates the exact failure point before attempting fixes. ## Core Features & Use Cases - Layered Diagnosis Flow: Walk connectivity, timeouts, TLS, authentication, request format, response parsing, and semantics in order using curl and Python requests. - HTTP Status Playbook: Step-by-step checklists for 401, 403, 404, 409, 422, 429, and 5xx responses, including exponential backoff for rate limits. - GraphQL-Specific Handling: Detect errors hidden in 200 responses by inspecting the errors field, plus pagination and idempotency-key patterns. - Use Case: Your payment API returns intermittent 500s. Use the correlation-ID capture pattern and vendor bug-report template to file an actionable ticket with the provider, then add the regression test template to CI. ## Quick Start Ask the AI to debug why your POST request to an API endpoint returns a 422 error, following the layered diagnosis flow.

Frequently Asked Questions about rest-graphql-debug

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

FAQPage Schema
How do I debug a REST API that returns 401 Unauthorized?

Verify the Authorization header is actually sent using curl -v, then check the token is unexpired by decoding the JWT exp claim. Confirm the correct auth scheme (Bearer vs Basic vs API key) and that you are not using a staging key against production.

Why does my GraphQL query return 200 but no data?

GraphQL servers often return HTTP 200 even when the query fails, placing error details in the errors field of the response body. Always inspect data.get("errors") regardless of status code and print each error's message and path.

How do I handle 429 rate limit errors in Python requests?

Implement exponential backoff by checking the Retry-After header and retrying up to five attempts with increasing wait times. Also inspect X-RateLimit-* headers to understand your quota before retrying.

Why does requests.post send the wrong Content-Type?

Passing a string via data= sends form-encoded data even if you set a JSON header manually, causing silent 415 or 400 errors. Use the json= parameter instead, which serializes the payload and sets Content-Type: application/json automatically.

How do I distinguish a connection timeout from a slow server?

Pass a tuple timeout like (3.05, 30) to requests and catch ConnectTimeout versus ReadTimeout separately. With curl, use -w to print time_connect and time_starttransfer: high connect time indicates network issues, while high TTFB indicates a slow server.

When should I not use this API debugging approach?

Skip this workflow for UI rendering bugs, database query tuning, or DNS and firewall infrastructure problems, which should be escalated to the appropriate owners. It targets application-layer HTTP and GraphQL diagnosis only.