PHPackages                             legrisch/statamic-enhanced-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. legrisch/statamic-enhanced-graphql

ActiveStatamic-addon[API Development](/categories/api)

legrisch/statamic-enhanced-graphql
==================================

A Statamic CMS GraphQL Addon that provides alternative GraphQL queries for collections, entries and global sets.

v2.0.0(2y ago)21.3k1[1 issues](https://github.com/grischaerbe/statamic-enhanced-graphql/issues)MITPHPPHP ^8.1

Since Nov 24Pushed 2y ago1 watchersCompare

[ Source](https://github.com/grischaerbe/statamic-enhanced-graphql)[ Packagist](https://packagist.org/packages/legrisch/statamic-enhanced-graphql)[ RSS](/packages/legrisch-statamic-enhanced-graphql/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)Dependencies (1)Versions (19)Used By (0)

Statamic Enhanced GraphQL
=========================

[](#statamic-enhanced-graphql)

A Statamic CMS GraphQL Addon that provides alternative GraphQL queries for collections, entries and global sets.

> ⚠️ This is a POC and while I consider it somewhat stable, it's not thoroughly tested. Use at your own risk.

Features
--------

[](#features)

This addon provides additional GraphQL queries for Statamic Pro.

- Transforms each collection, global set and taxonomy to individual GraphQL queries.
- Transform single entries to GraphQL queries.
- No [GraphQL Interfaces](https://graphql.org/learn/schema/#interfaces).
- Supports Pagination, Filtering &amp; Sorting.

Why
---

[](#why)

I'm using Statamic exclusively in Headless mode and make use of its GraphQL API. For end-to-end type-safety I'm writing frontends in TypeScript. By default, Statamics default GraphQL implementation provides one query to query for all types of entries using [GraphQL Interfaces](https://graphql.org/learn/schema/#interfaces), which means you need to implement a lot of type guards to make use of the GraphQL types in the frontend, which adds boilerplate, query properties and susceptibility to error.

This addon aims to provide individual queries for each collection and global set to keep the amount of type guards at a minimum.

Querying for the content of an entry with the slug 'home' in a collection with the handle 'pages' would look like this with Statamics default GraphQL implementation:

```
query QueryHome {
  entry(collection: "pages", slug: "home") {
    __typename
    ... on Entry_Pages_Pages {
      content
    }
  }
}
```

Notice the additional `__typename` to implement a type guard in TypeScript:

```
const entryIsPage = (entry: EntryInterface): entry is Entry_Pages_Pages => {
  return entry.__typename === 'Entry_Pages_Pages'
}
```

The query this addon provides makes the type guard obsolete and the query more concise:

```
query QueryHome {
  pagesEntry(slug: "home") {
    content
  }
}
```

Furthermore, you can transform individual entries to GraphQL queries:

```
query QueryHome {
  home {
    content
  }
}
```

How to Install
--------------

[](#how-to-install)

```
composer require legrisch/statamic-enhanced-graphql
```

Usage
-----

[](#usage)

This addon adds a settings section to Statamics Control Panel.

- Add collections to transform to queries. Make sure the collections only use one blueprint.
- Add global sets to transform to queries.
- Add taxonomies to transform to queries.
- Add single entry queries to transform to queries.

TODO
----

[](#todo)

- filter on entries query
- queries for entries in collections with more than one blueprint

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity67

Established project with proven stability

 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 ~34 days

Recently: every ~145 days

Total

18

Last Release

1085d ago

Major Versions

v0.4.0 → v1.0.02022-04-04

v1.0.0 → v2.0.02023-07-04

PHP version history (2 changes)v0.3.4PHP ^8.0

v2.0.0PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/73345788?v=4)[le grisch](/maintainers/legrisch)[@legrisch](https://github.com/legrisch)

---

Top Contributors

[![grischaerbe](https://avatars.githubusercontent.com/u/46897060?v=4)](https://github.com/grischaerbe "grischaerbe (21 commits)")

### Embed Badge

![Health badge](/badges/legrisch-statamic-enhanced-graphql/health.svg)

```
[![Health](https://phpackages.com/badges/legrisch-statamic-enhanced-graphql/health.svg)](https://phpackages.com/packages/legrisch-statamic-enhanced-graphql)
```

###  Alternatives

[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135212.4k7](/packages/statamic-rad-pack-runway)[statamic/seo-pro

68488.6k](/packages/statamic-seo-pro)[rias/statamic-redirect

29322.9k](/packages/rias-statamic-redirect)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3310.1k](/packages/duncanmcclean-statamic-cargo)[cboxdk/statamic-mcp

MCP (Model Context Protocol) server for Statamic CMS v6 — gives AI assistants structured access to content, blueprints, assets, and more.

2611.2k](/packages/cboxdk-statamic-mcp)[statamic-rad-pack/mailchimp

Subscribe registrations or contact forms to Mailchimp

1821.0k](/packages/statamic-rad-pack-mailchimp)

PHPackages © 2026

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