GraphQL/Filter/Null.pm untested

filter: Statementstmt 0.0% 0 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 25 CC 1 SCAR 6.9
CC
1
Cov
0%
type_for
2.0
to_search
2.0
BEGIN
2.0
CRAP 2.0
1 package DBIO::GraphQL::Filter::Null;
2 # ABSTRACT: No-op filter adapter - disables filtering entirely
3 use strict;
4 use warnings;
5  
6 our $VERSION = '0.900007';
7  
8 use base 'DBIO::GraphQL::Filter';
9  
10 use GraphQL::Type::InputObject;
11  
12 # A real second adapter for the Filter seam. type_for returns an empty
13 # InputObject (no per-column fields, no AND/OR combinators), and
14 # to_search always returns undef. When this adapter is wired into a
15 # GraphQL schema, filter args are syntactically permitted (a value
16 # of {} or null satisfies the type) but have no effect on the query.
17  
18 sub type_for {
19 my ($self, $moniker) = @_;
20 return GraphQL::Type::InputObject->new(
21 name => "${moniker}Filter",
22 fields => {},
23 );
24 }
25  
26 sub to_search {
27 return undef;
28 }
29  
30 1;
31  
32 __END__