frontend-query-mutation
Frontend Query & Mutation
Intent
- Keep API hooks in
controllers/API/queries/{domain}/as the organized source of truth. - Use
UseRequestProcessorfor consistent retry, invalidation, and error handling. - Use Axios
apiinstance for all HTTP calls (never rawfetchfor REST). - Use
performStreamingRequest()for streaming operations (build, chat). - Keep cache invalidation in mutation
onSettledcallbacks.
Architecture Overview
Langflow uses Axios + TanStack React Query v5 for data fetching. There is no oRPC or contract layer. The architecture is:
More from langflow-ai/langflow
frontend-code-review
Review frontend code (.tsx, .ts, .js files) for quality, performance, and correctness against Langflow's frontend conventions. Supports pending-change reviews and file-targeted reviews.
13backend-code-review
Review backend code for quality, security, maintainability, and best practices based on established checklist rules. Use when the user requests a review, analysis, or improvement of backend files (e.g., `.py`) under the `src/backend/` directory. Do NOT use for frontend files (e.g., `.tsx`, `.ts`, `.js`). Supports pending-change review, code snippets review, and file-focused review.
6component-refactoring
Refactor high-complexity React components in Langflow frontend. Use when manual complexity assessment shows complexity > 50 or lineCount > 300, when the user asks for code splitting, hook extraction, or complexity reduction; avoid for simple/well-structured components, third-party wrappers, or when the user explicitly wants testing without refactoring.
6e2e-testing
Write and review Playwright E2E tests for Langflow. Trigger when the user asks to write, fix, or review E2E tests, spec files, Playwright tests, or integration tests that exercise the full UI. Also trigger when modifying data-testid attributes, test helpers in tests/utils/, or fixture configuration.
4