From c7f3c1b9407b55612ed9e3ae99d78e43a1188177 Mon Sep 17 00:00:00 2001 From: Alexandr Viniychuk Date: Sun, 8 May 2016 23:12:37 -0400 Subject: [PATCH] processor empty load fix --- src/Processor.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 = [];