Skip to content

Commit

Permalink
CB-5935 removes perform update for changing connection view
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyteleshev committed Dec 6, 2024
1 parent 2357b0a commit a94474a
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions webapp/packages/core-connections/src/ConnectionInfoResource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -421,20 +421,18 @@ export class ConnectionInfoResource extends CachedMapResource<IConnectionInfoPar
}

async changeConnectionView(key: IConnectionInfoParams, settings: NavigatorViewSettings): Promise<Connection> {
await this.performUpdate(key, [], async () => {
const connectionNavigatorViewSettings = this.get(key)?.navigatorSettings || DEFAULT_NAVIGATOR_VIEW_SETTINGS;
const { connection } = await this.graphQLService.sdk.setConnectionNavigatorSettings({
connectionId: key.connectionId,
projectId: key.projectId,
settings: { ...connectionNavigatorViewSettings, ...settings },
...this.getDefaultIncludes(),
...this.getIncludesMap(key),
});

this.set(createConnectionParam(connection), connection);
this.onDataOutdated.execute(key);
const connectionNavigatorViewSettings = this.get(key)?.navigatorSettings || DEFAULT_NAVIGATOR_VIEW_SETTINGS;
const { connection } = await this.graphQLService.sdk.setConnectionNavigatorSettings({
connectionId: key.connectionId,
projectId: key.projectId,
settings: { ...connectionNavigatorViewSettings, ...settings },
...this.getDefaultIncludes(),
...this.getIncludesMap(key),
});

this.set(createConnectionParam(connection), connection);
this.onDataOutdated.execute(key);

return this.get(key)!;
}

Expand Down

0 comments on commit a94474a

Please sign in to comment.