It's both. The word rank/grade are interchangeable.
Read:
"Meito is a term for a blade which has been given a name. These blades are typically quite famous and powerful and are
RANKED by the
GRADE of their quality. While most Meito are swords, a great variety of blades fall under this term, as well as non-bladed melee weapons including polearms and clubs".
"It is said that should a swordsman be able to turn their blade into a Black Blade, its
GRADE would increase by a
RANK."
https://onepiece.fandom.com/wiki/Meito