Download the PHP package johnlui/graphql-laravel without Composer

On this page you can find all versions of the php package johnlui/graphql-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package graphql-laravel

GitHub version php-version License


webonyx/graphql-php 的 Laravel 适配,魔改原库,将其彻底融入 Laravel 生命周期。

功能

  1. 接入 Laravel Middleware
  2. 依赖 Laravel Exception 处理异常流程
  3. 完美接入 Eloquent
  4. 提炼出 GraphQL 路由
  5. 提供 Types 文件夹,并提供强大的 Type 基类
  6. 提供 QueryFields 文件夹,提供类似于 Controller 归类的功能
  7. 暴露用户请求字段给 QueryField,便于节约资源、并发 RPC 等后续操作
  8. 提供 JSON API 语境下的调试函数 cc()


用法

安装 Composer 包

composer require johnlui/graphql-laravel

部署开发目录及配置文件到 app 下

php artisan vendor:publish

快速入门

  1. app\GraphApp 为工作文件夹
  2. Routes.php 为路由文件
  3. QueryFields 目录存放响应代码
  4. Types 目录存放自定义类型
  5. config/graphql.php 为配置文件

demo

query:

variables:

此处为 JSON 格式描述,开发时应使用 key-value 形式描述 variables,不应该使用 JSON 字符串。

启动 server

php artisan serve

url

http://127.0.0.1:8000/graphql

修改默认路径请编辑config/graphql.php中的apiUri

curl raw 代码描述

返回值

License

The johnlui/GraphQL-Laravel is open-sourced software licensed under the MIT license


All versions of graphql-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1||^8.0
ext-json Version *
ext-mbstring Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package johnlui/graphql-laravel contains the following files

Loading the files please wait ....