Skip to content

WordPress block for adding a GraphiQL client, to query the GraphQL server

License

Notifications You must be signed in to change notification settings

leoloso/graphiql-wp-block

Repository files navigation

GraphiQL WordPress block

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.

About

WordPress block for adding a GraphiQL client, to query the GraphQL server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published