private function checkQueryResourceId(array $parameters, string $type): void
    {
        if (!$this->resourceId && $parameters['resource_id']) {
            throw new \InvalidArgumentException(\sprintf(
                'Trying to query with a resource ID, but the repository %s does not provide support for them',
                $this->name
            ));
        }
        if (self::ENDPOINT_SINGLE === $type && !$parameters['resource_id']) {
            throw new \InvalidArgumentException(\sprintf(
                'Trying to query a single element without providing a resource ID for repository %s',
                $this->name
            ));
        }
        if (self::ENPOINT_COLLECTION === $type && $parameters['resource_id']) {
            throw new \InvalidArgumentException(\sprintf(
                'Trying to query a collection element by providing a resource ID for repository %s',
                $this->name
            ));
        }
    }