1
|
|
|
<?php |
2
|
|
|
/******************************************************************************* |
3
|
|
|
* This file is part of the GraphQL Bundle package. |
4
|
|
|
* |
5
|
|
|
* (c) YnloUltratech <[email protected]> |
6
|
|
|
* |
7
|
|
|
* For the full copyright and license information, please view the LICENSE |
8
|
|
|
* file that was distributed with this source code. |
9
|
|
|
******************************************************************************/ |
10
|
|
|
|
11
|
|
|
namespace Ynlo\GraphQLBundle\Events; |
12
|
|
|
|
13
|
|
|
final class GraphQLEvents |
14
|
|
|
{ |
15
|
|
|
/** |
16
|
|
|
* Private constructor. This class is not meant to be instantiated. |
17
|
|
|
*/ |
18
|
|
|
private function __construct() |
19
|
|
|
{ |
20
|
|
|
} |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* This event is executed just before a operation is started |
24
|
|
|
* event: Ynlo\GraphQLBundle\Events\GraphQLOperationEvent |
25
|
|
|
* |
26
|
|
|
* @var string |
27
|
|
|
*/ |
28
|
|
|
public const OPERATION_START = 'graphql.operationStart'; |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* This event is executed just after a operation is finished |
32
|
|
|
* event: Ynlo\GraphQLBundle\Events\GraphQLOperationEvent |
33
|
|
|
* |
34
|
|
|
* @var string |
35
|
|
|
*/ |
36
|
|
|
public const OPERATION_END = 'graphql.operationEnd'; |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* This event is executed just before a field has been read |
40
|
|
|
* if the propagation is stopped or the value is settled in the event |
41
|
|
|
* the las value will be returned |
42
|
|
|
* |
43
|
|
|
* event: Ynlo\GraphQLBundle\Events\GraphQLFieldEvent |
44
|
|
|
* |
45
|
|
|
* @var string |
46
|
|
|
*/ |
47
|
|
|
public const PRE_READ_FIELD = 'graphql.preGetField'; |
48
|
|
|
|
49
|
|
|
/** |
50
|
|
|
* This event is executed just after a field has been read |
51
|
|
|
* if the propagation is stopped or the value is settled in the event |
52
|
|
|
* the las value will be returned |
53
|
|
|
* |
54
|
|
|
* event: Ynlo\GraphQLBundle\Events\GraphQLFieldEvent |
55
|
|
|
* |
56
|
|
|
* @var string |
57
|
|
|
*/ |
58
|
|
|
public const POST_READ_FIELD = 'graphql.postGetField'; |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* This event is executed when a mutation is submitted |
62
|
|
|
* event: Ynlo\GraphQLBundle\Events\GraphQLMutationEvent |
63
|
|
|
* |
64
|
|
|
* @var string |
65
|
|
|
*/ |
66
|
|
|
public const MUTATION_SUBMITTED = 'graphql.mutationSubmitted'; |
67
|
|
|
|
68
|
|
|
/** |
69
|
|
|
* This event is executed when a mutation is completed |
70
|
|
|
* event: Ynlo\GraphQLBundle\Events\GraphQLMutationEvent |
71
|
|
|
* |
72
|
|
|
* @var string |
73
|
|
|
*/ |
74
|
|
|
public const MUTATION_COMPLETED = 'graphql.mutationCompleted'; |
75
|
|
|
} |
76
|
|
|
|