Object directive on root Mutation type doesn't have any effect
未关闭
- 主要语言
- Go
- 星标
- 10.8k
- 派生
- 1.3k
- 平均合并
- 2 天 36 分钟
- 30 天内合并 PR
- 26
描述
### What happened?
Placing a `OBJECT` directive on the root `Mutation` type doesn't get run
### What did you expect?
The directive should get run for the root nodes
### Minimal graphql.schema and models to reproduce
```gql
type Mutation @cacheControl(maxAge: 0) {
dummy: Boolean
}
directive @cacheControl(
maxAge: Int
) on OBJECT
```
### versions
- `gqlgen version`?
v0.13.0
- `go version`?
1.13
- dep or go modules?
贡献指南
调研方向
该 issue 涉及 gqlgen 中 OBJECT 指令未应用于根 Mutation 类型的问题。首先检查代码生成和指令执行逻辑,相关代码可能位于 codegen 和 execution 包中。查找处理对象类型指令的位置,并确认根类型是否以不同方式处理。运行提供的最小 schema 以重现问题,并检查与指令和根类型相关的测试文件,以了解预期行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- go, graphql
- 领域
- api, backend
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 45/100