(I understand that his mother's maiden name is debatable and as far as I know hasn't been settled conclusively.)
https://en.wikipedia.org/wiki/James_Graham_(speaker)
With extensive supporting references Wikipedia states:
"[Died] January 27, 1701"
(That makes more sense than the 1700 date, because his will which was dated in June of 1700 was allegedly proven in April of 1700 [?], must be a typo. Also he couldn't have died BEFORE he wrote his will. I have added the will abstract to Sources.)
"Graham was born in Midlothian, Scotland in 1650 and was the son of John Graham and Isabella (née Affick) Graham."
"Graham was first married to Mary Home. Together, they were the parents of:[1]
** 1) Isabella Graham (1673–1752), who married Gov. Lewis Morris (1671–1746) on November 3, 1691.[10]
** 2) Mary Graham (b. c. 1675), who married John Corbett on December 14, 1703.[11]
** 3) Sarah Graham (b. c. 1677), who married Mr. Chappel, emigrated to England and was the mother of Rev. Graham Chappen, a clergyman in Nottinghamshire.[1]
** 4) Margaret Graham (b. c. 1679)
** 5) John Graham (b. c. 1681)
"After Mary's DEATH [emphasis mine], Graham was married for a second time to Elizabeth Windebank (1655–1701) on July 18, 1684.[11] Together, they were the parents of:[1]
** 6) Augustine Graham (d. 1718), who married Jane Chiswell on April 8, 1703.[11] He served as Surveyor General (from 1691-1719) and was a patentee in the Great and Little Nine Partner grants in Dutchess County.[1][12]
END QUOTE
So, no mention anywhere of a divorce.
Nor any mention anywhere of a second daughter named Mary.
In his will abstract the second wife isn't mentioned at all (both died in 1701, apparently). Unless she is the "deceased" wife he wished to be buried next to? But Elizabeth Windebank was still alive when he wrote the will, unless her date of death is incorrect in all known sources.
All reliable sources state: "He was deprived of his office of Attorney General on the 21st of January, 1701, but a few days before his death..."
That date is a matter of public record, so he must have been alive in 1701. Why 1700 here?
https://en.wikipedia.org/wiki/Recorder_of_New_York_City
http://www.iment.com/maida/familytree/graham/graham.htm
He specifically asked in his will to be buried next to his "deceased" first wife (divorce??, seems doubtful). Unless Elizabeth was also deceased at the time he wrote the will in 1700? But wouldn't he have needed to specify which wife, or was there only one present at the "New York Burying Ground"? Besides, her date of death is in 1701.
https://www.findagrave.com/memorial/162096335/james-graham
And only six living children were named in the will: Augustine, Isabell, Mary, Sarah, Margaret, and John.
So if he did have two daughters named Mary, he left one of them out of his will or she died young.
He emigrated in 1678 at age 28, with his first wife Mary Home and at least three of the older children. None of them could have been of age to voluntarily remain behind in Scotland.