Skip to content

Commit 989d13b

Browse files
author
Adnan Rahić
authored
examples(apollo): update naming (#5339)
1 parent 0da77f1 commit 989d13b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/apollo-federation-with-cube/dashboard-app/src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
import { setContext } from '@apollo/client/link/context';
1616
import {
1717
tablePivotCube,
18-
tablePivotHasura,
18+
tablePivotApollo,
1919
availableStepRanges,
2020
defaultIsFraudSelection,
2121
defaultStepSelection,
@@ -121,7 +121,7 @@ function App() {
121121
} = useQuery(GET_FRAUD_AMOUNT_SUM_APOLLO);
122122
useEffect(() => {
123123
if (loadingFraudDataApollo) { return; }
124-
setFraudChartDataApollo(tablePivotHasura(fraudDataApollo.fraudsByAmountSumWithStep));
124+
setFraudChartDataApollo(tablePivotApollo(fraudDataApollo.fraudsByAmountSumWithStep));
125125
}, [ fraudDataApollo ]);
126126

127127
return <>

examples/apollo-federation-with-cube/dashboard-app/src/utils/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export function tablePivotCube(data) {
4848
return reduced;
4949
}
5050

51-
export function tablePivotHasura(data) {
51+
export function tablePivotApollo(data) {
5252
const flattened = data.map(i => ({ y: i.amountsum, x: i.step, type: i.type }));
5353
const groupedHash = groupByKey(flattened, 'type', {omitKey:true});
5454
const reduced = Object.keys(groupedHash).reduce((accumulator, iterator, key) => {

0 commit comments

Comments
 (0)