Skip to content

Commit

Permalink
processor empty load fix
Browse files Browse the repository at this point in the history
  • Loading branch information
viniychuk committed May 9, 2016
1 parent cbc0616 commit c7f3c1b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ public function setSchema(AbstractSchema $schema)

public function processRequest($payload, $variables = [])
{
if ($this->hasErrors()) return $this;
if (!$this->getSchema()) {
$this->addError(new ConfigurationException('You have to set GraphQL Schema to process'));
}
if (empty($payload) || $this->hasErrors()) return $this;

$this->data = [];

Expand Down

0 comments on commit c7f3c1b

Please sign in to comment.