PHP code example of the-under-scorer / wpk-core-graphql
1. Go to this page and download the library: Download the-under-scorer/wpk-core-graphql library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
the-under-scorer / wpk-core-graphql example snippets
use UnderScorer\Core\Http\Router;
use UnderScorer\GraphqlServer\Http\Controllers\GraphqlServer;
/**
* @var Router $router
*/
$router
->route()
->any()
->match( '/graphql' )
->controller( GraphqlServer::class );
use UnderScorer\Core\Providers\CacheProvider;
use UnderScorer\Core\Providers\DatabaseProvider;
use UnderScorer\Core\Providers\EnqueueProvider;
use UnderScorer\Core\Providers\FileSystemProvider;
use UnderScorer\Core\Providers\LoggerProvider;
use UnderScorer\Core\Providers\NoticesProvider;
use UnderScorer\Core\Providers\RouterProvider;
use UnderScorer\Core\Providers\SerializerProvider;
use UnderScorer\Core\Providers\ValidationProvider;
use UnderScorer\Core\Providers\ViewProvider;
use UnderScorer\GraphqlServer\Providers\SchemaProvider;
use UnderScorer\GraphqlServer\Providers\DataLoaderProvider;
return [
CacheProvider::class,
RouterProvider::class,
SchemaProvider::class, // Graphql Schema Provider,
DataLoaderProvider::class, // DataLoader Provider
SerializerProvider::class,
FileSystemProvider::class,
EnqueueProvider::class,
ViewProvider::class,
NoticesProvider::class,
LoggerProvider::class,
DatabaseProvider::class,
ValidationProvider::class,
];
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.