PHPackages                             austp/php-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. austp/php-graphql

ActiveLibrary[API Development](/categories/api)

austp/php-graphql
=================

Because building a PHP GraphQL server should be easy.

0.9.2(6y ago)332PHP

Since Dec 19Pushed 6y ago1 watchersCompare

[ Source](https://github.com/AustP/php-graphql)[ Packagist](https://packagist.org/packages/austp/php-graphql)[ RSS](/packages/austp-php-graphql/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (4)Versions (5)Used By (0)

php-graphql
===========

[](#php-graphql)

*Because building a PHP GraphQL server should be easy.*

Introduction
------------

[](#introduction)

php-graphql is a schema-driven GraphQL server implemented in PHP. This means that you can focus more on building a great API and less on figuring out how to get your GraphQL server set up.

This implementation was built against the [official GraphQL specs](https://github.com/facebook/graphql/tree/master/spec). The spec is fully implemented with the exception of two items. The first is subscriptions aren't implemented yet. And the second is that query execution runs synchronously because PHP doesn't support asynchronous operations natively.

Getting started
---------------

[](#getting-started)

### Top-Level Resolvers

[](#top-level-resolvers)

Let's start with a simple example. Here is our schema document:

```
type Query {
    hello: String!
}

```

And here is our PHP file (notice the embedded query):

```
