██╗ ██╗ ██╗██████╗ ██████╗ ██╗
██║ ██║ ██║██╔══██╗██╔════╝ ██║
██║ ██║ ██║██║ ██║██║ ███╗██║
██║ ██║ ██║██║ ██║██║ ██║██║
███████╗╚██████╔╝██████╔╝╚██████╔╝██║
╚══════╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝
Automate GraphQL API Generation with Ludgi GraphX
Ludgi GraphX is a powerful and seamless GraphQL API automation tool built on Next.js and Express. It leverages the Ludgi CLI to generate and manage GraphQL queries and mutations effortlessly, saving development time while ensuring a structured and maintainable GraphQL architecture.
- 🚀 Full Automation - Automatically generate all GraphQL queries and mutations with a single command.
- 🔥 Express + Next.js Power - Combines the best of Express (backend) and Next.js (frontend) for seamless integration.
- ⚡ Fast Development - Rapidly prototype and manage GraphQL resources without repetitive manual coding.
- 🔧 Intuitive CLI Integration - Uses the robust Ludgi CLI for query/mutation generation, listing, and deletion.
- 🛠️ Developer-Friendly - Provides interactive and animated CLI feedback for an enhanced experience.
Before you begin, ensure you have the following installed:
- Node.js (v22 or later)
- npm (or yarn/pnpm)
- Ludgi CLI (installed automatically with this project)
To get started with Ludgi GraphX, install it as a dependency:
npx create-ludgi-graphx my-graphql-project
cd my-graphql-project
npm installThis will scaffold a complete GraphQL API automation project with Express and Next.js.
- Redis
The application will not function properly unless these services are running.
Note: If you want to use subscriptions with Ludgi CLI, it is configured to work based on Redis. Therefore, make sure Redis is running to enable this feature.
sh docker-compose/redis/up.shUse Ludgi CLI to generate a new GraphQL query or mutation file:
npx ludgi-cli -n <queryOrMutationName>Example:
npx ludgi-cli -n getUserProfileThis will create a new GraphQL file inside the GraphQL directory of your project.
npx ludgi-cli -lThis command will display all GraphQL queries and mutations present in your project.
npx ludgi-cli -d <queryOrMutationName>Example:
npx ludgi-cli -d getUserProfileThis removes the specified GraphQL file from your project.
Ludgi GraphX provides a structured GraphQL project setup:
ludgi-graphx/
<!-- nextjs -->
│── src/
│ ├── app/
│ ├── generated/graphql.ts
│ ├── graphql/apis.ts
│ ├── lib/
<!-- express -->
│── server/ # Auto-generated GraphQL queries/mutations
│ ├── generated/
│ ├── graphql/
│ │── queries/
│ │── mutations/
│ │── schema.ts
│ │── type.d.ts
│ ├── helper/
│ ├── lib/
│ ├── index.ts
When you generate a query using Ludgi CLI, it follows this structure:
query GetUserProfile($id: ID!) {
user(id: $id) {
id
name
email
}
}Similarly, mutations are structured as:
mutation UpdateUser($id: ID!, $name: String!) {
updateUser(id: $id, name: $name) {
id
name
}
}npm run dev| Method | Endpoint | Description |
|---|---|---|
POST |
/api/graphql |
GraphQL API Handler |
GET |
/api/ping |
Health Check |
Simplify your GraphQL API development with Ludgi GraphX. 🚀
git clone https://github.com/nohsangwoo/Ludgi-GraphX.git
cd Ludgi-GraphX
pnpm install
pnpm run devReady to build scalable, automated GraphQL APIs? Start now with Ludgi GraphX! 💡