Skip to content

Commit b08731f

Browse files
committed
GraphQL: fix a bug when the class name isn't provided
1 parent 7a8674b commit b08731f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/GraphQl/Type/SchemaBuilder.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,10 @@ private function convertType(Type $type, bool $input = false, string $mutationNa
366366
}
367367

368368
$resourceClass = $this->isCollection($type) ? $type->getCollectionValueType()->getClassName() : $type->getClassName();
369+
if (null === $resourceClass) {
370+
return null;
371+
}
372+
369373
try {
370374
$resourceMetadata = $this->resourceMetadataFactory->create($resourceClass);
371375
if ([] === $resourceMetadata->getGraphql() ?? []) {

0 commit comments

Comments
 (0)