line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use 5.014; |
3
|
18
|
|
|
18
|
|
9477
|
use strict; |
|
18
|
|
|
|
|
66
|
|
4
|
18
|
|
|
18
|
|
91
|
use warnings; |
|
18
|
|
|
|
|
30
|
|
|
18
|
|
|
|
|
361
|
|
5
|
18
|
|
|
18
|
|
73
|
use Types::Standard -all; |
|
18
|
|
|
|
|
36
|
|
|
18
|
|
|
|
|
555
|
|
6
|
18
|
|
|
18
|
|
84
|
use Moo::Role; |
|
18
|
|
|
|
|
31
|
|
|
18
|
|
|
|
|
129
|
|
7
|
18
|
|
|
18
|
|
713818
|
use GraphQL::Type::NonNull; |
|
18
|
|
|
|
|
53
|
|
|
18
|
|
|
|
|
181
|
|
8
|
18
|
|
|
18
|
|
19561
|
|
|
18
|
|
|
|
|
55
|
|
|
18
|
|
|
|
|
134
|
|
9
|
|
|
|
|
|
|
our $VERSION = '0.02'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 NAME |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
GraphQL::Role::Nullable - GraphQL object role |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 SYNOPSIS |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
with qw(GraphQL::Role::Nullable); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
# or runtime |
20
|
|
|
|
|
|
|
Role::Tiny->apply_roles_to_object($foo, qw(GraphQL::Role::Nullable)); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 DESCRIPTION |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
Allows type constraints for nullable objects. |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 METHODS |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head2 non_null |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Returns a wrapped version of the type using L<GraphQL::Type::NonNull>, |
31
|
|
|
|
|
|
|
i.e. that may not be null. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=cut |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
has non_null => ( |
36
|
|
|
|
|
|
|
is => 'lazy', |
37
|
|
|
|
|
|
|
isa => InstanceOf['GraphQL::Type::NonNull'], |
38
|
|
|
|
|
|
|
builder => sub { GraphQL::Type::NonNull->new(of => $_[0]) }, |
39
|
242
|
|
|
242
|
|
84535
|
); |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable(); |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |