PHP code example of laracomponents / graphql

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

    

laracomponents / graphql example snippets


'providers' => [
    // ...
    LaraComponents\GraphQL\ServiceProvider::class,
],
bash
php artisan vendor:publish --provider="LaraComponents\GraphQL\ServiceProvider"
bash
$ php artisan make:graphql:scheme DefaultSchema
bash
$ php artisan make:graphql:type UserType
 Which type would you like to create?:
  [0] AbstractType
  [1] AbstractScalarType
  [2] AbstractObjectType
  [3] AbstractMutationObjectType
  [4] AbstractInputObjectType
  [5] AbstractInterfaceType
  [6] AbstractEnumType
  [7] AbstractListType
  [8] AbstractUnionType
bash
$ php artisan make:graphql:field UsersField