[dagit] Add an id field to Mode
Summary:
Now that we are querying mode more aggressively on Pipeline, we are ending up with more cases where the cached object in Apollo appears to be treated as a mismatch, and extra queries are performed. It appears to be because Mode does not have an ID, e.g. Apollo does not match the objects based on the name field alone.
Ideally this change will result in fewer network queries of the root repository query and search bootstrap query during simple navigation of Dagit.
Test Plan: View a pipeline in Dagit, click "Playground". Verify that the RootRepositoriesQuery and SearchBootstrapQuery are not requested. (In master, they currently are.)
Reviewers: bengotow, sandyryza, prha, dgibson
Reviewed By: prha, dgibson
Differential Revision: https://dagster.phacility.com/D8495