Youshido\GraphQL\Execution\Processor::parseAndCreateRequest PHP Method

parseAndCreateRequest() protected method

protected parseAndCreateRequest ( $payload, $variables = [] )
    protected function parseAndCreateRequest($payload, $variables = [])
    {
        if (empty($payload)) {
            throw new \InvalidArgumentException('Must provide an operation.');
        }
        $parser = new Parser();
        $request = new Request($parser->parse($payload), $variables);
        (new RequestValidator())->validate($request);
        $this->executionContext->setRequest($request);
    }