diff --git a/packages/web/src/components/FlowStep/index.tsx b/packages/web/src/components/FlowStep/index.tsx index 7a31e11a..f98c4de9 100644 --- a/packages/web/src/components/FlowStep/index.tsx +++ b/packages/web/src/components/FlowStep/index.tsx @@ -63,7 +63,7 @@ export default function FlowStep(props: FlowStepProps): React.ReactElement | nul const initialRender = React.useRef(true); const formatMessage = useFormatMessage(); const [currentSubstep, setCurrentSubstep] = React.useState(0); - const { data } = useQuery(GET_APPS) + const { data } = useQuery(GET_APPS, { variables: { onlyWithTriggers: isTrigger }}); const apps: App[] = data?.getApps; const app = apps?.find((currentApp: App) => currentApp.key === step.appKey); diff --git a/packages/web/src/graphql/queries/get-apps.ts b/packages/web/src/graphql/queries/get-apps.ts index 3236b9fd..d2d3f26a 100644 --- a/packages/web/src/graphql/queries/get-apps.ts +++ b/packages/web/src/graphql/queries/get-apps.ts @@ -1,8 +1,8 @@ import { gql } from '@apollo/client'; export const GET_APPS = gql` - query GetApps($name: String) { - getApps(name: $name) { + query GetApps($name: String, $onlyWithTriggers: Boolean) { + getApps(name: $name, onlyWithTriggers: $onlyWithTriggers) { name key iconUrl