new Deps
This commit is contained in:
+40
-9
@@ -2,30 +2,61 @@
|
||||
|
||||
namespace Nuwave\Lighthouse\Events;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use GraphQL\Language\AST\DocumentNode;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Nuwave\Lighthouse\Support\Contracts\GraphQLContext;
|
||||
|
||||
/**
|
||||
* Fires right before resolving an individual query.
|
||||
* Fires right before resolving a single operation.
|
||||
*
|
||||
* Might happen multiple times in a single request if
|
||||
* query batching is used.
|
||||
* Might happen multiple times in a single request if batching is used.
|
||||
*/
|
||||
class StartExecution
|
||||
{
|
||||
/**
|
||||
* The client given parsed query string.
|
||||
*
|
||||
* @var \GraphQL\Language\AST\DocumentNode
|
||||
*/
|
||||
public $query;
|
||||
|
||||
/**
|
||||
* The client given variables, neither validated nor transformed.
|
||||
*
|
||||
* @var array<string, mixed>|null
|
||||
*/
|
||||
public $variables;
|
||||
|
||||
/**
|
||||
* The client given operation name.
|
||||
*
|
||||
* @var string|null
|
||||
*/
|
||||
public $operationName;
|
||||
|
||||
/**
|
||||
* The context for the operation.
|
||||
*
|
||||
* @var \Nuwave\Lighthouse\Support\Contracts\GraphQLContext
|
||||
*/
|
||||
public $context;
|
||||
|
||||
/**
|
||||
* The point in time when the query execution started.
|
||||
*
|
||||
* @var \Carbon\Carbon
|
||||
* @var \Illuminate\Support\Carbon
|
||||
*/
|
||||
public $moment;
|
||||
|
||||
/**
|
||||
* StartRequest constructor.
|
||||
*
|
||||
* @return void
|
||||
* @param array<string, mixed>|null $variables
|
||||
*/
|
||||
public function __construct()
|
||||
public function __construct(DocumentNode $query, ?array $variables, ?string $operationName, GraphQLContext $context)
|
||||
{
|
||||
$this->query = $query;
|
||||
$this->variables = $variables;
|
||||
$this->operationName = $operationName;
|
||||
$this->context = $context;
|
||||
$this->moment = Carbon::now();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user