Skip to content

Commit

Permalink
Add some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kmcginnes committed Jan 7, 2025
1 parent cb26182 commit e9f1c93
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/graph-explorer/src/core/defaultConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const DefaultConnectionDataSchema = z.object({

export type DefaultConnectionData = z.infer<typeof DefaultConnectionDataSchema>;

/** Fetches the default connection from multiple possible locations and returns null on failure. */
export async function fetchDefaultConnection(): Promise<RawConfiguration | null> {
const defaultConnectionPath = `${location.origin}/defaultConnection`;
const sagemakerConnectionPath = `${location.origin}/proxy/9250/defaultConnection`;

Check warning on line 29 in packages/graph-explorer/src/core/defaultConnection.ts

View check run for this annotation

Codecov / codecov/patch

packages/graph-explorer/src/core/defaultConnection.ts#L27-L29

Added lines #L27 - L29 were not covered by tests
Expand All @@ -47,6 +48,7 @@ export async function fetchDefaultConnection(): Promise<RawConfiguration | null>
}
}

Check warning on line 49 in packages/graph-explorer/src/core/defaultConnection.ts

View check run for this annotation

Codecov / codecov/patch

packages/graph-explorer/src/core/defaultConnection.ts#L42-L49

Added lines #L42 - L49 were not covered by tests

/** Attempts to fetch a default connection from the given URL and returns null on a failure. */
export async function fetchDefaultConnectionFor(
url: string
): Promise<DefaultConnectionData | null> {
Expand Down

0 comments on commit e9f1c93

Please sign in to comment.