Cursed Child is fan fiction, in the sense that the text wasn't written by J.K. Rowling. While Rowling did co-write the story, the actual play was written by Jack Thorne.