Skills Plugins MCP Prompt Model 博客 我的中心
開発 #react #api

frontend-query-mutation

Guide for implementing Langflow frontend query and mutation patterns with Axios and TanStack React Query v5. Trigger when creating or updating API hooks in controllers/API/queries, consuming UseRequestProcessor in components, deciding whether to use useQuery or useMutation, handling conditional queries, cache invalidation, mutation error handling, or migrating legacy API calls to the query hook pattern.

DeepseekModel キュレーション済みスキル 品質 優秀 · 90 v1.0.0

取得

https://deepseekmodel.com/api/download.php?id=langflow-ai-langflow-agents-skills-frontend-query-mutation-skill-md&format=skill
ダウンロード .skill 標準形式。system_prompt と model_config を収録し、任意の Agent で利用可能
.skill ファイルの system_prompt フィールドの実際の内容。
name frontend-query-mutation description Guide for implementing Langflow frontend query and mutation patterns with Axios and TanStack React Query v5. Trigger when creating or updating API hooks in controllers/API/queries, consuming UseRequestProcessor in components, deciding whether to use useQuery or useMutation, handling conditional queries, cache invalidation, mutation error handling, or migrating legacy API calls to the query hook pattern. Frontend Query & Mutation Intent Keep API hooks in controllers/API/queries/{domain}/ as the organized source of truth. Use UseRequestProcessor for consistent retry, invalidation, and error handling. Use Axios api instance for all HTTP calls (never raw fetch for REST). Use performStreamingRequest() for streaming operations (build, chat). Keep cache invalidation in mutation onSettled callbacks. Architecture Overview Langflow uses Axios + TanStack React Query v5 for data fetching. There is no oRPC or contract layer. The architecture is: Component -> API hook (controllers/API/queries/{domain}/use-{verb}-{resource}.ts) -> UseRequestProcessor (controllers/API/services/request-processor.ts) -> useQuery / useMutation (TanStack React Query) -> queryFn / mutationFn -> api.get/post/patch/delete (Axios instance from controllers/API/api.tsx) Key Files File Purpose controllers/API/api.tsx Axios instance, ApiInterceptor component, performStreamingRequest() controllers/API/services/request-processor.ts UseRequestProcessor hook wrapping useQuery / useMutation with retry defaults controllers/API/helpers/constants.ts URL constants ( URLs ) and getURL() helper controllers/API/queries/{domain}/ Domain-organized query and mutation hooks types/api/index.ts useQueryFunctionType , useMutationFunctionType type helpers stores/ Zustand stores for client-side state Workflow Identify the change surface. Read references/query-patterns.md for hook structure, naming, URL patterns, and query/mutation call-site shape. Read references/runtime-rules.md for conditional queries, invalidation, error handling, and streaming. Read both references when a task spans hook creation and runtime behavior. Implement the hook following existing patterns. Use UseRequestProcessor for query() and mutate() wrappers. Use the api Axios instance for all HTTP calls. Use getURL() for constructing API paths. Type the hook with useQueryFunctionType or useMutationFunctionType . Preserve Langflow conventions. Query keys are arrays with the hook name: ["useGetFlows"] . Mutations invalidate related queries in onSettled . Zustand store updates happen in the query/mutation function, not in components. UseRequestProcessor provides default retry (5 for queries, 3 for mutations) with exponential backoff. Files Commonly Touched controllers/API/queries/{domain}/use-get-*.ts (query hooks) controllers/API/queries/{domain}/use-post-*.ts (create mutations) controllers/API/queries/{domain}/use-patch-*.ts (update mutations) controllers/API/queries/{domain}/use-delete-*.ts (delete mutations) controllers/API/helpers/constants.ts (URL constants) types/api/index.ts (API type definitions) stores/ (Zustand store updates triggered by queries) References Use references/query-patterns.md for hook structure, naming conventions, directory layout, and anti-patterns. Use references/runtime-rules.md for conditional queries, invalidation, mutate versus mutateAsync , error handling, and streaming requests. Treat this skill as the single query and mutation entry point for Langflow frontend work. Keep detailed rules in the reference files instead of duplicating them in project docs.
このスキルを起動するキーワード。クリックでコピーできます。

このスキルにはトリガーワードがありません。

ダウンロードした .skill に含まれるフィールド。
フィールド 説明
formatフォーマット識別子(skill/v1)
skill_idスキル固有 ID
nameスキル名
versionバージョン
description説明
categoryカテゴリ(配列)
trigger_wordsトリガーワード
tagsタグ
sourceソース
source_urlソース URL(本ページ)
exported_atエクスポート日時(ダウンロード毎)
system_promptシステムプロンプト本文
model_configモデル設定:provider / model / temperature / max_tokens / top_p
examplesサンプル
install_guide各プラットフォームの導入説明(Coze / Dify / Claude / カスタム)
同じスキルを各プラットフォーム形式で出力できます。
.skill 標準形式。system_prompt と model_config を収録し、任意の Agent で利用可能 ダウンロード
.skillpro 拡張形式。scripts / tools / dependencies / hooks を含む ダウンロード
.json 純粋な JSON 出力。system_prompt とモデル設定のみ ダウンロード
Coze frontmatter 付き Markdown。Coze へのインポート用 ダウンロード
Dify Dify DSL。アプリ作成後にそのままインポート ダウンロード

每日精选 Skill 推荐,免费送到你邮箱

输入邮箱,每天接收一个精选 AI Agent 技能推荐。完全免费,持续更新。

提交后我们会发送一封确认邮件,点击邮件里的链接才会开始收信。

完全免费,取消任意时间。我们不会发送垃圾邮件。