File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
examples/apollo-federation-with-cube/dashboard-app/src Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ import {
1515import { setContext } from '@apollo/client/link/context' ;
1616import {
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 < >
Original file line number Diff line number Diff 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 ) => {
You can’t perform that action at this time.
0 commit comments