Source of file GroupTypeCreator.php
Size: 0,495 Bytes - Last Modified: 2021-12-23T10:31:47+00:00
/var/www/docs.ssmods.com/process/src/examples/code/GroupTypeCreator.php
12345678910111213141516171819202122232425 | <?php namespace MyProject\GraphQL; use GraphQL\Type\Definition\Type; use SilverStripe\GraphQL\TypeCreator; class GroupTypeCreator extends TypeCreator { public function attributes() { return [ 'name' => 'group' ]; } public function fields() { return [ 'ID' => ['type' => Type::nonNull(Type::id())], 'Title' => ['type' => Type::string()], 'Description' => ['type' => Type::string()] ]; } } |