private function assignAndResolveIncludes(
        ResourceManager $resourceManager,
        string $resource,
        ElementInterface $resourceOrCollection,
        Parameters $parameters
    )
    {
        $relations = collect();

        $availableIncludes = $this->retrieveRelationsRecursive($resource, $relations, $resourceManager);

        $resourceOrCollection->with($parameters->getInclude($availableIncludes->all()));
    }