emmanuelsaleem/graphqlgenerator
最新稳定版本:1.0.0
Composer 安装命令:
composer require emmanuelsaleem/graphqlgenerator
包简介
this package generate graph ql query add verion in to package
README 文档
README
is a package that create graph ql code for you like get all record with pagnation get record by id create update and delete record all code generate with this amzing package
package is
composer require emmanuelsaleem/graphqlgenerator
next
install this package composer require nuwave/lighthouse
After installation run command into termainal
php artisan generate:graph-ql-query
download file graph Ql.postman_collection.json into github and import it into postman to test the code
API Reference
Route
Get all users
| Query | Type | Description |
|---|---|---|
query { Users(first: 31) { data { id name email } paginatorInfo { total count perPage currentPage lastPage } } } |
string | Fetch a list of users with pagination info |
Get user by ID
| Query | Type | Description |
|---|---|---|
query { User(id: "1234") { id name email } } |
string | Fetch a user by their unique ID |
Create a new user
| Mutation | Type | Description |
|---|---|---|
mutation { createUser(id: "12345", name: "John Doe", email: "john@example.com", password: "password123", created_at: "2023-01-01", updated_at: "2023-01-01") { id name email } } |
string | Create a new user with given details |
Update an existing user
| Mutation | Type | Description |
|---|---|---|
mutation { updateUser(id: "12345", name: "John Doe Updated", email: "john.updated@example.com") { id name email } } |
string | Update an existing user’s details |
Delete a user
| Mutation | Type | Description |
|---|---|---|
mutation { deleteUser(id: "12345") { id name } } |
string | Delete a user by ID |
Contact With me
统计信息
- 总下载量: 8
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-10-03