Command/GraphQLConfigureCommand.php
protected function getMainRouteConfig()
    {
        $routerResources = $this->getContainer()->get('router')->getRouteCollection()->getResources();
        foreach ($routerResources as $resource) {
            /** @var FileResource|DirectoryResource $resource */
            if (method_exists($resource, 'getResource') && substr($resource->getResource(), -11) == 'routes.yaml') {
                return $resource->getResource();
            }
        }

        return null;
    }
protected function getMainRouteConfig()
    {
        $routerResources = $this->getContainer()->get('router')->getRouteCollection()->getResources();
        foreach ($routerResources as $resource) {
            /** @var FileResource|DirectoryResource $resource */
            if (method_exists($resource, 'getResource') && substr($resource->getResource(), -11) == 'routes.yaml') {
                return $resource->getResource();
            }
        }

        return null;
    }
@return null|string

@throws \Exception