Skip to content

Commit

Permalink
Merge pull request #56 from codex-team/is-root
Browse files Browse the repository at this point in the history
add isRoot field
  • Loading branch information
talyguryn committed Jan 25, 2018
2 parents 101bfe2 + 1127b98 commit 7e44578
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @talyguryn @specc @khaydarov @gohabereg @n0str
* @talyguryn @neSpecc @khaydarov @gohabereg @n0str
7 changes: 7 additions & 0 deletions www/components/api/models/Folder.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ class Folder extends Base
*/
public $isRemoved = false;

/**
* Is this Root Folder
*
* @var bool
*/
public $isRoot = false;

/**
* List of models of Notes
*
Expand Down
4 changes: 4 additions & 0 deletions www/schema/types/Folder.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ public function __construct()
'type' => Type::boolean(),
'description' => 'Removed status: true if Folder marked as removed',
],
'isRoot' => [
'type' => Type::boolean(),
'description' => 'true if this Folder is Root',
],
'notes' => [
'type' => Type::listOf(Types::note()),
'description' => 'Notes list',
Expand Down
3 changes: 2 additions & 1 deletion www/schema/types/Mutation.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ public function __construct()
'dtCreate' => Type::int(),
'dtModify' => Type::int(),
'isShared' => Type::boolean(),
'isRemoved' => Type::boolean()
'isRemoved' => Type::boolean(),
'isRoot' => Type::boolean()
],
'resolve' => function ($root, $args, $context, ResolveInfo $info) {
try {
Expand Down

0 comments on commit 7e44578

Please sign in to comment.