Download the PHP package salehhashemi/laravel-intelli-graphql without Composer
On this page you can find all versions of the php package salehhashemi/laravel-intelli-graphql. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download salehhashemi/laravel-intelli-graphql
More information about salehhashemi/laravel-intelli-graphql
Files in salehhashemi/laravel-intelli-graphql
Package laravel-intelli-graphql
Short Description An AI-driven Laravel package for generating GraphQL schemas, queries, and mutations based on database tables.
License MIT
Homepage https://github.com/salehhashemi1992/laravel-intelli-graphql
Informations about the package laravel-intelli-graphql
Laravel IntelliGraphQL Package
The Laravel IntelliGraphQL package is an AI-driven Laravel package for generating GraphQL schemas, queries, and mutations based on a given database table.
Installation
-
Install the package via composer:
-
Publish the configuration file:
-
Add your OpenAI API key to the
.env
file: - Optionally, you can change the default model used by OpenAI in the
.env
file:
Usage
To use the Laravel IntelliGraphQL package, you can use the ai:graphql command in your terminal, providing the name of the database table as an argument:
Replace {table} with the name of the table for which you wish to generate the GraphQL schema, queries, and mutations.
For example:
This command will generate a GraphQL schema, queries, and mutations for the users table, and will place them in a file called users.graphql within the graphql directory at the root of your Laravel project.
The generated GraphQL schema, queries, and mutations will include all the columns within the provided table. The AI model uses this information to intelligently generate the appropriate GraphQL schema, queries, and mutations.
Examples
Assume you have a table named users with the following columns: id, name, email, email_verified_at, password, remember_token, created_at, updated_at.
Running the command php artisan ai:graphql users will generate a users.graphql file in the graphql directory at the root of your Laravel project. The content might look something like this:
Testing
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Credits
- Saleh Hashemi
- All Contributors
License
The MIT License (MIT). Please see License File for more information.