PHPackages                             getpop/api-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. getpop/api-graphql

ActiveLibrary[API Development](/categories/api)

getpop/api-graphql
==================

Extended/Upgraded implementation of GraphQL, implemented on PHP, based on the PoP API

17.1.1(1mo ago)33.4k↓100%[1 issues](https://github.com/PoP-PoPAPI/api-graphql/issues)1GPL-2.0-or-laterPHPPHP ^8.1

Since Jan 25Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/PoP-PoPAPI/api-graphql)[ Packagist](https://packagist.org/packages/getpop/api-graphql)[ Docs](https://github.com/PoP-PoPAPI/api-graphql)[ RSS](/packages/getpop-api-graphql/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (152)Used By (1)

GraphQL API
===========

[](#graphql-api)

Extended/Upgraded implementation of GraphQL. This implementation is a package to be installed on top of the [PoP API](https://github.com/PoP-PoPAPI/api).

Install
-------

[](#install)

Via Composer

```
composer require pop-api/api-graphql
```

Development
-----------

[](#development)

The source code is hosted on the [GatoGraphQL monorepo](https://github.com/GatoGraphQL/GatoGraphQL), under [`API/packages/api-graphql`](https://github.com/GatoGraphQL/GatoGraphQL/tree/master/layers/API/packages/api-graphql).

To enable pretty API endpoint `/api/graphql/`, follow the instructions [here](https://github.com/PoP-PoPAPI/api#enable-pretty-permalinks)

> Note: if you wish to install a fully-working API, please follow the instructions under [Bootstrap a PoP API for WordPress](https://github.com/leoloso/PoP-API-WP) (even though CMS-agnostic, only the WordPress adapters have been presently implemented).

Usage
-----

[](#usage)

Initialize the component:

```
\PoP\Root\App::stockAndInitializeModuleClasses([([
    \PoPAPI\GraphQLAPI\Module::class,
]);
```

Features
--------

[](#features)

### Automatic namespacing of types

[](#automatic-namespacing-of-types)

Namespaces ([proposed to be added to the GraphQL spec](https://github.com/graphql/graphql-spec/issues/163)) help manage the complexity of the schema. This can avoid different types having the same name, which can happen when embedding components from a 3rd party.

This is how the normal schema looks like in the GraphQL Voyager:

[![Interactive schema](https://raw.githubusercontent.com/GatoGraphQL/GatoGraphQL/97b3b048d7c68da4f10ab1dcb31c0215cc6cc526/layers/API/packages/api-graphql/assets/images/normal-interactive-schema.png)](https://raw.githubusercontent.com/GatoGraphQL/GatoGraphQL/97b3b048d7c68da4f10ab1dcb31c0215cc6cc526/layers/API/packages/api-graphql/assets/images/normal-interactive-schema.png)

This is how it looks in its namespaced version:

[![Namespaced interactive schema](https://raw.githubusercontent.com/GatoGraphQL/GatoGraphQL/97b3b048d7c68da4f10ab1dcb31c0215cc6cc526/layers/API/packages/api-graphql/assets/images/namespaced-interactive-schema.png)](https://raw.githubusercontent.com/GatoGraphQL/GatoGraphQL/97b3b048d7c68da4f10ab1dcb31c0215cc6cc526/layers/API/packages/api-graphql/assets/images/namespaced-interactive-schema.png)

### Field/directive-based versioning

[](#fielddirective-based-versioning)

Fields and directives can be independently versioned, and the version to use can be specified in the query through the field/directive argument `versionConstraint`.

To select the version for the field/directive, we use the same [semver version constraints employed by Composer](https://getcomposer.org/doc/articles/versions.md#writing-version-constraints).

Standards
---------

[](#standards)

[PSR-1](https://www.php-fig.org/psr/psr-1), [PSR-4](https://www.php-fig.org/psr/psr-4) and [PSR-12](https://www.php-fig.org/psr/psr-12).

To check the coding standards via [PHP CodeSniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer), run:

```
composer check-style
```

To automatically fix issues, run:

```
composer fix-style
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

To execute [PHPUnit](https://phpunit.de/), run:

```
composer test
```

Static Analysis
---------------

[](#static-analysis)

To execute [PHPStan](https://github.com/phpstan/phpstan), run:

```
composer analyse
```

Report issues
-------------

[](#report-issues)

To report a bug or request a new feature please do it on the [GatoGraphQL monorepo issue tracker](https://github.com/GatoGraphQL/GatoGraphQL/issues).

Contributing
------------

[](#contributing)

We welcome contributions for this package on the [GatoGraphQL monorepo](https://github.com/GatoGraphQL/GatoGraphQL) (where the source code for this package is hosted).

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

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

Credits
-------

[](#credits)

- [Leonardo Losoviz](https://github.com/leoloso)
- [All Contributors](../../../../../../contributors)

License
-------

[](#license)

GNU General Public License v2 (or later). Please see [License File](LICENSE.md) for more information.

###  Health Score

54

—

FairBetter than 97% of packages

Maintenance91

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~12 days

Total

151

Last Release

46d ago

Major Versions

12.2.2 → 13.0.02025-05-23

13.2.0 → 14.0.02025-09-09

14.0.4 → 15.0.02025-09-23

15.3.0 → 16.0.02026-01-12

16.1.0 → 17.0.02026-03-03

PHP version history (3 changes)0.7.6PHP ^7.4|^8.0

0.8.1PHP ^8.0

0.9.0PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1981996?v=4)[Leonardo Losoviz](/maintainers/leoloso)[@leoloso](https://github.com/leoloso)

![](https://www.gravatar.com/avatar/d5a0a064bae63a335ddd796bb69ab38e1d01420d14bfcc8e3d4e1550922ac60b?d=identicon)[getpop](/maintainers/getpop)

---

Top Contributors

[![leoloso](https://avatars.githubusercontent.com/u/1981996?v=4)](https://github.com/leoloso "leoloso (687 commits)")

---

Tags

apigraphqlphppopphpapigraphqlGatoGatoGraphQL

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/getpop-api-graphql/health.svg)

```
[![Health](https://phpackages.com/badges/getpop-api-graphql/health.svg)](https://phpackages.com/packages/getpop-api-graphql)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
