for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace TheCodingMachine\GraphQL\Controllers\Fixtures;
use TheCodingMachine\GraphQL\Controllers\Annotations\SourceField;
use TheCodingMachine\GraphQL\Controllers\Annotations\SourceFieldInterface;
use TheCodingMachine\GraphQL\Controllers\Annotations\Type;
use TheCodingMachine\GraphQL\Controllers\FromSourceFieldsInterface;
/**
* @Type(class=TestObject::class)
*/
class TestTypeWithSourceFieldInterface implements FromSourceFieldsInterface
{
* Dynamically returns the array of source fields to be fetched from the original object.
*
* @return SourceFieldInterface[]
public function getSourceFields(): array
return [
new SourceField(['name'=>'test']),
];
}