Skip to content

Commit 65b9ac9

Browse files
committed
chore: use cache-first in get-apps query
1 parent 6980d4d commit 65b9ac9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

packages/frontend/src/contexts/Editor.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@ export const EditorProvider = ({
160160
const [currentStepId, setCurrentStepId] = useState<string | null>(null)
161161
const [resetTimestamp, setResetTimestamp] = useState<number>(Date.now())
162162

163-
const { data: getAppsData, loading: isLoadingAllApps } = useQuery(GET_APPS)
163+
const { data: getAppsData, loading: isLoadingAllApps } = useQuery(GET_APPS, {
164+
fetchPolicy: 'cache-first',
165+
})
164166

165167
const steps = flow?.steps ?? []
166168
const isEmptyPipe =

packages/frontend/src/pages/Templates/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ export default function Templates(): JSX.Element {
4040
const { templateId } = useParams()
4141
const template = templates?.find((template) => template.id === templateId)
4242

43-
const { data: appsData, loading: appsLoading } = useQuery(GET_APPS)
43+
const { data: appsData, loading: appsLoading } = useQuery(GET_APPS, {
44+
fetchPolicy: 'cache-first',
45+
})
4446
const apps: IApp[] = appsData?.getApps ?? []
4547

4648
return (

0 commit comments

Comments
 (0)