GraphQL\Schema::getDirective PHP Method

getDirective() public method

public getDirective ( $name ) : Directive
$name
return GraphQL\Type\Definition\Directive
    public function getDirective($name)
    {
        foreach ($this->getDirectives() as $directive) {
            if ($directive->name === $name) {
                return $directive;
            }
        }
        return null;
    }