
Gato GraphQL
Gato GraphQL is a tool for interacting with data in your WordPress site. You can think of it as a Swiss Army knife for dealing with data, as it allows to retrieve, manipulate and store again any piece of data, in any desired way, using the GraphQL language.
With Gato GraphQL, you can:
- Query data to create headless sites
- Expose public and private APIs
- Map JS components to Gutenberg blocks
- Synchronize content across sites
- Automate tasks
- Complement WP-CLI to execute admin tasks
- Search/replace content for site migrations
- Send notifications when something happens (new post published, new comment added, etc)
- Interact with cloud services
- Convert the data from a 3rd-party API into the required format
- Translate content in the site
- Update thousands of posts with a single action
- Insert or remove Gutenberg blocks in bulk
- Validate that a new post contains a mandatory block
- And much more...
Check out the Tutorial section in gatographql.com which demonstrates how to implement these use cases using the plugin.
Development
Please see DEVELOPMENT.
Monorepo documentation
GatoGraphQL/GatoGraphQL is a monorepo containing the several layers required for Gato GraphQL. Check Monorepo_README for documentation of the different projects.
Screenshots
GraphiQL client to execute queries in the wp-admin:

Interactively browse the GraphQL schema, exploring all connections among entities:

The GraphiQL client for the single endpoint is exposed to the Internet:

Interactively browse the GraphQL schema exposed for the single endpoint:

Persisted queries are pre-defined and stored in the server:

Requesting a persisted query URL will retrieve its pre-defined GraphQL response:

We can create multiple custom endpoints, each for a different target:

Endpoints are configured via Schema Configurations:

We can create many Schema Configurations, customizing them for different users or applications:

Custom endpoints and Persisted queries can be public, private and password-protected:

Manage custom endpoints and persisted queries by adding categories to them:

We can configure exactly what custom post types, options and meta keys can be queried:

Configure every aspect from the plugin via the Settings page:

Modules with different functionalities and schema extensions can be enabled and disabled:

Augment the plugin functionality and GraphQL schema via extensions:

The Tutorial section explains how to achieve many objectives, exploring all the elements from the GraphQL schema:

Standards
To check the coding standards via PHP CodeSniffer, run:
composer check-style
To automatically fix issues, run:
composer fix-style
Release notes
Click to expand the Release notes
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
To execute PHPUnit, run:
composer test
Static Analysis
To execute PHPStan, run:
composer analyse
Report issues
To report a bug or request a new feature please do it on the GatoGraphQL monorepo issue tracker.
Security issues
You can report security bugs through the Patchstack Vulnerability Disclosure Program. The Patchstack team help validate, triage and handle any security vulnerabilities. Report a security vulnerability.
Contributing
We welcome contributions for this package on the GatoGraphQL monorepo (where the source code for this package is hosted).
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
License
GPLv2 or later. Please see License File for more information.