DBIO-GraphQL

 view release on metacpan or  search on metacpan

t/06-pagination-filter.t  view on Meta::CPAN

    or diag 'got cond: ' . explain($cond);
  like($err,
    qr/^DBIO::GraphQL::Filter: unknown column 'no_such_col' on source 'Book'/,
    'rejection uses the clean DBIO::GraphQL::Filter message, not core "No such column"');
}

# A real column must still pass the guard (guard does not over-block).
{
  my $filter = DBIO::GraphQL::Filter::Search->new(schema => $db);
  my $cond = eval { $filter->to_search({ title => { eq => 'Book 1' } }, 'Book') };
  ok(!$@, 'known filter column is not blocked by the guard')
    or diag $@;
  ok($cond, 'known filter column compiles to a search condition');
}

done_testing;



( run in 0.880 second using v1.01-cache-2.11-cpan-800906f7e73 )