Skip to content

Instantly share code, notes, and snippets.

View bummzack's full-sized avatar

Roman Schmid bummzack

View GitHub Profile
<?php
namespace MyProject\GraphQL;
use SilverStripe\GraphQL\Schema\Field\ModelQuery;
use SilverStripe\GraphQL\Schema\Interfaces\ModelQueryPlugin;
use SilverStripe\GraphQL\Schema\Interfaces\SchemaUpdater;
use SilverStripe\GraphQL\Schema\Schema;
use SilverStripe\GraphQL\Schema\Type\Enum;
// Data Record Class : DataRecord.php
<?php
class DataRecord extends DataObject
{
private static $db = array(
'Firstname' => 'Varchar(255)',
'Lastname' => 'Varchar(255)'
);
private static $many_many = array(