Fixed the query and structure to pass the role as a config property instead of a payload