diff --git a/src/Handler/Concerns/IncludesData.php b/src/Handler/Concerns/IncludesData.php index 00f73d0..0375dd1 100644 --- a/src/Handler/Concerns/IncludesData.php +++ b/src/Handler/Concerns/IncludesData.php @@ -72,7 +72,7 @@ trait IncludesData throw new BadRequestException("Invalid include [{$path}{$name}]", 'include'); } - if ($type = $fields[$name]->getType()) { + if (($type = $fields[$name]->getType()) && is_string($type)) { $relatedResource = $this->api->getResource($type); $this->validateInclude($relatedResource, $nested, $name.'.');