We have two problems with our democracy - an unwritten constitution and an undemocratic FPTP voting system.
Although the constitution is unwritten certain features are recognised as being law.
We are a parliamentary democracy so MPs are representatives, not delegates. That means that it is their duty to act for the best interests of their constituents and the country, not to follow blindly the majority view of their constituents.
Secondly, referendums, which are rare in our system, are always advisory. Although it is true that David Cameron said the government would act in accordance with result of the EU referendum, he had no right to do so.
Thirdly, one parliament is not empowered to tie the hands of any future parliament. This present parliament, elected in June 2017, is not bound by the actions of the previous parliament, which triggered Article 50 in March 2017 (without any sort of plan of even agreement within the cabinet, let alone the Tory party, the parliament or the country).
The law states that the UK can, unilaterally revoke Article 50 any time before the expiry date and that is exactly what a responsible parliament should do