Skip to content

Commit

Permalink
#202 adds entry query arguments to entries field
Browse files Browse the repository at this point in the history
  • Loading branch information
markhuot committed Dec 17, 2018
1 parent 08b5b26 commit 09a4a73
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Listeners/GetEntriesFieldSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace markhuot\CraftQL\Listeners;

use markhuot\CraftQL\FieldBehaviors\EntryQueryArguments;
use markhuot\CraftQL\Types\EntryInterface;
use markhuot\CraftQL\Types\EntryConnection;

Expand All @@ -21,6 +22,7 @@ function handle($event) {

$event->schema->addField($field)
->type(EntryInterface::class)
->use(new EntryQueryArguments)
->lists()
->resolve(function ($root, $args, $context, $info) use ($field, $request) {
return $request->entries($root->{$field->handle}, $root, $args, $context, $info)
Expand Down

0 comments on commit 09a4a73

Please sign in to comment.