File tree Expand file tree Collapse file tree 3 files changed +33
-5
lines changed
Expand file tree Collapse file tree 3 files changed +33
-5
lines changed Original file line number Diff line number Diff line change 22
33namespace ProcessWire \GraphQL \Field \Pages ;
44
5- use Youshido \GraphQL \Execution \ResolveInfo ;
6- use ProcessWire \GraphQL \Field \WireArray \WireArrayCountField ;
5+ use Youshido \GraphQL \Type \Scalar \IntType ;
6+ use Youshido \GraphQL \Field \AbstractField ;
7+ use ProcessWire \GraphQL \Field \Traits \OptionalSelectorTrait ;
78
8- class PagesCountField extends WireArrayCountfield {
9+ class PagesCountField extends AbstractField {
10+
11+ use OptionalSelectorTrait;
12+
13+ public function getType ()
14+ {
15+ return new IntType ();
16+ }
17+
18+ public function getName ()
19+ {
20+ return 'count ' ;
21+ }
922
1023 public function getDescription ()
1124 {
Original file line number Diff line number Diff line change 22
33namespace ProcessWire \GraphQL \Field \Pages ;
44
5- use ProcessWire \GraphQL \Field \PageArray \PageArrayFindField ;
5+ use Youshido \GraphQL \Field \AbstractField ;
6+ use ProcessWire \GraphQL \Type \Object \PageArrayType ;
7+ use ProcessWire \GraphQL \Field \Traits \OptionalSelectorTrait ;
68
7- class PagesFindField extends PageArrayFindField {
9+ class PagesFindField extends AbstractField {
10+
11+ use OptionalSelectorTrait;
12+
13+ public function getType ()
14+ {
15+ return new PageArrayType ();
16+ }
17+
18+ public function getName ()
19+ {
20+ return 'find ' ;
21+ }
822
923 public function getDescription ()
1024 {
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ public function getDescription()
2121
2222 public function build ($ config )
2323 {
24+ parent ::build ($ config );
2425 $ config ->addField (new PagesCountField ());
2526 $ config ->addField (new PagesFindField ());
2627 }
You can’t perform that action at this time.
0 commit comments