CAIN: Are you looking for a mystery or a secret?
ABBY: I ... I don't know. Is there a difference?
CAIN: Of COURSE there's a difference! Mysteries are wonders that you can ponder and share. Secrets are a burden to carry ALONE!
--Swamp Thing 33, "Abandoned Houses"
(collected in
Swamp Thing: Love and Death)
A secret is something the reader is not supposed to know until the author reveals it.
A mystery is something the reader may (or may not) figure out on their own. Many mysteries are also revealed, but not all of them.
Or as Cain puts it, a mystery is a wonder. A secret is a burden.
A mystery, therefore, is part of the narrative structure of the story. (It's no accident that "sensawunda" is a prized characteristic in certain subgenres of sf. Wonder is one of the most precious things art can give us.) I have not read
Agyar, but I understand that its mystery is never given a reveal. The identities of most of the main characters in
A Night in the Lonesome October are mysteries which the reader is supposed to solve.
Silverlock is compounded of nothing but mysteries.
A secret is more problematic. It's a burden on the story, like the Albatross around the neck of the
Ancient Mariner. Now, the Ancient Mariner had to carry that Albatross for a reason, and it may be the case that the story needs its albatross, too.
Bone Dance is the best example I can think of, where the secret is a secret the narrator is keeping from readers and other characters alike, and the reveal is about the story's themes as much as it is about the secret itself.
But you have to be very careful when you're tying an albatross around your story's neck. Is the payoff going to be worth the weight? Does the secret have a purpose? That is, can you explain why this secret is something that must be hidden until the reveal? Or is it just a secret that you're keeping in order to have something in reserve? An ace up your sleeve? That's a metaphor for cheating, and that's exactly why secret-keeping is such an ambivalent pastime in fiction.
Mystery writers in the Golden Age of detective fiction (Queen, Carr, Sayers, et al.) abided very stringently by the rules of fair play. All the clues had to be in the narrative for the reader to find. Even in
The Five Red Herrings, when Sayers deliberately and explicitly withholds the identity of one object, it is possible for the reader to deduce from context what that object is. Early Ellery Queen mysteries even have an intermission, an entr'acte, called The Challenge to the Reader, in which the narrative stops dead for the narrator/author to assure the reader that they have all the information necessary to solve the mystery. Golden Age detective fiction makes mysteries and the solving of them thematic. And they don't cheat. The exception, of course, is Agatha Christie, who sometimes does cheat for the sake of a parlor trick.
And Agatha Christie is a good example of why cheating doesn't pay in the long run. Many readers are offended (by
The Murder of Roger Ackroyd in particular, although that's hardly the only possible example), and even if you aren't offended, once you've read one of her trick-writing stunts, you will never read it again. There's no point. And that's why keeping secrets for the sake of it is meretricious: the effect depends entirely on the surprise.
So that's one question to ask. If you take away the surprise, the secret, what's left for the reader to care about? What would make them read this story a second time? (I know not all readers are re-readers. I am, and it's something I value very deeply in the books I love.) And I'm not saying that there can't be reasons. Diana Wynne Jones's books often have secrets (
A Tale of Time City is, I think, my favorite example), and I will happily reread them over and over again.
The other question is, is the albatross of the secret breaking the story's back? What shift and shenanigans are you putting yourself and your characters to in order to keep the secret safe? (Note that there is a difference between the characters bending over backwards to keep secrets and the narrative bending over backwards to keep secrets.) And is the secret worth the bother? Again, the answer may be yes.
The part that's important is asking the question, and asking it honestly. And remembering the difference between a secret and a mystery.