Source of file PaginatedQueryFake.php
Size: 0,811 Bytes - Last Modified: 2021-12-23T10:31:47+00:00
/var/www/docs.ssmods.com/process/src/tests/Fake/PaginatedQueryFake.php
123456789101112131415161718192021222324252627282930 | <?php namespace SilverStripe\GraphQL\Tests\Fake; use GraphQL\Type\Definition\Type; use SilverStripe\Dev\TestOnly; use SilverStripe\GraphQL\Pagination\Connection; use SilverStripe\GraphQL\Pagination\PaginatedQueryCreator; class PaginatedQueryFake extends PaginatedQueryCreator implements TestOnly { public function createConnection() { return Connection::create('testPagination') ->setArgs([ 'MyField' => [ 'type' => Type::string() ] ]) ->setConnectionType(function () { return $this->manager->getType('TypeCreatorFake'); }) ->setConnectionResolver(function () { $list = DataObjectFake::get(); return $list; }); } } |