blib/lib/GraphQL/Houtou/Validation.pm

filter: Statementstmt 100% 24 / 24 Branchbran 100% 4 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 0.0% 0 / 2 totaltotal 94.5% 35 / 37 CC 3 SCAR 3.7
CC
3
Cov
100%
validate
2.0
check_query_cost
2.0
BEGIN
1.0
CRAP 1.4
« blib/lib/GraphQL/Houtou/Error.pm ↑ Summary src/parser_ast_runtime.h »
1 package GraphQL::Houtou::Validation;
2  
3 41 ▶use 5.014;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 41 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 41 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 41 ▶use Exporter 'import';
Subroutine BEGIN: called CC=1 SCAR=0.0
8 41 ▶use GraphQL::Houtou ();
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 41 our @EXPORT_OK = qw(check_query_cost validate);
11  
12 487 ▶sub validate {
Subroutine validate: called CC=2 SCAR=6.9
Pod undocumented
13 487 my ($schema, $source_or_ast, @rest) = @_;
14 487 GraphQL::Houtou::_bootstrap_xs();
15 # Loading the parser module installs the boolean/string factories used by
16 # the validation parser. The source itself is still parsed exactly once,
17 # inside validate_xs, so parser-time duplicate diagnostics are preserved.
18 487 ▶ require GraphQL::Houtou::XS::Parser if !ref($source_or_ast);
Branch: 1 branch
BranchTrueFalseTotal
unless ref $source_or_ast 60 427 487
19 487 return GraphQL::Houtou::XS::Validation::validate_xs(
20 $schema, $source_or_ast, @rest,
21 );
22 }
23  
24 447 ▶sub check_query_cost {
Subroutine check_query_cost: called CC=2 SCAR=6.9
Pod undocumented
25 447 my ($schema, $source_or_ast, %options) = @_;
26 447 GraphQL::Houtou::_bootstrap_xs();
27 447 ▶ require GraphQL::Houtou::XS::Parser if !ref($source_or_ast);
Branch: 1 branch
BranchTrueFalseTotal
unless ref $source_or_ast 5 442 447
28 447 return GraphQL::Houtou::XS::Validation::check_cost_xs(
29 $schema, $source_or_ast, \%options,
30 );
31 }
32  
33 41 1;
34  
35 __END__
« blib/lib/GraphQL/Houtou/Error.pm ↑ Summary src/parser_ast_runtime.h »