Introspection.php in GraphQL 8.4
File
src/GraphQL/Utility/Introspection.php
View source
<?php
namespace Drupal\graphql\GraphQL\Utility;
use Drupal\graphql\Entity\ServerInterface;
use GraphQL\Server\OperationParams;
use GraphQL\Type\Introspection as IntrospectionType;
class Introspection {
public function introspect(ServerInterface $server) {
$operation = new OperationParams();
$operation->query = IntrospectionType::getIntrospectionQuery([
'descriptions' => TRUE,
]);
$result = $server
->executeOperation($operation);
return $result
->toArray();
}
}