This diff adds a new `--path` param you can provide to the Dagit tool which hosts dagit and the /graphql endpoint at a subpath. No requests assume the root path, and hitting the root redirects to the subpath (just in case the user has not mounted something else at the root of the domain). The path you choose is injected into the the React app via a meta tag in the HTML, and is used to do two things:
- We give React Router the path prefix. This makes most of the app "just work" - <Link to="/bla"> goes to "/path/bla" and <Route path="/bla" /> handles "/path/bla".
- We store the path prefix and manually append it when we have to build URLs from scratch, eg: for opening new windows / tabs. To make this less of a pain point, I consolidated code that handles the launch/relaunch responses (it was nearly identical) so there is only one place in the app we manually assemble a run URL.