PHPackages                             infinityloop-dev/graphpinator-printer - 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. infinityloop-dev/graphpinator-printer

ActiveLibrary[API Development](/categories/api)

infinityloop-dev/graphpinator-printer
=====================================

Schema printing visitor for GraPHPinator typesystem.

v2.0.1(4mo ago)320.4k↓34.8%2[3 issues](https://github.com/graphpql/graphpinator-printer/issues)[5 PRs](https://github.com/graphpql/graphpinator-printer/pulls)2MITPHPCI passing

Since Feb 14Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/graphpql/graphpinator-printer)[ Packagist](https://packagist.org/packages/infinityloop-dev/graphpinator-printer)[ Docs](https://github.com/graphpql/)[ RSS](/packages/infinityloop-dev-graphpinator-printer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (10)Versions (28)Used By (2)

GraPHPinator Printer [![PHP](https://github.com/graphpql/graphpinator-printer/actions/workflows/php.yml/badge.svg)](https://github.com/graphpql/graphpinator-printer/actions/workflows/php.yml) [![codecov](https://camo.githubusercontent.com/2193dc4520a9a91ee6dda612c601d59d05909d3ce9d31f5751cce4cad0b09dd7/68747470733a2f2f636f6465636f762e696f2f67682f696e66696e6974796c6f6f702d6465762f677261706870696e61746f722d7072696e7465722f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/infinityloop-dev/graphpinator-printer)
=================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#graphpinator-printer--)

⚡🌐⚡ Schema printing visitor for GraPHPinator typesystem.

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

[](#introduction)

This library allows printing of the GraphQL schema into human-readable format. It supports multiple output formats and ordering options.

Installation
------------

[](#installation)

Install package using composer

`composer require infinityloop-dev/graphpinator-printer`

How to use
----------

[](#how-to-use)

Usage of this library is very simple.

```
$schema; // instance of \Graphpinator\Typesystem\Schema
$printer = new \Graphpinator\Printer\Printer();

echo $printer->printSchema($schema);
```

Advanced configiration options (see description below)

```
$schema; // instance of \Graphpinator\Typesystem\Schema
$printer = new \Graphpinator\Printer\Printer(
    new \Graphpinator\Printer\HtmlVisitor( // different format
        new \Graphpinator\Printer\ImplicitInheritanceFieldCollector(), // enable implicit inheritance
    ),
    new \Graphpinator\Printer\TypeKindSorter(), // different sorter
);

echo $printer->printSchema($schema);
```

### Format

[](#format)

It is possible to implement additional printing mechanisms for various output formats. This is done by implementing `\Graphpinator\Printer\PrintComponentVisitor` and passing an instance to `Printer` as first constructor argument.

#### Implementations provided by this library:

[](#implementations-provided-by-this-library)

- `TextVisitor` (default) - standard mechanism which creates text output
- `HtmlVisitor` - mechanism which creates structured HTML code (there is also a SCSS bundled in the `theme` folder and compiled CSS in `build` folder)

### Implicit inheritance

[](#implicit-inheritance)

Both formatters support Implicit inheritance RFC - option to exclude fields inherited from parent interface. In order to enable implicit inheritance, it is needed to pass different `FieldCollector` strategy to `TextVisitor` or `HtmlVisitor`.

#### Strategies provided by this library:

[](#strategies-provided-by-this-library)

- `AllFieldCollector` (default) - standard strategy to print all fields
- `ImplicitInheritanceFieldCollector` - strategy to leverage Implicit inheritance RFC, inherited fields which remained the same are excluded

### Order of types

[](#order-of-types)

It is possible to change the order of types/directives in output. This is done by implementing `\Graphpinator\Printer\Sorter` and passing an instance to `Printer` as second constructor argument.

#### Implementations provided by this library:

[](#implementations-provided-by-this-library-1)

- `AlphabeticalSorter` (default) - sorts types and directives alphabetically
- `TypeKindSorter` - sorts types by their TypeKind (and then alphabetically) - interfaces first, then object types, then unions, ..., directives last

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance57

Moderate activity, may be stable

Popularity32

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 63.4% 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 ~89 days

Recently: every ~252 days

Total

21

Last Release

134d ago

Major Versions

v1.2.3 → v2.02025-12-18

### Community

Maintainers

![](https://www.gravatar.com/avatar/00654c913028f8d25a226eb2ddf368e1b999bf72fa4f77dbd1449c1df218756c?d=identicon)[peldax](/maintainers/peldax)

---

Top Contributors

[![peldax](https://avatars.githubusercontent.com/u/10790033?v=4)](https://github.com/peldax "peldax (90 commits)")[![vossik](https://avatars.githubusercontent.com/u/22434658?v=4)](https://github.com/vossik "vossik (44 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![HonzaBejvl](https://avatars.githubusercontent.com/u/23004049?v=4)](https://github.com/HonzaBejvl "HonzaBejvl (2 commits)")

---

Tags

graphqlgraphql-phpphp

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/infinityloop-dev-graphpinator-printer/health.svg)

```
[![Health](https://phpackages.com/badges/infinityloop-dev-graphpinator-printer/health.svg)](https://phpackages.com/packages/infinityloop-dev-graphpinator-printer)
```

###  Alternatives

[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)[hubspot/api-client

Hubspot API client

23914.2M16](/packages/hubspot-api-client)[botman/driver-telegram

Telegram driver for BotMan

92437.3k6](/packages/botman-driver-telegram)

PHPackages © 2026

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