State diagrams already support node-style edge labels (-[node]->, or skinparam stateDiagramEdgeLabelStyle node). With that style the label is drawn as a node spliced into the link, so Graphviz makes room for it. Component diagrams don't have this. Their labels are placed on the line and, in busy diagrams, often overlap other edges, components or each other. With many labelled links it can be hard to tell which label belongs to which link (see #1783).
It would help to have the same option for component diagrams.
Per link:
@startuml
component Client
component Server
database DB
Client -[node]-> Server : request / auth
Server --> DB : query
@enduml
For the whole diagram, with a per-link opt-out:
@startuml
skinparam componentDiagramEdgeLabelStyle node
component Client
component Server
database DB
Client --> Server : request / auth
Server -[nonode]-> DB : query
@enduml
-[nonode]-> would also fix a related problem in state diagrams. Right now there is no way to opt one transition out when stateDiagramEdgeLabelStyle node is set. -[nonode]-> doesn't parse at all, and the line fails with Syntax Error? (Assumed diagram type: ...).
Arrow decorations, direction (-up->, -left-> …) and hidden links should behave as they do today.
I have an implementation with Vega tests ready and will open a PR referencing this post.
Related: