Skip to content

tallesborges/gql-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gql-ai

AI-powered GraphQL query generator and executor. Write GraphQL queries in plain English—gql-ai generates, validates, and executes them.

Quick Start

bun install
bun run index.ts --help

Basic Usage

# Add a GraphQL endpoint
bun run index.ts config add myapi https://api.example.com/graphql

# Fetch and cache schema
bun run index.ts schema fetch myapi

# Generate a query from English
bun run index.ts plan "get all users with their posts"

# Generate, validate, and execute
bun run index.ts run "fetch user 123 and their comments" -e myapi --show-plan

Features

  • Schema Management – Introspect and cache GraphQL schemas
  • AI Query Generation – Converts natural language to GraphQL queries using LLMs
  • Query Validation – Validates generated queries against schema before execution
  • Multi-Endpoint Support – Manage multiple GraphQL endpoints with profiles
  • Flexible Output – Pretty JSON and table formatting
  • Plan Inspection – Review AI plans with --show-plan and --show-query flags

Commands

  • config – Manage endpoints (add, remove, list, set-default)
  • schema – Fetch, cache, and inspect GraphQL schemas
  • plan – Generate query plan from natural language
  • run – Generate, validate, and execute queries

Development

Uses Bun, TypeScript (strict mode), Commander.js, Vercel AI SDK, and OpenAI.

No tests yet (Phase 6 planned). See AGENTS.md for architecture and PLAN.md for roadmap.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors