diff --git a/src/Processor.php b/src/Processor.php index 5018ffd0..dc9bc1a7 100644 --- a/src/Processor.php +++ b/src/Processor.php @@ -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 = [];