Skip to content
CMS-agnostic GraphQL server in PHP
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
src
.editorconfig
.gitattributes
.gitignore
.scrutinizer.yml
.styleci.yml
.travis.yml
CHANGELOG.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
ISSUE_TEMPLATE.md
LICENSE.md
PULL_REQUEST_TEMPLATE.md
README.md
composer.json
initialize.php
phpcs.xml.dist
phpunit.xml.dist

README.md

GraphQL server

GraphQL server in PHP, implemented through the PoP API

Install

Via Composer

$ composer require getpop/graphql dev-master

Note: Your composer.json file must have the configuration below to accept minimum stability "dev" (there are no releases for PoP yet, and the code is installed directly from the master branch):

{
    ...
    "minimum-stability": "dev",
    "prefer-stable": true,
    ...
}

To enable pretty API endpoint /api/graphql/, follow the instructions here

Note: if you wish to install a fully-working API, please follow the instructions under Bootstrap a PoP API for WordPress (even though CMS-agnostic, only the WordPress adapters have been presently implemented).

100% compliant of GraphQL syntax

All GraphQL queries are supported (click on the links below to try them out in GraphiQL):

Extended GraphQL

An upgraded implementation of the GraphQL server, which enables to resolve queries as a scripting language, is found under this repo.

It supports several features not currently defined by the GraphQL spec, including composable fields and composable directives.

Support for REST

By installing the REST package, the GraphQL server can also satisfy REST endpoints, from a single source of truth. Check out these example links:

Demo

The GraphQL API (running on top of a WordPress site) is deployed under this endpoint: https://newapi.getpop.org/api/graphql/

You can play with it through the following clients:

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email leo@getpop.org instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

You can’t perform that action at this time.