I've read a lot of blogs and forums where writers say we should tell the agent/editor how the story ends in the query letter. Others say, no, the query is just a teaser. The ending should only be hinted at in the query letter, but the ending needs to be revealed in a synopsis.
Can you shed some light on this subject?
Yes. The query is a short teaser. If it's a murder mystery, you don't need to say that the butler did it in the query letter. You do, however, need to put it in the synopsis.
Some publishers/agents want the query and synopsis submitted at the same time. Others want only the query letter.