Why @hasInverse is not working for m2m edges?

The @reverse in DQL does not behave the same syntactically as @hasInverse in GraphQL.

You can either A) use the reverse predicate on employees and then query under Person for ~employees or B) when create an edge manually create the inverse:

{
    "set": [{
        "uid": "0x58",
        "employees": [{ "uid": "0x59"}]
    },{
        "uid": "0x59",
        "employers": [{ "uid": "0x58" }]
    }]
}

No automatic inverse edges are created in DQL, but the reverse directive does allow you to use the same predicate in both directions using the ~ syntax to indicate the reverse direction.