PHP code example of digiaonline / lumen-graphql

1. Go to this page and download the library: Download digiaonline/lumen-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/ */

    

digiaonline / lumen-graphql example snippets


$app->register(Digia\Lumen\GraphQL\GraphQLServiceProvider::class);

$router->get('/graphql', [
    'uses' => 'Digia\Lumen\GraphQL\Http\GraphQLController@renderGraphiQL',
]);

$router->post('/graphql', [
    'uses' => 'Digia\Lumen\GraphQL\Http\GraphQLController@handle',
]);
bootstrap/app.php
routes/web.php