src/Schema/Directives/OrderByDirective.php
public function manipulateSchema(InputValueDefinitionNode $argDefinition, FieldDefinitionNode $fieldDefinition, ObjectTypeDefinitionNode $parentType, DocumentAST $current)
    {
        $expectedOrderByClause = ASTHelper::cloneNode($argDefinition);

        // Users may define this as NonNull if they want
        if ($argDefinition->type instanceof NonNullTypeNode) {
            $expectedOrderByClause = $argDefinition->type;
        }

        if (
            data_get(
                $expectedOrderByClause,
                // Must be a list
                'type'
                // of non-nullable
                .'.type'
                // input objects
                .'.type.name.value'
            ) !== 'OrderByClause'
        ) {
            throw new DefinitionException(
              "Must define the argument type of {$argDefinition->name->value} on field {$fieldDefinition->name->value} as [OrderByClause!]."
            );
        }

        return $current;
    }
public function manipulateSchema(InputValueDefinitionNode $argDefinition, FieldDefinitionNode $fieldDefinition, ObjectTypeDefinitionNode $parentType, DocumentAST $current)
    {
        $expectedOrderByClause = ASTHelper::cloneNode($argDefinition);

        // Users may define this as NonNull if they want
        if ($argDefinition->type instanceof NonNullTypeNode) {
            $expectedOrderByClause = $argDefinition->type;
        }

        if (
            data_get(
                $expectedOrderByClause,
                // Must be a list
                'type'
                // of non-nullable
                .'.type'
                // input objects
                .'.type.name.value'
            ) !== 'OrderByClause'
        ) {
            throw new DefinitionException(
              "Must define the argument type of {$argDefinition->name->value} on field {$fieldDefinition->name->value} as [OrderByClause!]."
            );
        }

        return $current;
    }
public function manipulateSchema ( InputValueDefinitionNode $ argDefinition , FieldDefinitionNode $ fieldDefinition , ObjectTypeDefinitionNode $ parentType , DocumentAST $ current ) { $ expectedOrderByClause = ASTHelper :: cloneNode ( $ argDefinition ) ; // Users may define this as NonNull if they want if ( $ argDefinition -> type instanceof NonNullTypeNode ) { $ expectedOrderByClause = $ argDefinition -> type ; } if ( data_get ( $ expectedOrderByClause , // Must be a list 'type' // of non-nullable . '.type' // input objects . '.type.name.value' ) !== 'OrderByClause' ) { throw new DefinitionException ( "Must define the argument type of {$argDefinition->name->value} on field {$fieldDefinition->name->value} as [OrderByClause!]." ) ; } return $ current ; }
Validate the input argument definition.

@param  \GraphQL\Language\AST\InputValueDefinitionNode  $argDefinition
@param  \GraphQL\Language\AST\FieldDefinitionNode  $fieldDefinition
@param  \GraphQL\Language\AST\ObjectTypeDefinitionNode  $parentType
@param  \Nuwave\Lighthouse\Schema\AST\DocumentAST  $current
@return \Nuwave\Lighthouse\Schema\AST\DocumentAST
Validate the input argument definition .