Skip to content

Spike: Lazy connect datasources on app start #2176

@bajtos

Description

@bajtos

In order to generate swagger spec, e.g. inside apic, we need to load the app. At the moment, all datasources open connection to databases at the start time and if there is any problem, the whole app crashes, even though we only wanted to query metadata.

The proposal is to modify all connectors to correctly implement a lazy connect method and then modify juggler to allow the user to defer initialization of connections until later.

See also loopbackio/loopback-datasource-juggler#463

/cc @raymondfeng did I capture the intent correctly?
/cc @ritch

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions