Merge pull request #446 from automatisch/feature/show-flow-count-with-connections

feat: Expose flow count with connections of getApp query
This commit is contained in:
Ömer Faruk Aydın
2022-08-13 11:59:30 +03:00
committed by GitHub
7 changed files with 34 additions and 11 deletions

View File

@@ -42,7 +42,7 @@ function AppConnectionRow(props: AppConnectionRowProps): React.ReactElement {
const [deleteConnection] = useMutation(DELETE_CONNECTION);
const formatMessage = useFormatMessage();
const { id, key, formattedData, verified, createdAt } = props.connection;
const { id, key, formattedData, verified, createdAt, flowCount } = props.connection;
const contextButtonRef = React.useRef<SVGSVGElement | null>(null);
const [anchorEl, setAnchorEl] = React.useState<SVGSVGElement | null>(null);
@@ -121,7 +121,7 @@ function AppConnectionRow(props: AppConnectionRowProps): React.ReactElement {
<Box sx={{ px: 2 }}>
<Typography variant="caption" color="textSecondary" sx={{ display: ['none', 'inline-block'] }}>
{formatMessage('connection.flowCount', { count: countTranslation(0) })}
{formatMessage('connection.flowCount', { count: countTranslation(flowCount) })}
</Typography>
</Box>

View File

@@ -8,6 +8,7 @@ export const GET_APP_CONNECTIONS = gql`
id
key
verified
flowCount
formattedData {
screenName
}