30 lines
595 B
PHP
30 lines
595 B
PHP
<?php
|
|
|
|
|
|
namespace Site\GraphQL;
|
|
|
|
|
|
use GraphQL\Type\Definition\Type;
|
|
use SilverStripe\GraphQL\TypeCreator;
|
|
use SilverStripe\GraphQL\Pagination\Connection;
|
|
|
|
class MemberTypeCreator extends TypeCreator
|
|
{
|
|
public function attributes()
|
|
{
|
|
return [
|
|
'name' => 'member'
|
|
];
|
|
}
|
|
|
|
public function fields()
|
|
{
|
|
return [
|
|
'ID' => ['type' => Type::nonNull(Type::id())],
|
|
'Email' => ['type' => Type::string()],
|
|
'FirstName' => ['type' => Type::string()],
|
|
'Surname' => ['type' => Type::string()],
|
|
];
|
|
}
|
|
}
|