An early draft of a script for the Brexit drama starring Benedict Cumberbatch has been leaked online, writer James Graham has said.

The one-off thriller, which is in production, will star the Oscar nominee as Vote Leave’s leading strategist Dominic Cummings.

Graham, who is responsible for plays Ink, This House and Quiz, wrote on Twitter: “Disappointingly a very early draft of my Brexit TV drama was stolen and leaked to various people to read & now comment online.

“My fellow writers on here will know what first drafts are like as you privately play around & test ideas. It is not the script we’re shooting.

“As anyone who has seen my stage work I hope knows, the care I take in research, & the attempts I make to be fair and balanced, are heartfelt, and sincere. And also – takes time. 8 months after this private early draft I’ve been constantly meeting with those involved & updating it.

“As those doing important work in this area know themselves (@carolecadwalla @shahmiruk) wading into this territory can be frightening, but important.

“It’s the defining issue of our age and I take that seriously. I look forward to people engaging with my actual script. Big love x”

The drama, which will focus on the referendum campaign, ending the morning after the vote, was announced amid controversy over the political impact of data-mining, with investigations examining possible links between Vote Leave’s campaign and data companies.

The script was revised to take into account some of the revelations that have emerged about the campaign since the drama was first commissioned.