Skip to content

Commit

Permalink
adjust use of refreshGraphQL to recent changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rotem-hen-sf committed Sep 14, 2023
1 parent 397302c commit 679da26
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@ export default class MainDashboard extends LightningElement {
this.queryResult = result;
const { data, errors } = result;
if (data) {
const allSettings = data?.uiapi?.query['Mobile_Dashboard_Setting__c']?.edges;
if (allSettings) this.populateDashboardSettings(allSettings);
if (!this.refreshed) {
this.refreshGraphQL();
this.refreshed = true;
return;
this.refreshGraphQL();
}
const allSettings = data?.uiapi?.query['Mobile_Dashboard_Setting__c']?.edges;
if (allSettings) this.populateDashboardSettings(allSettings);
}
if (errors) {
console.log(JSON.stringify(errors));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,11 @@ export default class SummaryComponent extends LightningElement {
this.queryResult = result;
const { data, errors } = result;
if (data) {
this.setRecordsAndSubQueries(data);
if (!this.refreshed) {
this.refreshGraphQL();
this.refreshed = true;
return;
this.refreshGraphQL();
}
this.setRecordsAndSubQueries(data);
}
if (errors) {
console.log(errors);
Expand Down

0 comments on commit 679da26

Please sign in to comment.