PHP code example of bagisto / graphql-api

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

    

bagisto / graphql-api example snippets


   use Illuminate\Session\Middleware\StartSession;
   use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;

   return Application::configure(basePath: dirname(__DIR__))
      ->withMiddleware(function (Middleware $middleware) {
         // ... rest of middleware setup

         /**
          * Remove session and cookie middleware from the 'web' middleware group.
          */
         $middleware->removeFromGroup('web', [StartSession::class, AddQueuedCookiesToResponse::class]);

         /**
          * Adding session and cookie middleware globally to apply across non-web routes (e.g. GraphQL)
          */
         $middleware->append([StartSession::class, AddQueuedCookiesToResponse::class]);
      })
      // ... rest of configuration
   
bash
   php artisan bagisto-graphql:install