Skip to content

Commit

Permalink
adding structures support
Browse files Browse the repository at this point in the history
  • Loading branch information
markhuot committed Aug 21, 2017
1 parent fc34dd6 commit 9b58e0d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Types/Entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ static function baseFields($request) {
$fields['section'] = ['type' => \markhuot\CraftQL\Types\Section::type()];
$fields['type'] = ['type' => \markhuot\CraftQL\Types\EntryType::type()];

$fields['ancestors'] = ['type' => Type::listOf(\markhuot\CraftQL\Types\Entry::interface($request))];
$fields['children'] = ['type' => Type::listOf(\markhuot\CraftQL\Types\Entry::interface($request))];
$fields['descendants'] = ['type' => Type::listOf(\markhuot\CraftQL\Types\Entry::interface($request))];
$fields['hasDescendants'] = ['type' => Type::nonNull(Type::boolean())];
$fields['level'] = ['type' => Type::int()];
$fields['parent'] = ['type' => \markhuot\CraftQL\Types\Entry::interface($request)];
$fields['siblings'] = ['type' => Type::listOf(\markhuot\CraftQL\Types\Entry::interface($request))];

return static::$baseFields = $fields;
}

Expand Down

0 comments on commit 9b58e0d

Please # to comment.