LONDON — J. K. Rowling always said that the seventh Harry Potter book, “Harry Potter and the Deathly Hallows,” would be the last in the series, and so far she has kept to her word. But though she’s written many new things in the intervening nine years, including four adult novels, she’s never been able to put Harry to rest, or to leave him alone.

What’s an author to do when she once seemed to be done? Taking an approach that some fans love and others do not, Ms. Rowling has never made a secret of her continued immersion in Potter-world. Over the years, she has regularly interjected new elements into the old stories, sometimes through sudden Twitter pronouncements, sometimes by other means. (In 2007, for instance, she announced at an event at Carnegie Hall that Dumbledore, whose sexuality in the books was obscure, is in fact gay.)

She also regularly produces fresh ancillary material — new stories, new elaborations — on her Pottermore website, most recently a series of fictional essays about the history of magic in North America.

And now comes “Harry Potter and the Cursed Child,” a play in two full-length parts that begins previews in London on Tuesday, June 7, opens July 30 and is being advertised as the official “eighth story in the Harry Potter canon.” Set 19 years after the events of “Deathly Hallows,” the play imagines Harry as an overworked employee of the Ministry of Magic and focuses on his middle child, Albus Severus, and his struggle to come to terms with his family’s legacy.