| 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
| |||||||||||
| 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
| |||||||||||
| 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__ | ||||||||||