99designs / 99designs/gqlgen

add support for resolveManyEntities to return a list of entities and errors

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

描述

When using `resolveEntity`, then `resolveEntityGroup` populates the response with either an entity or an error, depending on what the resolver returns.

With `resolveManyEntities`, the plugin takes either the list of entities, or the errors; it would be nice to be able to return a mix of entities AND errors, like the end user would get in case `resolveEntity` is being used.

If you don't want to support it out-of-the-box, it would be nice if you could provide an option to override the federation template, then we would be able to customize it to our use case.

贡献指南

打开贡献指南

调研方向

查看 federation 插件的代码(可能位于 plugin/federation),以了解 resolveManyEntities 当前的工作方式。检查 federation resolver 的模板生成。目标是修改该插件,使其能够返回实体和错误的混合结果,类似于 resolveEntity。检查 federation 的现有测试,了解如何验证该行为。

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

评估

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

把新 issue 发到你的邮箱

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