File Coverage

blib/lib/Plack/App/GraphQL/Context.pm
Criterion Covered Total %
statement 3 4 75.0
branch n/a
condition n/a
subroutine 1 2 50.0
pod 0 1 0.0
total 4 7 57.1


line stmt bran cond sub pod time code
1             package Plack::App::GraphQL::Context;
2              
3 1     1   733 use Moo;
  1         22  
  1         6  
4              
5             has ['request', 'app', 'data'] => (is=>'ro', required=>1);
6             has log => (is=>'ro', required=>0);
7              
8 0     0 0   sub req { shift->request }
9              
10             1;
11              
12             =head1 NAME
13            
14             Plack::App::GraphQL::Context - The Default Context
15              
16             =head1 SYNOPSIS
17            
18             TBD
19              
20             =head1 DESCRIPTION
21            
22             This is a per request context that is passed to your resolvers in addition
23             to the root or local value. Useful if you need to inspect some aspect of
24             the request. Subclass or roll your own as needed. For example you could
25             have a custom context with a user object for applications with user login
26             and security.
27            
28             =head1 AUTHOR
29            
30             John Napiorkowski
31              
32             =head1 SEE ALSO
33            
34             L<Plack::App::GraphQL>
35            
36             =cut