The Polish chronicler Jan Długosz (from whom we draw much of our knowledge of these times) says Granowska at the time was an ugly, middle-aged widow. Her husband had died suddenly; there was suspicion of poison. Granowska was a friend of Jogaila's sister, Alexandra*, who introduced the two. Jogaila (middle-aged himself and perhaps tired of child brides) became enamored of her and gave her gifts. They were married in March 1417, a year after Jadwiga's death. Sadly, she died less than a year later, in early 1419, having not produced an heir.
The quest for a queen consort and subsequent male heir began again. He found one in the niece of his cousin Vytatutas' wife. Sophia of Halshany (c.1405 - 21 September 1461) was very young, and Jogaila was at least in his 60s when they met in the winter of 1420-21. Polish nobles opposed this match because she was not Polish enough. Also, she was not Christian.
She was baptized Christian in February 1422 and married later that month, but not crowned queen consort until 1424. After the marriage she moved to Wawel Castle, where those who favored Princess Hedwig were hostile to her reason for being there: to provide a male (and less Polish) heir to the throne of Poland, bypassing the half-Polish Hedwig. Her husband was off traveling, leaving her with little support. In April 1423, Jogaila took her to Russia with him. At the end of October she had a son, Władysław III. In 1426 she gave birth to Casimir, who died at 18 months. A third son in 1427, also named Casimir, survived.
Jogaila now had two potential male heirs, but Princess Hedwig was still first in line, and favored by Polish nobles as a member of the much revered Piast dynasty. Sadly, she died in 1431 after a year-long illness. Of course there was suspicion that Sophia had something to do with it, trying to eliminate her in favor of Sophia's own children.
Be that as it may, Hedwig was gone, so when Jogaila died in August 1381, Władysław III succeeded him as King of Poland and Supreme Duke of Lithuania. He was succeeded by his brother Casimir. Sophia lived until 21 September 1461. She is still remembered for having the Bible translated into Polish (never finished, but what exists is beautiful). She was buried in Wawel Cathedral, where she had funded the construction of the Holy Trinity Chapel.
The Polish throne was then being held by less-Polish rulers, and the Piast dynasty was shut out. Regarding the Piasts: we should look at one of the prominent members who has been mentioned a few times recently. Next time let's take a look at Casimir III and what made him "Great."
*Alexandra had married Siemovit, his consolation for being turned down by Jadwiga.