# BaseConnectionModel

Auto-generated from the @jbrowse/mobx-state-tree model in the source — see the [developer guide](https://jbrowse.org/jb2/docs/developer_guide/) for concepts. Built into JBrowse core. [View source](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/pluggableElementTypes/models/BaseConnectionModelFactory.ts).

Holds the tracks a connection has loaded. Each connection type overrides
`connect` to fetch them from its source.

## Properties

| Member | Description |
| --- | --- |
| **tracks**<br><code>tracks: types.array(pluginManager.pluggableConfigSchemaType('track'))</code> |  |
| **configuration**<br><code>configuration: ConfigurationReference(configSchema)</code> |  |
| **silent**<br><code>silent: types.optional(types.boolean, false)</code> | set when the connection is being re-established on session load (its open tracks are already restored from `connectionTrackConfigs`), so `doConnect` suppresses first-connect side effects like launching a view or a success snackbar. Runtime-only: connection instances aren't serialized. |

## Volatiles

| Member | Description |
| --- | --- |
| **loading**<br><code>boolean</code> | true while `connect()` is fetching this connection's tracks; drives a loading affordance in the track selector. Distinct from an empty `tracks` array, which is also the state of a connection that loaded successfully but has no tracks. |

## Getters

| Member | Description |
| --- | --- |
| **connectionId**<br><code>string</code> | the connection's unique id, resolved from its configuration (the config is the source of truth; connection names are not guaranteed unique) |
| **name**<br><code>string</code> |  |

## Actions

| Member | Description |
| --- | --- |
| **connect**<br><code>() =&gt; Promise&lt;void&gt;</code> | no-op hook; concrete connections (UCSC/JB2 track hubs, etc.) override this to fetch and populate their `tracks`. Returns a promise so `afterAttach` can clear the loading flag once the fetch settles. |
| **setLoading**<br><code>(loading: boolean) =&gt; void</code> |  |
| **addTrackConf**<br><code>(trackConf: TrackConf) =&gt; PluggableConfigNode &amp; IStateTreeNode&lt;PluggableConfigSchemaType&gt;</code> |  |
| **addTrackConfs**<br><code>(trackConfs: TrackConf[]) =&gt; void</code> |  |
| **setTrackConfs**<br><code>(trackConfs: TrackConf[]) =&gt; void</code> |  |

