You don't state any particular design constraints (e.g., whether or not a sidebar for filtering is acceptable; desktop vs. mobile; etc.), but this sounds like a GIS case of faceted navigation.
There are many variations on this general pattern, but the basic idea would be to have a filtering sidebar that lists relevant entity properties and their possible values within the currently-selected entity list. That is, a side bar with a section for each relevant entity property you want to filter on (AKA "facet"): you mention entity ID, attribute A ... Z, link direction specifically, and I would guess entity location would be another (either precise GPS coordinate, governmental boundary hierarchy, or both). For each entity property, provide access to filtering by the extant values for that property.
As mentioned, there is a lot of variation on how exactly to implement these functions; you can find an older survey and more technical discussion here (disclaimer: I'm the author of the paper but don't have a non-ACM-paywall link to the PDF).
But to summarize, depending on the number of entities and their properties, you may then have to consider the UI/UX for "meta-navigation" - that is, navigating the available filtering attributes themselves via progressive expansion of the filtering choices, search of the filter choices and/or values themselves, etc. Similarly, the number of values for each property
In the simplest case, you can just list each property as heading and then each possible value underneath it with a switch or similar widget for filtering. Of course, if the number of distinct values is large, this becomes unwieldy, and designers commonly use range sliders (for numeric/temporal values), search boxes (for text values) and/or hierarchical categorization to simplify value selection as well.
Now: if you want all this filtering to be done on the map itself, you have a harder UI problem. My first thought would be to provide filtering through whatever entity/attribute display mechanism you'd use for your read-only design: visually indicate what elements are filterable items, and allow users to right-click/long-press/whatever on the their labels or representations to add that value/element to the current filter, and I guess show the current filters as map overlay elements or something.