PHP code example of fidelize / graphql-laravel-authorize-introspection

1. Go to this page and download the library: Download fidelize/graphql-laravel-authorize-introspection 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/ */

    

fidelize / graphql-laravel-authorize-introspection example snippets




namespace App\GraphQL\Mutation;

use Rebing\GraphQL\Support\Mutation;

class AbstractMutation extends Mutation
{
    public function authorizeIntrospection()
    {
        // Your rule here
        return true;
    }

    public function authorize(array $args)
    {
        // Only override when you have custom rule according to the $args
        return $this->authorizeIntrospection();
    }
}