99designs / 99designs/gqlgen

ReadMe / Instructions

未关闭
#2,647 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Go
星标
10.8k
派生
1.3k
平均合并
2 天 36 分钟
30 天内合并 PR
26

描述

i follow read and i get this error when send request to get list todo:

```
not implemented: Todos - todos

goroutine 18 [running]:
runtime/debug.Stack()
/usr/local/go/src/runtime/debug/stack.go:24 +0x64
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x1c
github.com/99designs/gqlgen/graphql.DefaultRecover({0x140001eb030?, 0x10087aec0?}, {0x1008438a0?, 0x140001a4da0?})
/Users/sebklose/go/pkg/mod/github.com/99designs/gqlgen@v0.17.31/graphql/recovery.go:17 +0x78
github.com/99designs/gqlgen/graphql.(*OperationContext).Recover(0x140001eb068?, {0x1008b12f8, 0x140001f2360}, {0x1008438a0?, 0x140001a4da0?})
/Users/sebklose/go/pkg/mod/github.com/99designs/gqlgen@v0.17.31/graphql/context_operation.go:124 +0x44
with-gqlgen/graph.(*executionContext)._Query_todos.func1()
/Users/sebklose/Projects/DyaliCode/golang/fiber/with-gqlgen/graph/generated.go:381 +0x68
panic({0x1008438a0, 0x140001a4da0})
/usr/local/go/src/runtime/panic.go:884 +0x204
with-gqlgen/graph.(*queryResolver).Todos(0x100b43990?, {0x14000188000?, 0x140001952a8?})
/Users/sebklose/Projects/DyaliCode/golang/fiber/with-gqlgen/graph/schema.resolvers.go:20 +0x40
with-gqlgen/graph.(*executionContext)._Query_todos.func2({0x1008b12f8?, 0x140001f2360})
/Users/sebklose/Projects/DyaliCode/golang/fiber/with-gqlgen/graph/generated.go:387 +0x84
github.com/99designs/gqlgen/graphql/executor.processExtensions.func4({0x1008b12f8?, 0x140001f2360?}, 0x140001b84d0?)
/Users/sebklose/go/pkg/mod/github.com/99designs/gqlgen@v0.17.31/graphql/executor/extensions.go:72 +0x2c
with-gqlgen/graph.(*executionContext)._Query_todos(0x140001a4d20, {0x1008b12f8, 0x140001f2330}, {0x140001a8800?, {0x140001a4d50?, 0x1004287ec?, 0x140
001eb398?}})
```

贡献指南

打开贡献指南

调研方向

错误源自 graph/schema.resolvers.go 第 20 行的 resolver。先检查 Todos resolver 的实现以及 graph/generated.go 中生成的代码。'not implemented' 错误表明可能缺少 resolver 方法或该方法不完整。检查 GraphQL schema 定义,并确保 resolver 匹配预期的 signature 且能正确返回数据。运行应用程序,并通过向 /graphql endpoint 发送请求来复现该错误。

由索引模型根据 Issue 内容生成。

评估

技术栈
go, graphql
领域
api, backend
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。