PHPackages                             smilecc/think-graphql - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. smilecc/think-graphql

ActiveLibrary[API Development](/categories/api)

smilecc/think-graphql
=====================

better graphql sdk for thinkphp 5

344905[1 issues](https://github.com/smilecc/think-graphql/issues)PHP

Since Feb 5Pushed 7y ago3 watchersCompare

[ Source](https://github.com/smilecc/think-graphql)[ Packagist](https://packagist.org/packages/smilecc/think-graphql)[ RSS](/packages/smilecc-think-graphql/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Think GraphQL
=============

[](#think-graphql)

Better GraphQL SDK for thinkphp 5

文档
--

[](#文档)

这里是本项目的[文档地址](https://smilecc.github.io/think-graphql/)，建议您阅读后再进一步使用。

如果您不知道GraphQL是什么，建议您阅读[GraphQL的官方文档](http://graphql.cn/)。

声明
--

[](#声明)

1. 使用GraphQL需要您事先了解GraphQL的运作机制。
2. 本项目是在`graphql-php`的基础上二次封装，所有的Type都完全兼容`graphql-php`。
3. 在使用前建议您阅读文档、[查看Demo](https://github.com/smilecc/think-graphql-demo)来了解使用方法。

安装
--

[](#安装)

```
$ composer require smilecc/think-graphql:dev-master
```

注意：由于ThinkPHP 5.1对比5.0有较大改变，所以目前只支持新版5.1。

使用
--

[](#使用)

首先需要在`/application/command.php`中增加一个指令。

```
