Branch Coverage

blib/lib/GraphQL/Schema.pm
Criterion Covered Total %
branch 36 54 66.6


line true false branch
123 0 5848 if @_ < 2
0 11720 if @_ > 2
2546 3393 unless ${my $v = bless( {"_overload_coderef" => sub { ;},"_sub_quoted" => 2,"coercion" => bless( {"_compiled_type_constraint_check" => sub ($) { ;},"frozen" => 1,"name" => "__ANON__","type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { ;},"display_name" => "Map[StrNameValid,ConsumerOf[\"GraphQL::Role::Named\"]]","inlined" => sub { ;},"name" => "__ANON__","parameters" => [bless( {"_overload_coderef" => sub { ;},"_sub_quoted" => 5,"compiled_type_constraint" => sub ($) { ;},"constraint" => sub { ;},"display_name" => "StrNameValid","library" => "GraphQL::Type::Library","name" => "StrNameValid","parent" => bless( {"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"frozen" => 1,"name" => "__ANON__","type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { ;},"display_name" => "StrMatch[(?^u:^[_a-zA-Z][_a-zA-Z0-9]*\$)]","inlined" => sub { ;},"name" => "__ANON__","parameters" => [qr/^[_a-zA-Z][_a-zA-Z0-9]*$/u],"parent" => bless( {"_overload_coderef" => sub { ;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ($) { ;},"display_name" => "to_StrMatch","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"constraint_generator" => sub { ;},"display_name" => "StrMatch","inline_generator" => sub { ;},"library" => "Types::Standard","name" => "StrMatch","name_generator" => sub { ;},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { ;},"_sub_quoted" => 28,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Str","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { ;},"display_name" => "Str","inlined" => sub { ;},"library" => "Types::Standard","name" => "Str","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { ;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ($) { ;},"display_name" => "to_Value","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { ;},"display_name" => "Value","inlined" => sub { ;},"library" => "Types::Standard","name" => "Value","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { ;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ($) { ;},"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { ;},"display_name" => "Defined","inlined" => sub { ;},"library" => "Types::Standard","name" => "Defined","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { ;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ($) { ;},"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"display_name" => "Item","inlined" => sub { ;},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { ;},"_sub_quoted" => 2,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"display_name" => "Any","inlined" => sub { ;},"library" => "Types::Standard","name" => "Any","uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"uniq" => 5}, 'Type::Tiny' ),"uniq" => 6}, 'Type::Tiny' ),"uniq" => 7}, 'Type::Tiny' ),"uniq" => 30}, 'Type::Tiny' ),"uniq" => 39}, 'Type::Tiny' ),"uniq" => 40}, 'Type::Tiny' ),bless( {"coercion" => bless( {"_compiled_type_constraint_check" => sub ($) { ;},"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { ;},"display_name" => "ConsumerOf[\"GraphQL::Role::Named\"]","inlined" => sub { ;},"name" => "__ANON__","role" => "GraphQL::Role::Named","uniq" => 120}, 'Type::Tiny::Role' )],"parent" => bless( {"_overload_coderef" => sub { ;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ($) { ;},"display_name" => "to_Map","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { ;},"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"constraint_generator" => sub { ;},"deep_explanation" => sub { ;},"display_name" => "Map","inline_generator" => sub { ;},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { ;},"hashref_allows_value" => sub { ;}},"name" => "Map","name_generator" => sub { ;},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { ;},"_sub_quoted" => 1,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { ;},"compiled_type_constraint" => do{my $o},"constraint" => sub { ;},"constraint_generator" => sub { ;},"deep_explanation" => sub { ;},"display_name" => "HashRef","inline_generator" => sub { ;},"inlined" => sub { ;},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { ;},"hashref_allows_value" => sub { ;}},"name" => "HashRef","name_generator" => sub { ;},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { ;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ($) { ;},"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { ;},"constraint_generator" => sub { ;},"deep_explanation" => sub { ;},"display_name" => "Ref","inline_generator" => sub { ;},"inlined" => sub { ;},"library" => "Types::Standard","name" => "Ref","parent" => {},"uniq" => 14}, 'Type::Tiny' ),"uniq" => 20}, 'Type::Tiny' ),"uniq" => 24}, 'Type::Tiny' ),"uniq" => 121}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"compiled_type_constraint"};$v->{"parameters"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"};$v->{"parameters"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"compiled_type_constraint"};$v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"constraint"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"constraint"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"constraint"};$v->{"parameters"}[1]{"coercion"}{"type_constraint"} = $v->{"parameters"}[1];$v->{"parameters"}[1]{"compiled_type_constraint"} = $v->{"parameters"}[1]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"constraint"} = $v->{"parameters"}[0]{"constraint"};$v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}; \$v}->check($map)
3315 78 unless ${my $v = bless( {"_overload_coderef" => sub { ;},"_sub_quoted" => 3,"class" => "GraphQL::Type","coercion" => bless( {"_compiled_type_constraint_check" => sub ($) { ;},"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { ;},"display_name" => "InstanceOf[\"GraphQL::Type\"]","inlined" => sub { ;},"name" => "__ANON__","uniq" => 99}, 'Type::Tiny::Class' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"}; \$v}->check($type)
124 2218 1517 if $type->can("of")
125 2 1552 if $type->can("name")
126 795 162 if $name and $map->{$name} and $map->{$name} == $type
127 561 645 if $map->{$name}
130 9 1196 unless $type->interfaces
2364 332 if $type->isa("GraphQL::Type::Object")
132 573 625 if $type->isa("GraphQL::Type::Union")
134 55 1 if (grep $type->DOES($_), ("GraphQL::Role::FieldsInput", "GraphQL::Role::FieldsOutput"))
137 0 56 unless $_->{"args"}
161 0 56 if @_ < 2
0 56 if @_ > 2
0 348 unless ${my $v = bless( {"coercion" => bless( {"_compiled_type_constraint_check" => sub ($) { ;},"frozen" => 1,"name" => "__ANON__","type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { ;},"display_name" => "ConsumerOf[\"GraphQL::Role::Abstract\"]","inlined" => sub { ;},"name" => "__ANON__","role" => "GraphQL::Role::Abstract","uniq" => 122}, 'Type::Tiny::Role' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"}; \$v}->check($abstract_type)
162 0 348 if $abstract_type->isa("GraphQL::Type::Union")
163 0 348 unless $self->_interface2types->{$abstract_type->name}
177 0 75 if @_ < 3
42 7 if @_ > 3
0 0 unless ${my $v = bless( {"coercion" => bless( {"_compiled_type_constraint_check" => sub ($) { ;},"frozen" => 1,"name" => "__ANON__","type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { ;},"display_name" => "ConsumerOf[\"GraphQL::Role::Abstract\"]","inlined" => sub { ;},"name" => "__ANON__","role" => "GraphQL::Role::Abstract","uniq" => 122}, 'Type::Tiny::Role' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"}; \$v}->check($abstract_type)
0 0 unless ${my $v = bless( {"_overload_coderef" => sub { ;},"_sub_quoted" => 5,"class" => "GraphQL::Type::Object","coercion" => bless( {"_compiled_type_constraint_check" => sub ($) { ;},"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { ;},"display_name" => "InstanceOf[\"GraphQL::Type::Object\"]","inlined" => sub { ;},"name" => "__ANON__","uniq" => 123}, 'Type::Tiny::Class' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"}; \$v}->check($possible_type)
180 0 0 if $$map{$abstract_type->name}
181 0 5848 unless $self->get_possible_types($abstract_type)
182 19 7 unless @possibles
240 0 2 if @_ < 2
0 2 if @_ > 3