leoloso / graphiql-wp-block
WordPress block for adding a GraphiQL client, to query the GraphQL server
Package info
github.com/leoloso/graphiql-wp-block
Language:JavaScript
pkg:composer/leoloso/graphiql-wp-block
Requires
- php: ~7.1
This package is auto-updated.
Last update: 2026-06-05 15:59:48 UTC
README
WordPress block for adding a GraphiQL client, to query the GraphQL server
Usage
Include in your project through Composer:
$ composer require leoloso/graphiql-wp-block dev-master
Note: Your composer.json file must have the configuration below to accept minimum stability "dev" (there are no releases for PoP yet, and the code is installed directly from the master branch):
{ ... "minimum-stability": "dev", "prefer-stable": true, ... }
Then, initialize by running:
(new \Leoloso\GraphiQLWPBlock\Block($graphiQLURLPath))->init();
$graphiQLURLPath is a string containing the URL path to the block. From a plugin, it can be calculated like this:
$graphiQLPath = 'vendor/leoloso/graphiql-wp-block'; $graphiQLURLPath = \plugins_url($graphiQLPath, __FILE__);
Credits
License
The MIT License (MIT). Please see License File for more information.