So, many years ago, I read a book about an alien invasion (possibly). It was well over 20 years ago, maybe even 30. The details I recall are these:
Someone discovers a new star (or shiny thingy). It turns out to be an alien fleet which has their engines turned towards Earth because they are decelerating. The fleet is pretty massive.
Earth goes into defensive mode and builds a super-weapon, not a physically destructive one but some kind of weapon which can hit the whole fleet and ostensibly kill the creatures in the ships. I believe it was radiation-based, and I recall they had to make it strong enough to not only reach the fleet but be wide enough to encompass all the ships.
They use it, and the fleet never varies course. They reach Earth and sail by, close enough that people can see the larger ships with the naked eye. Then they continue on, right past.
The theory is the ray killed all the aliens and the fleet drifted past, and will continue to drift until they hit a planet, star etc.
I do recall some characters speculating throughout the book that they might be peaceful, but due to the lack of communication and the size of the fleet they were deemed hostile.
It was a book IIRC, not a short story. Might have been a novella. Any ideas?