skills$openclaw/rest-to-graphql
lxgicstudios7.5k

by lxgicstudios

rest-to-graphql – OpenClaw Skill

rest-to-graphql is an OpenClaw Skills integration for coding workflows. Convert REST API routes to a GraphQL schema. Use when migrating APIs or adding a GraphQL layer.

7.5k stars4.7k forksSecurity L1
Updated Feb 7, 2026Created Feb 7, 2026coding

Skill Snapshot

namerest-to-graphql
descriptionConvert REST API routes to a GraphQL schema. Use when migrating APIs or adding a GraphQL layer. OpenClaw Skills integration.
ownerlxgicstudios
repositorylxgicstudios/rest-to-graphql
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @lxgicstudios/rest-to-graphql
last updatedFeb 7, 2026

Maintainer

lxgicstudios

lxgicstudios

Maintains rest-to-graphql in the OpenClaw Skills directory.

View GitHub profile
File Explorer
9 files
.
src
cli.ts
655 B
index.ts
1.2 KB
_meta.json
298 B
package-lock.json
30.2 KB
package.json
642 B
README.md
255 B
SKILL.md
2.4 KB
tsconfig.json
251 B
SKILL.md

name: rest-to-graphql description: Convert REST API routes to a GraphQL schema. Use when migrating APIs or adding a GraphQL layer.

REST to GraphQL Converter

Got a REST API and want GraphQL? Point this at your routes and get a complete schema with types, queries, and mutations. No manual translation required.

One command. Zero config. Just works.

Quick Start

npx ai-rest-to-graphql ./src/routes

What It Does

  • Analyzes your REST endpoints and generates equivalent GraphQL schema
  • Converts CRUD operations to queries and mutations
  • Generates TypeScript types alongside the schema
  • Maps REST resources to GraphQL types with proper relationships
  • Includes resolver stubs that call your existing REST handlers

Usage Examples

# Convert routes directory
npx ai-rest-to-graphql ./src/routes

# Single resource
npx ai-rest-to-graphql ./src/routes/users.ts

# Include resolver implementations
npx ai-rest-to-graphql ./src/routes --with-resolvers

# Output to specific file
npx ai-rest-to-graphql ./src/routes -o ./schema.graphql

# Keep REST as datasource
npx ai-rest-to-graphql ./src/routes --wrap-rest

Best Practices

  • Start with core resources - Don't convert everything at once
  • Review the generated types - AI maps fields but check the relationships
  • Use as a migration guide - The output shows you the GraphQL equivalent
  • Consider a gateway approach - Wrap REST with GraphQL instead of replacing

When to Use This

  • Adding GraphQL to an existing REST API
  • Exploring what your API would look like in GraphQL
  • Building a BFF layer over microservices
  • Learning GraphQL by seeing your own data modeled

Part of the LXGIC Dev Toolkit

This is one of 110+ free developer tools built by LXGIC Studios. No paywalls, no sign-ups, no API keys on free tiers. Just tools that work.

Find more:

Requirements

No install needed. Just run with npx. Node.js 18+ recommended.

npx ai-rest-to-graphql --help

How It Works

The tool parses your REST route definitions to understand your resources and operations. It maps GET endpoints to queries, POST/PUT/DELETE to mutations, and infers type structures from your request/response patterns.

License

MIT. Free forever. Use it however you want.

README.md

ai-rest-to-graphql

Convert REST API routes to a GraphQL schema

Install

npm install -g ai-rest-to-graphql

Usage

npx ai-rest-to-graphql ./path/to/file

Setup

export OPENAI_API_KEY=sk-...

License

MIT

Permissions & Security

Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.

Requirements

No install needed. Just run with npx. Node.js 18+ recommended. ```bash npx ai-rest-to-graphql --help ```

FAQ

How do I install rest-to-graphql?

Run openclaw add @lxgicstudios/rest-to-graphql in your terminal. This installs rest-to-graphql into your OpenClaw Skills catalog.

Does this skill run locally or in the cloud?

OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.

Where can I verify the source code?

The source repository is available at https://github.com/openclaw/skills/tree/main/skills/lxgicstudios/rest-to-graphql. Review commits and README documentation before installing.