PHPackages                             worksome/graphlint - 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. worksome/graphlint

ActiveProject[API Development](/categories/api)

worksome/graphlint
==================

A static analysis tool for GraphQL

v0.12.3(2mo ago)13189.4k↓33%2[4 PRs](https://github.com/worksome/graphlint/pulls)MITPHPPHP ^8.3CI passing

Since Jun 13Pushed 2mo ago11 watchersCompare

[ Source](https://github.com/worksome/graphlint)[ Packagist](https://packagist.org/packages/worksome/graphlint)[ RSS](/packages/worksome-graphlint/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (30)Versions (46)Used By (0)

GraphLint
=========

[](#graphlint)

[![Latest Version on Packagist](https://camo.githubusercontent.com/289b593d5e43de8fa6453b4efbbae16307bf7904e6ae1d77546e5af8bdf047cb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f776f726b736f6d652f67726170686c696e742e7376673f7374796c653d666c61742d737175617265266c6162656c3d5061636b6167697374)](https://packagist.org/packages/worksome/graphlint)[![GitHub Tests Action Status](https://camo.githubusercontent.com/750b12aed2e024eb112c05e5711540251dd199fc730a5a405e485e9ee0f99da7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f776f726b736f6d652f67726170686c696e742f74657374732e796d6c3f6272616e63683d6d61696e267374796c653d666c61742d737175617265266c6162656c3d5465737473)](https://github.com/worksome/graphlint/actions?query=workflow%3ATests+branch%3Amain)[![GitHub Static Analysis Action Status](https://camo.githubusercontent.com/1959781638e4f8c4852742352ececfdd122aec7a3bfe65edf84ab034b7b418de/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f776f726b736f6d652f67726170686c696e742f7374617469632e796d6c3f6272616e63683d6d61696e267374796c653d666c61742d737175617265266c6162656c3d537461746963253230416e616c79736973)](https://github.com/worksome/graphlint/actions?query=workflow%3A%22Static%20Analysis%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/b9182c81400eeb34ecda9e921c5052cac3695297ab6d9f4c407a9b951589a3f9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f776f726b736f6d652f67726170686c696e742e7376673f7374796c653d666c61742d737175617265266c6162656c3d446f776e6c6f616473)](https://packagist.org/packages/worksome/graphlint)

A linting tool for GraphQL schemas.

This tool is meant for finding errors in your GraphQL schemas. It is not made for your Queries. The tool contains multiple inspections which can be added to the user's config file for checking for different things. The purpose of this tool is to implement the [GraphQL Standard from Worksome](https://github.com/worksome/graphql-standards).

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

[](#installation)

The tool can be installed as a composer global dependency via

```
composer global require worksome/graphlint
```

or via Homebrew

```
brew tap worksome/tap
brew install --formula worksome/tap/graphlint
```

Usage
-----

[](#usage)

The tool can be run via

```
graphlint path/to/schema.graphql
```

### CI Usage with GitHub Actions

[](#ci-usage-with-github-actions)

With GitHub Actions, we support using the [`cs2pr`](https://github.com/staabm/annotate-pull-request-from-checkstyle)tool to add inline annotations to your pull requests.

```
graphlint --format=checkstyle path/to/schema.graphql | cs2pr
```

Configuration
-------------

[](#configuration)

> ⚠️ Currently the package only supports running on compiled schema. It will later get support for running on original schemas also.

Create a file in the root called `graphlint.php` with the following configuration.

```
