PHPackages                             silverstripe/graphql-devtools - 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. silverstripe/graphql-devtools

ActiveSilverstripe-vendormodule

silverstripe/graphql-devtools
=============================

Tools to help developers building new applications on SilverStripe's GraphQL API

2.0.0(1y ago)13367.2k↓18.3%13[1 PRs](https://github.com/silverstripe/silverstripe-graphql-devtools/pulls)6BSD-3-ClausePHPCI failing

Since Feb 4Pushed 11mo ago9 watchersCompare

[ Source](https://github.com/silverstripe/silverstripe-graphql-devtools)[ Packagist](https://packagist.org/packages/silverstripe/graphql-devtools)[ RSS](/packages/silverstripe-graphql-devtools/feed)WikiDiscussions 2 Synced 1mo ago

READMEChangelog (4)Dependencies (6)Versions (10)Used By (6)

Dev tools for silverstripe-graphql
==================================

[](#dev-tools-for-silverstripe-graphql)

[![CI](https://github.com/silverstripe/silverstripe-graphql-devtools/actions/workflows/ci.yml/badge.svg)](https://github.com/silverstripe/silverstripe-graphql-devtools/actions/workflows/ci.yml)

Tools to help developers building new applications on SilverStripe’s GraphQL API

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

[](#installation)

```
composer require --dev silverstripe/graphql-devtools
```

What it does
------------

[](#what-it-does)

This module adds an implementation of [graphiql](https://github.com/graphql/graphiql), an in-browser IDE for GraphQL servers. It provides browseable documentation of your schema, as well as autocomplete and syntax-checking of your queries.

### Accessing the IDE

[](#accessing-the-ide)

It can be accessed at `/dev/graphql/ide`.

This is because GraphQL 4+ has its own `DevelopmentAdmin` controller.

The GraphQL v4 version of the module allows you to clear your schema by running `sake graphql:clear`.

Security
--------

[](#security)

By default, the tool has the same restrictions as other development tools like `/dev/build`:

- In "dev" mode, it's available without authentication
- In "test" and "live" mode, it requires ADMIN permissions
- It's installed with `composer require --dev` by default. In most deployment contexts that'll mean it's not available on environments in "test" or "live" modes

[![](https://github.com/graphql/graphiql/raw/master/resources/graphiql.png)](https://github.com/graphql/graphiql/raw/master/resources/graphiql.png)

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

[](#configuration)

In most installations of SilverStripe, there are at least two GraphQL servers running - one for the admin (`admin/graphql`) and one for the user space (`/graphql`). By default, only the `default` schema will show, but this is configurable.

### Showing multiple schemas

[](#showing-multiple-schemas)

**Important**: Due to a limitation in the GraphQL Playground library, showing multiple schemas will disable the persistence of IDE state across page refreshes.

**Also important**: When changing the available schemas, be sure to clear the local storage in your browser, otherwise, you'll get inconsistent state.

You can configure the visible schemas in the controller.

Show a select list of schemas

```
SilverStripe\GraphQLDevTools\Controller:
 # show two schemas
 schemas:
   - default
   - admin
 # default schema that is selected
 default_schema: admin
```

Show all schemas

```
SilverStripe\GraphQLDevTools\Controller:
 # show two schemas
 schemas: '*'
 default_schema: default
```

Further, you can override the config in the request, by using `?schema=`, e.g. `http://example.com/dev/graphql/ide?schema=mySchema`.

If you're using a custom controller for your GraphQL endpoint
-------------------------------------------------------------

[](#if-youre-using-a-custom-controller-for-your-graphql-endpoint)

The IDE finds schemas by checking `Director` for routes that map to a `SilverStripe\GraphQL\Controller` instance. If for some reason you're using a custom controller, you might get an error: "Could not find your default schema 'default'. You will need to add one to the `SilverStripe\Control\Director.rules` config setting."

To avoid this, you can explicitly map your graphql route to a schema in your Director config:

```
SilverStripe\Control\Director:
  rules:
    graphql:
      Controller: '%$MyCustomController'
      Schema: default
```

GraphQL schema initialise task
------------------------------

[](#graphql-schema-initialise-task)

This module provides a `GraphQLSchemaInitTask` task to initialise a basic GraphQL schema to get you started. It will create configuration files for your schema and a basic resolver. Specifically it will create:

- `app/_config/graphql.yml`
- `app/_graphql` containing several yml files
- `src/GraphQL/Resolvers.php`

You must be in CLI mode to use this task

To view help for the task to see what options are available:

```
vendor/bin/sake tasks:GraphQLSchemaInitTask --help
```

To run the task with with minimal options:

```
vendor/bin/sake tasks:GraphQLSchemaInitTask --namespace=App
```

Upgrading and maintaining the IDE
---------------------------------

[](#upgrading-and-maintaining-the-ide)

The library running the IDE is [GraphQL Playground](https://github.com/graphql/graphql-playground). It is served from your local environment as an exposed resource. The setup is based on their "HTML Page" example [seen here](https://github.com/graphql/graphql-playground#as-html-page), which uses remote bundle files served from a CDN. This repository uses a manually created bundle file copied directly from the CDN. This may seem like a convoluted approach, but the main benefits are:

- It allows offline use
- It does not require setting up a build chain or installing NPM dependencies
- There is no need for SRI protection

To upgrade GraphQL Playground, refer to the example linked above and use their CDN to download the latest distribution and drop it into this repository. Be sure to update the comment at the top of the `bundle.js` file to track the URL it was downloaded from.

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance50

Moderate activity, may be stable

Popularity46

Moderate usage in the ecosystem

Community34

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor3

3 contributors hold 50%+ of commits

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

Recently: every ~74 days

Total

8

Last Release

383d ago

Major Versions

1.x-dev → 2.0.02025-05-01

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/654636?v=4)[Aaron Carlino](/maintainers/unclecheese)[@unclecheese](https://github.com/unclecheese)

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

![](https://avatars.githubusercontent.com/u/111025?v=4)[Ingo Schommer](/maintainers/chillu)[@chillu](https://github.com/chillu)

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

![](https://www.gravatar.com/avatar/afbb3dcc9ef29c1a6eedd6addcae5fce9ab1271915a85a4c349301b71237368d?d=identicon)[silverstripe-machine01](/maintainers/silverstripe-machine01)

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

![](https://avatars.githubusercontent.com/u/1168676?v=4)[Maxime Rainville](/maintainers/maxime-rainville)[@maxime-rainville](https://github.com/maxime-rainville)

---

Top Contributors

[![GuySartorelli](https://avatars.githubusercontent.com/u/36352093?v=4)](https://github.com/GuySartorelli "GuySartorelli (21 commits)")[![robbieaverill](https://avatars.githubusercontent.com/u/5170590?v=4)](https://github.com/robbieaverill "robbieaverill (14 commits)")[![emteknetnz](https://avatars.githubusercontent.com/u/4809037?v=4)](https://github.com/emteknetnz "emteknetnz (13 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (11 commits)")[![chillu](https://avatars.githubusercontent.com/u/111025?v=4)](https://github.com/chillu "chillu (6 commits)")[![sabina-talipova](https://avatars.githubusercontent.com/u/87288324?v=4)](https://github.com/sabina-talipova "sabina-talipova (3 commits)")[![michalkleiner](https://avatars.githubusercontent.com/u/233342?v=4)](https://github.com/michalkleiner "michalkleiner (3 commits)")[![maxime-rainville](https://avatars.githubusercontent.com/u/1168676?v=4)](https://github.com/maxime-rainville "maxime-rainville (2 commits)")[![dhensby](https://avatars.githubusercontent.com/u/563596?v=4)](https://github.com/dhensby "dhensby (1 commits)")[![medv](https://avatars.githubusercontent.com/u/1631737?v=4)](https://github.com/medv "medv (1 commits)")

---

Tags

hacktoberfest

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/silverstripe-graphql-devtools/health.svg)

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

###  Alternatives

[drush/drush

Drush is a command line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those of us who spend some of our working hours hacking away at the command prompt.

2.4k57.4M685](/packages/drush-drush)[simplesamlphp/simplesamlphp

A PHP implementation of a SAML 2.0 service provider and identity provider.

1.1k12.4M193](/packages/simplesamlphp-simplesamlphp)[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)[lucidarch/lucid

An architecture for scalable software.

326307.6k2](/packages/lucidarch-lucid)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)

PHPackages © 2026

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