@devflow-tools/plugin-graphql 0.8.9 → 0.8.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @devflow-tools/plugin-graphql
|
|
2
2
|
|
|
3
|
-
GraphQL
|
|
3
|
+
GraphQL 专家插件 — Schema 设计、N+1 检测、Resolver 优化、安全审计。
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -8,12 +8,36 @@ GraphQL expert plugin for DevFlow — schema design, N+1 detection, resolver opt
|
|
|
8
8
|
npm install @devflow-tools/plugin-graphql
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## MCP Tools
|
|
12
12
|
|
|
13
|
-
|
|
|
14
|
-
|
|
15
|
-
| `
|
|
16
|
-
| `
|
|
13
|
+
| Tool | 说明 | 关键参数 |
|
|
14
|
+
|------|------|---------|
|
|
15
|
+
| `graphql_diagnose_bug` | Bug 诊断:查询分析 → Resolver 链追踪 → 修复 | `projectRoot`, `errorMessage`, `stackTrace` |
|
|
16
|
+
| `graphql_new_graphql_type` | 新建 GraphQL Type + Resolver + DataLoader | `projectRoot` |
|
|
17
|
+
|
|
18
|
+
## Knowledge Sources
|
|
19
|
+
|
|
20
|
+
| 来源 | URL | SPA |
|
|
21
|
+
|------|-----|-----|
|
|
22
|
+
| GraphQL 官方文档 | https://graphql.org/learn | No |
|
|
23
|
+
| Apollo GraphQL 文档 | https://www.apollographql.com/docs | No |
|
|
24
|
+
| Prisma 文档 | https://www.prisma.io/docs | No |
|
|
25
|
+
|
|
26
|
+
## Memory
|
|
27
|
+
|
|
28
|
+
插件自动注入以下最佳实践:
|
|
29
|
+
- 每个 Type 使用 DataLoader 避免 N+1 查询
|
|
30
|
+
- Schema 优先设计,Resolver 纯函数风格
|
|
31
|
+
- 复杂查询使用 Fragment 组合
|
|
32
|
+
- 错误处理遵循 GraphQL Errors 规范
|
|
33
|
+
- 深度限制和查询复杂度分析防滥用
|
|
34
|
+
|
|
35
|
+
## Usage
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# 在 Claude Code 中使用
|
|
39
|
+
/devflow:graphql 创建 User Type
|
|
40
|
+
```
|
|
17
41
|
|
|
18
42
|
## License
|
|
19
43
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devflow-tools/plugin-graphql",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"files": [
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "a0a0b61377aa88ebbd380f50a5d532f63175ef45"
|
|
30
30
|
}
|