Nature of the Business and Basis of Presentation (Details) - USD ($)
$ in Thousands
1 Months Ended 3 Months Ended 6 Months Ended
Jul. 20, 2018
Jul. 31, 2018
Jun. 30, 2019
Mar. 31, 2019
Jun. 30, 2018
Mar. 31, 2018
Jun. 30, 2019
Jun. 30, 2018
Jan. 01, 2019
Dec. 31, 2018
Dec. 31, 2017
Sale of Equity                      
Net loss     $ (39,390) $ (32,581) $ (21,239) $ (14,411) $ (71,971) $ (35,650)      
Accumulated deficit     $ (221,253)       $ (221,253)   $ (149,282) $ (150,082) $ (60,979)
Common stock                      
Sale of Equity                      
Conversion of redeemable convertible preferred stock to common stock (in shares) 51,845,438 51,845,438                  
IPO                      
Sale of Equity                      
Shares issued (in shares) 12,055,450                    
Net proceeds after deducting underwriting discounts and commissions and other offering costs $ 254,300                    
Conversion of redeemable convertible preferred stock to common stock (in shares)   131,273                  
IPO | Common stock                      
Sale of Equity                      
Shares issued (in shares) 12,055,450                    
Overallotment                      
Sale of Equity                      
Shares issued (in shares) 1,572,450