GraphQL\Schema::__construct PHP Method

__construct() public method

Schema constructor.
public __construct ( array $config = null )
$config array
    public function __construct($config = null)
    {
        if (func_num_args() > 1 || $config instanceof Type) {
            trigger_error('GraphQL\\Schema constructor expects config object now instead of types passed as arguments. ' . 'See https://github.com/webonyx/graphql-php/issues/36', E_USER_DEPRECATED);
            list($queryType, $mutationType, $subscriptionType) = func_get_args() + [null, null, null];
            $config = ['query' => $queryType, 'mutation' => $mutationType, 'subscription' => $subscriptionType];
        }
        $this->init($config);
    }