Feat: Activate or create connection via URL parameters#1811
Feat: Activate or create connection via URL parameters#1811andy-k-improving wants to merge 5 commits into
Conversation
You must reset the graph session when changing connections. The reason is that any graph currently on the canvas has the potential to be expanded or the data to be refreshed. But if the connection changed, then the data might not exist in the new connection and will most likely break. So any connection change should always reset everything. |
I think this means the connection is already active? I'm not really sure why we would need to 'activate it'? I understand the 'match' strategy, but I think we should have a dialog with the following options:
|
|
Good questions — I reworked this quite a bit; it's now #1828, which replaces this PR. A connection link opens in a new tab/window — there's no way to push params into an already-loaded Graph Explorer tab, so every link starts a fresh session. That removes the "switching could clear a session you care about" concern: there's nothing on the canvas to lose. That's what simplifies the dialog question: @acarbonetto — I dropped the 3-option dialog. Switching to a connection you already have needs no prompt (same as clicking it in the connections list), since the session is fresh anyway. The only friction I kept is the create form for an unknown endpoint — the one case where a link introduces something unvetted. No "add but don't activate" mode; a link's whole intent is to connect. Matching now also considers auth posture (IAM/region/service type), so a link asking for IAM won't silently reuse a plaintext connection to the same URL. Closing this in favor of #1828. |
Issue: Closes #1788
Description:
Allows external applications to deep-link into Graph Explorer with a database connection pre-configured. On page load, URL search parameters are parsed and the user is prompted to either activate an existing matching connection or create a new one.
Example URL
Supported parameters
graphDbUrlqueryEnginegremlingremlin,openCypher, orsparqlawsRegionserviceTypeneptune-dborneptune-graphnameBehavior
replaceStateafter user confirms or cancelsFiles changed
src/core/AppStatusLoader.tsxsrc/core/UrlConnectionDialog.tsxsrc/core/urlConnectionParams.tsparseUrlConnectionParams,findMatchingConnection,buildConnectionFromParamssrc/core/urlConnectionParams.test.tsTesting
Check List
pnpm checkspasses with no errors.pnpm testpasses with no failures.