This commit is contained in:
Your Name
2021-07-26 19:46:18 +02:00
parent e7a49138bb
commit aae17f10a6
818 changed files with 70695 additions and 16408 deletions
+40 -9
View File
@@ -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();
}
}